RE: [PATCH v4] blockjob: Fix crash with IOthread when block commit after snapshot

2021-01-31 Thread 仇大玉
Any comments? It's really a bug and can cause the qemu to segmentfault. Thanks, Michael -Original Message- From: 仇大玉 Sent: 2021年1月28日 13:16 To: qemu-block@nongnu.org; qemu-de...@nongnu.org Cc: kw...@redhat.com; mre...@redhat.com; js...@redhat.com; 08005...@163.com Subject: RE: [PATCH v4

Re: [PATCH 05/10] meson: Introduce target-specific Kconfig

2021-01-31 Thread Philippe Mathieu-Daudé
On 1/31/21 1:36 PM, Philippe Mathieu-Daudé wrote: > On 1/31/21 12:13 PM, Philippe Mathieu-Daudé wrote: >> Add a target-specific Kconfig. >> >> Target foo now has CONFIG_FOO defined. >> >> Two architecture have a particularity, ARM and MIPS: >> their 64-bit version include the 32-bit subset. >> >> S

Re: [PATCH v6 01/11] sysemu/tcg: Introduce tcg_builtin() helper

2021-01-31 Thread Philippe Mathieu-Daudé
On 1/31/21 3:18 PM, Claudio Fontana wrote: > On 1/31/21 12:50 PM, Philippe Mathieu-Daudé wrote: >> Modules are registered early with type_register_static(). >> >> We would like to call tcg_enabled() when registering QOM types, > > > Hi Philippe, > > could this not be controlled by meson at this

Re: [PATCH v6 00/11] Support disabling TCG on ARM (part 2)

2021-01-31 Thread Philippe Mathieu-Daudé
On 1/31/21 3:40 PM, Claudio Fontana wrote: > On 1/31/21 12:50 PM, Philippe Mathieu-Daudé wrote: >> Cover from Samuel Ortiz from (part 1) [1]: >> >> This patchset allows for building and running ARM targets with TCG >> disabled. [...] >> >> The rationale behind this work comes from the NEMU pr

Re: [PATCH v6 00/11] Support disabling TCG on ARM (part 2)

2021-01-31 Thread Claudio Fontana
On 1/31/21 12:50 PM, Philippe Mathieu-Daudé wrote: > Cover from Samuel Ortiz from (part 1) [1]: > > This patchset allows for building and running ARM targets with TCG > disabled. [...] > > The rationale behind this work comes from the NEMU project where > we're trying to only support x86

Re: [PATCH v6 07/11] target/arm: Restrict ARMv7 M-profile cpus to TCG accel

2021-01-31 Thread Claudio Fontana
On 1/31/21 12:50 PM, Philippe Mathieu-Daudé wrote: > KVM requires the target cpu to be at least ARMv8 architecture > (support on ARMv7 has been dropped in commit 82bf7ae84ce: > "target/arm: Remove KVM support for 32-bit Arm hosts"). > > Beside, KVM only supports A-profile, thus won't be able to ru

Re: [PATCH v6 06/11] target/arm: Restrict ARMv7 R-profile cpus to TCG accel

2021-01-31 Thread Claudio Fontana
On 1/31/21 12:50 PM, Philippe Mathieu-Daudé wrote: > KVM requires the target cpu to be at least ARMv8 architecture > (support on ARMv7 has been dropped in commit 82bf7ae84ce: > "target/arm: Remove KVM support for 32-bit Arm hosts"). > > Beside, KVM only supports A-profile, thus won't be able to ru

Re: [PATCH v6 05/11] target/arm: Restrict ARMv6 cpus to TCG accel

2021-01-31 Thread Claudio Fontana
On 1/31/21 12:50 PM, Philippe Mathieu-Daudé wrote: > KVM requires the target cpu to be at least ARMv8 architecture > (support on ARMv7 has been dropped in commit 82bf7ae84ce: > "target/arm: Remove KVM support for 32-bit Arm hosts"). > > Only enable the following ARMv6 CPUs when TCG is available: >

Re: [PATCH v6 04/11] target/arm: Restrict ARMv5 cpus to TCG accel

2021-01-31 Thread Claudio Fontana
On 1/31/21 12:50 PM, Philippe Mathieu-Daudé wrote: > KVM requires the target cpu to be at least ARMv8 architecture > (support on ARMv7 has been dropped in commit 82bf7ae84ce: > "target/arm: Remove KVM support for 32-bit Arm hosts"). > > Only enable the following ARMv5 CPUs when TCG is available: >

Re: [PATCH v6 03/11] target/arm: Restrict ARMv4 cpus to TCG accel

2021-01-31 Thread Claudio Fontana
On 1/31/21 12:50 PM, Philippe Mathieu-Daudé wrote: > KVM requires the target cpu to be at least ARMv8 architecture > (support on ARMv7 has been dropped in commit 82bf7ae84ce: > "target/arm: Remove KVM support for 32-bit Arm hosts"). > > Only enable the following ARMv4 CPUs when TCG is available: >

Re: [PATCH v6 02/11] exec: Restrict TCG specific headers

2021-01-31 Thread Claudio Fontana
On 1/31/21 12:50 PM, Philippe Mathieu-Daudé wrote: > Fixes when building with --disable-tcg on ARM: > > In file included from target/arm/helper.c:16: > include/exec/helper-proto.h:42:10: fatal error: tcg-runtime.h: No such file > or directory > 42 | #include "tcg-runtime.h" > |

Re: [PATCH v6 01/11] sysemu/tcg: Introduce tcg_builtin() helper

2021-01-31 Thread Claudio Fontana
On 1/31/21 12:50 PM, Philippe Mathieu-Daudé wrote: > Modules are registered early with type_register_static(). > > We would like to call tcg_enabled() when registering QOM types, Hi Philippe, could this not be controlled by meson at this stage? On X86, I register the tcg-specific types in tcg/*

Re: [RFC PATCH 1/4] hw/ide/Kconfig: IDE_ISA requires ISA_BUS

2021-01-31 Thread Philippe Mathieu-Daudé
On 1/29/21 8:59 PM, Paolo Bonzini wrote: > On 29/01/21 20:44, Philippe Mathieu-Daudé wrote: >> hw/ide/ioport.c has a strong dependency on hw/isa/isa-bus.c: >> >>    /usr/bin/ld: libcommon.fa.p/hw_ide_ioport.c.o: in function >> `ide_init_ioport': >>    /usr/bin/ld: hw/ide/ioport.c:61: undefined refe

Re: [PATCH v6 06/11] target/arm: Restrict ARMv7 R-profile cpus to TCG accel

2021-01-31 Thread Philippe Mathieu-Daudé
On 1/31/21 12:50 PM, Philippe Mathieu-Daudé wrote: > KVM requires the target cpu to be at least ARMv8 architecture > (support on ARMv7 has been dropped in commit 82bf7ae84ce: > "target/arm: Remove KVM support for 32-bit Arm hosts"). > > Beside, KVM only supports A-profile, thus won't be able to ru

Re: [PATCH 05/10] meson: Introduce target-specific Kconfig

2021-01-31 Thread Philippe Mathieu-Daudé
On 1/31/21 12:13 PM, Philippe Mathieu-Daudé wrote: > Add a target-specific Kconfig. > > Target foo now has CONFIG_FOO defined. > > Two architecture have a particularity, ARM and MIPS: > their 64-bit version include the 32-bit subset. > > Signed-off-by: Philippe Mathieu-Daudé > --- ... > diff -

Re: [PATCH v6 11/11] .travis.yml: Add a KVM-only Aarch64 job

2021-01-31 Thread Philippe Mathieu-Daudé
On Sun, Jan 31, 2021 at 12:51 PM Philippe Mathieu-Daudé wrote: > > From: Philippe Mathieu-Daudé > > Add a job to build QEMU on Aarch64 with TCG disabled, so > this configuration won't bitrot over time. > > We explicitly modify default-configs/aarch64-softmmu.mak to > only select the 'virt' and 'S

[PATCH v6 11/11] .travis.yml: Add a KVM-only Aarch64 job

2021-01-31 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Add a job to build QEMU on Aarch64 with TCG disabled, so this configuration won't bitrot over time. We explicitly modify default-configs/aarch64-softmmu.mak to only select the 'virt' and 'SBSA-REF' machines. Signed-off-by: Philippe Mathieu-Daudé --- Job ran for 7 m

[PATCH v6 10/11] target/arm: Do not build TCG objects when TCG is off

2021-01-31 Thread Philippe Mathieu-Daudé
From: Samuel Ortiz We can now safely turn all TCG dependent build off when CONFIG_TCG is off. This allows building ARM binaries with --disable-tcg. Signed-off-by: Samuel Ortiz [PMD: Heavily rebased during more than 2 years then finally rewritten] Reviewed-by: Richard Henderson Signed-off-by: P

[PATCH v6 09/11] target/arm: Reorder meson.build rules

2021-01-31 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Reorder the rules to make this file easier to modify. No logical change introduced in this commit. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/arm/meson.build | 19 --- 1 file changed, 12 insertions(+), 7 deletio

[PATCH v6 07/11] target/arm: Restrict ARMv7 M-profile cpus to TCG accel

2021-01-31 Thread Philippe Mathieu-Daudé
KVM requires the target cpu to be at least ARMv8 architecture (support on ARMv7 has been dropped in commit 82bf7ae84ce: "target/arm: Remove KVM support for 32-bit Arm hosts"). Beside, KVM only supports A-profile, thus won't be able to run M-profile cpus. Only enable the following ARMv7 M-Profile

[PATCH v6 03/11] target/arm: Restrict ARMv4 cpus to TCG accel

2021-01-31 Thread Philippe Mathieu-Daudé
KVM requires the target cpu to be at least ARMv8 architecture (support on ARMv7 has been dropped in commit 82bf7ae84ce: "target/arm: Remove KVM support for 32-bit Arm hosts"). Only enable the following ARMv4 CPUs when TCG is available: - StrongARM (SA1100/1110) - OMAP1510 (TI925T) The follow

[PATCH v6 08/11] target/arm: Make m_helper.c optional via CONFIG_ARM_V7M

2021-01-31 Thread Philippe Mathieu-Daudé
From: Thomas Huth We've already got the CONFIG_ARM_V7M switch, but it currently can not be disabled yet. The m_helper.c code should not be compiled into the binary if the switch is not enabled. We also have to provide some stubs in a separate file to make sure that we still can link the other cod

[PATCH v6 06/11] target/arm: Restrict ARMv7 R-profile cpus to TCG accel

2021-01-31 Thread Philippe Mathieu-Daudé
KVM requires the target cpu to be at least ARMv8 architecture (support on ARMv7 has been dropped in commit 82bf7ae84ce: "target/arm: Remove KVM support for 32-bit Arm hosts"). Beside, KVM only supports A-profile, thus won't be able to run R-profile cpus. Only enable the following ARMv7 R-Profile

[PATCH v6 05/11] target/arm: Restrict ARMv6 cpus to TCG accel

2021-01-31 Thread Philippe Mathieu-Daudé
KVM requires the target cpu to be at least ARMv8 architecture (support on ARMv7 has been dropped in commit 82bf7ae84ce: "target/arm: Remove KVM support for 32-bit Arm hosts"). Only enable the following ARMv6 CPUs when TCG is available: - ARM1136 - ARM1176 - ARM11MPCore - Cortex-M0 The fo

[PATCH v6 04/11] target/arm: Restrict ARMv5 cpus to TCG accel

2021-01-31 Thread Philippe Mathieu-Daudé
KVM requires the target cpu to be at least ARMv8 architecture (support on ARMv7 has been dropped in commit 82bf7ae84ce: "target/arm: Remove KVM support for 32-bit Arm hosts"). Only enable the following ARMv5 CPUs when TCG is available: - ARM926 - ARM946 - ARM1026 - XScale (PXA250/255/260/

[PATCH v6 02/11] exec: Restrict TCG specific headers

2021-01-31 Thread Philippe Mathieu-Daudé
Fixes when building with --disable-tcg on ARM: In file included from target/arm/helper.c:16: include/exec/helper-proto.h:42:10: fatal error: tcg-runtime.h: No such file or directory 42 | #include "tcg-runtime.h" | ^~~ Signed-off-by: Philippe Mathieu-Daudé -

[PATCH v6 01/11] sysemu/tcg: Introduce tcg_builtin() helper

2021-01-31 Thread Philippe Mathieu-Daudé
Modules are registered early with type_register_static(). We would like to call tcg_enabled() when registering QOM types, but tcg_enabled() returns tcg_allowed which is a runtime property initialized later (See commit 2f181fbd5a9 which introduced the MachineInitPhase in "hw/qdev-core.h" representi

[PATCH v6 00/11] Support disabling TCG on ARM (part 2)

2021-01-31 Thread Philippe Mathieu-Daudé
Cover from Samuel Ortiz from (part 1) [1]: This patchset allows for building and running ARM targets with TCG disabled. [...] The rationale behind this work comes from the NEMU project where we're trying to only support x86 and ARM 64-bit architectures, without including the TCG code ba

Re: [PATCH 05/10] meson: Introduce target-specific Kconfig

2021-01-31 Thread Artyom Tarasenko
вс, 31 янв. 2021 г., 12:13 Philippe Mathieu-Daudé : > Add a target-specific Kconfig. > > Target foo now has CONFIG_FOO defined. > > Two architecture have a particularity, ARM and MIPS: > their 64-bit version include the 32-bit subset. > > Signed-off-by: Philippe Mathieu-Daudé > For SPARC part: A

[PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection

2021-01-31 Thread Philippe Mathieu-Daudé
Commit 56b5170c87e ("semihosting: Move ARM semihosting code to shared directories") selected ARM_COMPATIBLE_SEMIHOSTING which already selects SEMIHOSTING. No need to select it again. Signed-off-by: Philippe Mathieu-Daudé --- default-configs/devices/arm-softmmu.mak | 1 - default-configs/devi

[PATCH 07/10] target/arm: Move V7M feature to target Kconfig

2021-01-31 Thread Philippe Mathieu-Daudé
V7M is an architecture feature, move its declaration to target/arm/. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/Kconfig | 4 target/arm/Kconfig | 4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 09298881f2f..f3ecb73a3d8 1

[PATCH 06/10] target/i386: Move SEV feature to target Kconfig

2021-01-31 Thread Philippe Mathieu-Daudé
SEV is an architecture feature, move its declaration to target/i386/. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/Kconfig | 4 target/i386/Kconfig | 4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig index 7f91f30877f..3d67c172

[PATCH 10/10] target: Move SEMIHOSTING feature to target Kconfig

2021-01-31 Thread Philippe Mathieu-Daudé
SEMIHOSTING is an architecture feature, move its declaration to each target/ARCH/. Signed-off-by: Philippe Mathieu-Daudé --- default-configs/devices/lm32-softmmu.mak| 2 -- default-configs/devices/m68k-softmmu.mak| 2 -- default-configs/devices/mips-softmmu-common.mak | 3 --- de

[PATCH 03/10] hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS

2021-01-31 Thread Philippe Mathieu-Daudé
We want to be able to use the 'LM32' config for architecture specific features. As CONFIG_LM32 is only used to select peripherals, rename it CONFIG_LM32_PERIPHERALS. Signed-off-by: Philippe Mathieu-Daudé --- hw/char/meson.build | 4 ++-- hw/intc/meson.build | 2 +- hw/lm32/Kconfig | 4 ++-

[PATCH 02/10] hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards

2021-01-31 Thread Philippe Mathieu-Daudé
We want to be able to use the 'LM32' config for architecture specific features. Introduce CONFIG_LM32_EVR to select the lm32-evr / lm32-uclinux boards. Signed-off-by: Philippe Mathieu-Daudé --- default-configs/devices/lm32-softmmu.mak | 2 +- hw/lm32/Kconfig | 6 +-

[PATCH 05/10] meson: Introduce target-specific Kconfig

2021-01-31 Thread Philippe Mathieu-Daudé
Add a target-specific Kconfig. Target foo now has CONFIG_FOO defined. Two architecture have a particularity, ARM and MIPS: their 64-bit version include the 32-bit subset. Signed-off-by: Philippe Mathieu-Daudé --- I suppose X86_64 should also select I386? No clue about PPC/RISCV. --- meson.buil

[PATCH 04/10] hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS

2021-01-31 Thread Philippe Mathieu-Daudé
The Milkymist board requires more than the PTIMER. Directly select the LM32_PERIPHERALS. This fixes: /usr/bin/ld: libqemu-lm32-softmmu.fa.p/target_lm32_gdbstub.c.o: in function `lm32_cpu_gdb_read_register': target/lm32/gdbstub.c:46: undefined reference to `lm32_pic_get_im' target/lm32/gdb

[PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig

2021-01-31 Thread Philippe Mathieu-Daudé
ARM_COMPATIBLE_SEMIHOSTING is an architecture feature, move its declaration to each target/ARCH/. Note, we do not modify the linux-user targets, as user-mode builds don't use Kconfig. Signed-off-by: Philippe Mathieu-Daudé --- default-configs/devices/arm-softmmu.mak | 1 - default-configs/de

[PATCH 01/10] hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS

2021-01-31 Thread Philippe Mathieu-Daudé
We want to be able to use the 'SH4' config for architecture specific features. As CONFIG_SH4 is only used to select peripherals, rename it CONFIG_SH4_PERIPHERALS. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/meson.build | 2 +- hw/char/meson.build | 2 +- hw/intc/meson.build | 2 +- hw/s

[PATCH 00/10] target: Provide target-specific Kconfig

2021-01-31 Thread Philippe Mathieu-Daudé
Hi, This series add a Kconfig file to each target, allowing to select target-specific features there, instead of from the hardware Kconfig. This simplifies managing multi-arch features such semihosting. Series organization: 1/ Some targets use the architecture symbol to select boards and periph