* [Qemu-devel] [PATCH 0/4] Support disabling TCG on ARM (part 2)
@ 2019-08-23 13:58 Philippe Mathieu-Daudé
2019-08-23 13:58 ` [Qemu-devel] [PATCH 1/4] target/arm: Restrict pre-ARMv7 cpus to TCG Philippe Mathieu-Daudé
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-23 13:58 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Thomas Huth, qemu-arm, Philippe Mathieu-Daudé,
Peter Maydell
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 base. We can only do so if we can build and run
ARM binaries with TCG disabled.
The first 2 patches disable non-KVM compatible cpus to the KVM build,
then the last 2 remove the boards using these cpus from this build.
This is a resend (no changes) of patches from part 1 v4 from [2].
Regards,
Phil.
[1]: https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg02451.html
[2]: https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg00312.html
Philippe Mathieu-Daudé (4):
target/arm: Restrict pre-ARMv7 cpus to TCG
target/arm: Restrict R and M profiles to TCG
RFC target/arm: Do not build pre-ARMv7 cpus when using KVM
RFC target/arm: Do not build A/M-profile cpus when using KVM
default-configs/arm-softmmu.mak | 47 +++++++++++++++------------------
hw/arm/Kconfig | 42 ++++++++++++++++++++++++++---
target/arm/cpu.c | 16 ++++++++++-
3 files changed, 76 insertions(+), 29 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 1/4] target/arm: Restrict pre-ARMv7 cpus to TCG
2019-08-23 13:58 [Qemu-devel] [PATCH 0/4] Support disabling TCG on ARM (part 2) Philippe Mathieu-Daudé
@ 2019-08-23 13:58 ` Philippe Mathieu-Daudé
2019-08-23 17:04 ` Richard Henderson
2019-08-23 13:58 ` [Qemu-devel] [PATCH 2/4] target/arm: Restrict R and M profiles " Philippe Mathieu-Daudé
` (2 subsequent siblings)
3 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-23 13:58 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Thomas Huth, qemu-arm, Philippe Mathieu-Daudé,
Peter Maydell
KVM requires at least a ARMv7 cpu.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
target/arm/cpu.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 2399c14471..522485a2de 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -1678,6 +1678,8 @@ static ObjectClass *arm_cpu_class_by_name(const char *cpu_model)
/* CPU models. These are not needed for the AArch64 linux-user build. */
#if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
+#ifdef CONFIG_TCG
+
static void arm926_initfn(Object *obj)
{
ARMCPU *cpu = ARM_CPU(obj);
@@ -1900,6 +1902,8 @@ static void cortex_m0_initfn(Object *obj)
cpu->midr = 0x410cc200;
}
+#endif
+
static void cortex_m3_initfn(Object *obj)
{
ARMCPU *cpu = ARM_CPU(obj);
@@ -2283,6 +2287,8 @@ static void cortex_a15_initfn(Object *obj)
define_arm_cp_regs(cpu, cortexa15_cp_reginfo);
}
+#ifdef CONFIG_TCG
+
static void ti925t_initfn(Object *obj)
{
ARMCPU *cpu = ARM_CPU(obj);
@@ -2451,6 +2457,8 @@ static void pxa270c5_initfn(Object *obj)
cpu->reset_sctlr = 0x00000078;
}
+#endif
+
#ifndef TARGET_AARCH64
/* -cpu max: if KVM is enabled, like -cpu host (best possible with this host);
* otherwise, a CPU with as many features enabled as our emulation supports.
@@ -2523,6 +2531,7 @@ struct ARMCPUInfo {
static const ARMCPUInfo arm_cpus[] = {
#if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
+#ifdef CONFIG_TCG
{ .name = "arm926", .initfn = arm926_initfn },
{ .name = "arm946", .initfn = arm946_initfn },
{ .name = "arm1026", .initfn = arm1026_initfn },
@@ -2535,6 +2544,7 @@ static const ARMCPUInfo arm_cpus[] = {
{ .name = "arm1176", .initfn = arm1176_initfn },
{ .name = "arm11mpcore", .initfn = arm11mpcore_initfn },
{ .name = "cortex-m0", .initfn = cortex_m0_initfn,
+#endif
.class_init = arm_v7m_class_init },
{ .name = "cortex-m3", .initfn = cortex_m3_initfn,
.class_init = arm_v7m_class_init },
@@ -2548,6 +2558,7 @@ static const ARMCPUInfo arm_cpus[] = {
{ .name = "cortex-a8", .initfn = cortex_a8_initfn },
{ .name = "cortex-a9", .initfn = cortex_a9_initfn },
{ .name = "cortex-a15", .initfn = cortex_a15_initfn },
+#ifdef CONFIG_TCG
{ .name = "ti925t", .initfn = ti925t_initfn },
{ .name = "sa1100", .initfn = sa1100_initfn },
{ .name = "sa1110", .initfn = sa1110_initfn },
@@ -2564,6 +2575,7 @@ static const ARMCPUInfo arm_cpus[] = {
{ .name = "pxa270-b1", .initfn = pxa270b1_initfn },
{ .name = "pxa270-c0", .initfn = pxa270c0_initfn },
{ .name = "pxa270-c5", .initfn = pxa270c5_initfn },
+#endif
#ifndef TARGET_AARCH64
{ .name = "max", .initfn = arm_max_initfn },
#endif
--
2.20.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 2/4] target/arm: Restrict R and M profiles to TCG
2019-08-23 13:58 [Qemu-devel] [PATCH 0/4] Support disabling TCG on ARM (part 2) Philippe Mathieu-Daudé
2019-08-23 13:58 ` [Qemu-devel] [PATCH 1/4] target/arm: Restrict pre-ARMv7 cpus to TCG Philippe Mathieu-Daudé
@ 2019-08-23 13:58 ` Philippe Mathieu-Daudé
2019-08-23 17:06 ` Richard Henderson
2019-08-23 13:58 ` [Qemu-devel] [PATCH 3/4] RFC target/arm: Do not build pre-ARMv7 cpus when using KVM Philippe Mathieu-Daudé
2019-08-23 13:58 ` [Qemu-devel] [PATCH 4/4] RFC target/arm: Do not build A/M-profile " Philippe Mathieu-Daudé
3 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-23 13:58 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Thomas Huth, qemu-arm, Philippe Mathieu-Daudé,
Peter Maydell
KVM is only able to run A profile cpus.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
target/arm/cpu.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 522485a2de..299c59fde4 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -462,7 +462,9 @@ bool arm_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
return ret;
}
-#if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
+/* CPU models. These are not needed for the AArch64 linux-user build. */
+#if (!defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)) \
+ && defined(CONFIG_TCG)
static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
{
CPUClass *cc = CPU_GET_CLASS(cs);
@@ -1902,8 +1904,6 @@ static void cortex_m0_initfn(Object *obj)
cpu->midr = 0x410cc200;
}
-#endif
-
static void cortex_m3_initfn(Object *obj)
{
ARMCPU *cpu = ARM_CPU(obj);
@@ -2057,6 +2057,8 @@ static void cortex_r5f_initfn(Object *obj)
cpu->isar.mvfr1 = 0x00000011;
}
+#endif
+
static const ARMCPRegInfo cortexa8_cp_reginfo[] = {
{ .name = "L2LOCKDOWN", .cp = 15, .crn = 9, .crm = 0, .opc1 = 1, .opc2 = 0,
.access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0 },
@@ -2544,7 +2546,6 @@ static const ARMCPUInfo arm_cpus[] = {
{ .name = "arm1176", .initfn = arm1176_initfn },
{ .name = "arm11mpcore", .initfn = arm11mpcore_initfn },
{ .name = "cortex-m0", .initfn = cortex_m0_initfn,
-#endif
.class_init = arm_v7m_class_init },
{ .name = "cortex-m3", .initfn = cortex_m3_initfn,
.class_init = arm_v7m_class_init },
@@ -2554,6 +2555,7 @@ static const ARMCPUInfo arm_cpus[] = {
.class_init = arm_v7m_class_init },
{ .name = "cortex-r5", .initfn = cortex_r5_initfn },
{ .name = "cortex-r5f", .initfn = cortex_r5f_initfn },
+#endif
{ .name = "cortex-a7", .initfn = cortex_a7_initfn },
{ .name = "cortex-a8", .initfn = cortex_a8_initfn },
{ .name = "cortex-a9", .initfn = cortex_a9_initfn },
--
2.20.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 3/4] RFC target/arm: Do not build pre-ARMv7 cpus when using KVM
2019-08-23 13:58 [Qemu-devel] [PATCH 0/4] Support disabling TCG on ARM (part 2) Philippe Mathieu-Daudé
2019-08-23 13:58 ` [Qemu-devel] [PATCH 1/4] target/arm: Restrict pre-ARMv7 cpus to TCG Philippe Mathieu-Daudé
2019-08-23 13:58 ` [Qemu-devel] [PATCH 2/4] target/arm: Restrict R and M profiles " Philippe Mathieu-Daudé
@ 2019-08-23 13:58 ` Philippe Mathieu-Daudé
2019-08-23 14:28 ` Thomas Huth
2019-08-23 17:12 ` Richard Henderson
2019-08-23 13:58 ` [Qemu-devel] [PATCH 4/4] RFC target/arm: Do not build A/M-profile " Philippe Mathieu-Daudé
3 siblings, 2 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-23 13:58 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Thomas Huth, qemu-arm, Philippe Mathieu-Daudé,
Peter Maydell
A KVM-only build won't be able to run pre-ARMv7 cpus, disable them.
If KVM is not enabled, they are enabled by default.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Sadly this does not work with --enable-tcg --enable-kvm dual config.
---
default-configs/arm-softmmu.mak | 33 ++++++++++++++++-----------------
hw/arm/Kconfig | 26 ++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 17 deletions(-)
diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 1f2e0e7fde..081d507c87 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -9,34 +9,33 @@ CONFIG_ARM_V7M=y
CONFIG_ARM_VIRT=y
CONFIG_CUBIEBOARD=y
CONFIG_EXYNOS4=y
-CONFIG_HIGHBANK=y
-CONFIG_INTEGRATOR=y
CONFIG_FSL_IMX31=y
-CONFIG_MUSICPAL=y
CONFIG_MUSCA=y
-CONFIG_CHEETAH=y
-CONFIG_SX1=y
-CONFIG_NSERIES=y
CONFIG_STELLARIS=y
CONFIG_REALVIEW=y
-CONFIG_VERSATILE=y
CONFIG_VEXPRESS=y
CONFIG_ZYNQ=y
-CONFIG_MAINSTONE=y
-CONFIG_GUMSTIX=y
-CONFIG_SPITZ=y
-CONFIG_TOSA=y
-CONFIG_Z2=y
-CONFIG_COLLIE=y
-CONFIG_ASPEED_SOC=y
CONFIG_NETDUINO2=y
CONFIG_MPS2=y
CONFIG_RASPI=y
-CONFIG_DIGIC=y
CONFIG_SABRELITE=y
CONFIG_EMCRAFT_SF2=y
-CONFIG_MICROBIT=y
-CONFIG_FSL_IMX25=y
CONFIG_FSL_IMX7=y
CONFIG_FSL_IMX6UL=y
CONFIG_SEMIHOSTING=y
+#CONFIG_CHEETAH=y
+#CONFIG_SX1=y
+#CONFIG_DIGIC=y
+#CONFIG_INTEGRATOR=y
+#CONFIG_MUSICPAL=y
+#CONFIG_MAINSTONE=y
+#CONFIG_GUMSTIX=y
+#CONFIG_SPITZ=y
+#CONFIG_TOSA=y
+#CONFIG_COLLIE=y
+#CONFIG_VERSATILE=y
+#CONFIG_FSL_IMX25=y
+#CONFIG_ASPEED_SOC=y
+#CONFIG_NSERIES=y
+#CONFIG_HIGHBANK=n
+#CONFIG_MICROBIT=n
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 76a2a6bcbf..902cceca7e 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -1,3 +1,18 @@
+config ARM_V4
+ default y
+ depends on !KVM
+ bool
+
+config ARM_V5
+ default y
+ depends on !KVM
+ bool
+
+config ARM_V6
+ default y
+ depends on !KVM
+ bool
+
config ARM_VIRT
bool
imply PCI_DEVICES
@@ -23,6 +38,7 @@ config ARM_VIRT
config CHEETAH
bool
+ select ARM_V4
select OMAP
select TSC210X
@@ -32,6 +48,7 @@ config CUBIEBOARD
config DIGIC
bool
+ select ARM_V5
select PTIMER
select PFLASH_CFI02
@@ -61,6 +78,7 @@ config HIGHBANK
config INTEGRATOR
bool
+ select ARM_V5
select ARM_TIMER
select INTEGRATOR_DEBUG
select PL011 # UART
@@ -86,6 +104,7 @@ config MUSCA
config MUSICPAL
bool
+ select ARM_V5
select BITBANG_I2C
select MARVELL_88W8618
select PTIMER
@@ -99,6 +118,7 @@ config NETDUINO2
config NSERIES
bool
+ select ARM_V6
select OMAP
select TMP105 # tempature sensor
select BLIZZARD # LCD/TV controller
@@ -121,6 +141,7 @@ config OMAP
config PXA2XX
bool
+ select ARM_V5
select FRAMEBUFFER
select I2C
select SERIAL
@@ -232,10 +253,12 @@ config COLLIE
config SX1
bool
+ select ARM_V4
select OMAP
config VERSATILE
bool
+ select ARM_V5
select ARM_TIMER # sp804
select PFLASH_CFI01
select LSI_SCSI_PCI
@@ -327,6 +350,7 @@ config XLNX_VERSAL
config FSL_IMX25
bool
+ select ARM_V5
select IMX
select IMX_FEC
select IMX_I2C
@@ -334,6 +358,7 @@ config FSL_IMX25
config FSL_IMX31
bool
+ select ARM_V6
select SERIAL
select IMX
select IMX_I2C
@@ -349,6 +374,7 @@ config FSL_IMX6
config ASPEED_SOC
bool
+ select ARM_V5
select DS1338
select FTGMAC100
select I2C
--
2.20.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 4/4] RFC target/arm: Do not build A/M-profile cpus when using KVM
2019-08-23 13:58 [Qemu-devel] [PATCH 0/4] Support disabling TCG on ARM (part 2) Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2019-08-23 13:58 ` [Qemu-devel] [PATCH 3/4] RFC target/arm: Do not build pre-ARMv7 cpus when using KVM Philippe Mathieu-Daudé
@ 2019-08-23 13:58 ` Philippe Mathieu-Daudé
2019-08-23 17:14 ` Richard Henderson
3 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-23 13:58 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Thomas Huth, qemu-arm, Philippe Mathieu-Daudé,
Peter Maydell
A KVM-only build won't be able to run A or M-profile cpus,
disable them.
If KVM is not enabled, they are enabled by default.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Sadly this does not work with --enable-tcg --enable-kvm dual config.
---
default-configs/arm-softmmu.mak | 14 ++++++--------
hw/arm/Kconfig | 16 +++++++++++++---
2 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 081d507c87..3995c4bb65 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -1,25 +1,18 @@
# Default configuration for arm-softmmu
-# TODO: ARM_V7M is currently always required - make this more flexible!
-CONFIG_ARM_V7M=y
-
# CONFIG_PCI_DEVICES=n
# CONFIG_TEST_DEVICES=n
+CONFIG_ARM_V7M=n
CONFIG_ARM_VIRT=y
CONFIG_CUBIEBOARD=y
CONFIG_EXYNOS4=y
CONFIG_FSL_IMX31=y
-CONFIG_MUSCA=y
-CONFIG_STELLARIS=y
CONFIG_REALVIEW=y
CONFIG_VEXPRESS=y
CONFIG_ZYNQ=y
-CONFIG_NETDUINO2=y
-CONFIG_MPS2=y
CONFIG_RASPI=y
CONFIG_SABRELITE=y
-CONFIG_EMCRAFT_SF2=y
CONFIG_FSL_IMX7=y
CONFIG_FSL_IMX6UL=y
CONFIG_SEMIHOSTING=y
@@ -38,4 +31,9 @@ CONFIG_SEMIHOSTING=y
#CONFIG_ASPEED_SOC=y
#CONFIG_NSERIES=y
#CONFIG_HIGHBANK=n
+#CONFIG_MUSCA=n
+#CONFIG_STELLARIS=n
+#CONFIG_NETDUINO2=n
+#CONFIG_MPS2=n
+#CONFIG_EMCRAFT_SF2=n
#CONFIG_MICROBIT=n
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 902cceca7e..9b16dfaa5f 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -13,6 +13,18 @@ config ARM_V6
depends on !KVM
bool
+# ARM Microcontroller profile
+config ARM_V7M
+ default y
+ depends on !KVM
+ bool
+
+# ARM Realtime profile
+config ARM_V7R
+ default y
+ depends on !KVM
+ bool
+
config ARM_VIRT
bool
imply PCI_DEVICES
@@ -298,9 +310,6 @@ config ZYNQ
select XILINX_SPIPS
select ZYNQ_DEVCFG
-config ARM_V7M
- bool
-
config ALLWINNER_A10
bool
select AHCI
@@ -328,6 +337,7 @@ config STM32F205_SOC
config XLNX_ZYNQMP_ARM
bool
+ select ARM_V7R
select AHCI
select ARM_GIC
select CADENCE
--
2.20.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH 3/4] RFC target/arm: Do not build pre-ARMv7 cpus when using KVM
2019-08-23 13:58 ` [Qemu-devel] [PATCH 3/4] RFC target/arm: Do not build pre-ARMv7 cpus when using KVM Philippe Mathieu-Daudé
@ 2019-08-23 14:28 ` Thomas Huth
2019-08-29 18:19 ` Philippe Mathieu-Daudé
2019-08-23 17:12 ` Richard Henderson
1 sibling, 1 reply; 14+ messages in thread
From: Thomas Huth @ 2019-08-23 14:28 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, qemu-arm, Peter Maydell
On 8/23/19 3:58 PM, Philippe Mathieu-Daudé wrote:
> A KVM-only build won't be able to run pre-ARMv7 cpus, disable them.
>
> If KVM is not enabled, they are enabled by default.
[...]
> config CHEETAH
> bool
> + select ARM_V4
> select OMAP
> select TSC210X
Are you sure about the "enabled by default" ? There is not "default y"
here, is it?
Also I'm not sure whether it's such a good idea to always disable the
config switches in default-configs/arm-softmmu.mak ... if somebody wants
to build such a restricted QEMU, don't they have to maintain their own
set of config files anyway?
I think we should maybe rather rework the default-configs directory:
Rename the default to "config/default/" instead and then we can add
other subfolders with such special configurations, e.g. config/nemu/ or
config/lean-kvm/ or however you want to call it. Then add a new switch
to the configure script to be able to use the configs from such a
different folder.
Thomas
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH 1/4] target/arm: Restrict pre-ARMv7 cpus to TCG
2019-08-23 13:58 ` [Qemu-devel] [PATCH 1/4] target/arm: Restrict pre-ARMv7 cpus to TCG Philippe Mathieu-Daudé
@ 2019-08-23 17:04 ` Richard Henderson
2019-08-29 18:04 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 14+ messages in thread
From: Richard Henderson @ 2019-08-23 17:04 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Thomas Huth, qemu-arm, Peter Maydell
On 8/23/19 6:58 AM, Philippe Mathieu-Daudé wrote:
> @@ -2535,6 +2544,7 @@ static const ARMCPUInfo arm_cpus[] = {
> { .name = "arm1176", .initfn = arm1176_initfn },
> { .name = "arm11mpcore", .initfn = arm11mpcore_initfn },
> { .name = "cortex-m0", .initfn = cortex_m0_initfn,
> +#endif
> .class_init = arm_v7m_class_init },
> { .name = "cortex-m3", .initfn = cortex_m3_initfn,
> .class_init = arm_v7m_class_init },
Ifdef is misplaced. This shouldn't even compile without CONFIG_TCG.
Also, m-profile shouldn't work with kvm either, so I think the endif should go
below cortex-m33.
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH 2/4] target/arm: Restrict R and M profiles to TCG
2019-08-23 13:58 ` [Qemu-devel] [PATCH 2/4] target/arm: Restrict R and M profiles " Philippe Mathieu-Daudé
@ 2019-08-23 17:06 ` Richard Henderson
0 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2019-08-23 17:06 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Thomas Huth, qemu-arm, Peter Maydell
On 8/23/19 6:58 AM, Philippe Mathieu-Daudé wrote:
> @@ -2544,7 +2546,6 @@ static const ARMCPUInfo arm_cpus[] = {
> { .name = "arm1176", .initfn = arm1176_initfn },
> { .name = "arm11mpcore", .initfn = arm11mpcore_initfn },
> { .name = "cortex-m0", .initfn = cortex_m0_initfn,
> -#endif
> .class_init = arm_v7m_class_init },
> { .name = "cortex-m3", .initfn = cortex_m3_initfn,
> .class_init = arm_v7m_class_init },
> @@ -2554,6 +2555,7 @@ static const ARMCPUInfo arm_cpus[] = {
> .class_init = arm_v7m_class_init },
> { .name = "cortex-r5", .initfn = cortex_r5_initfn },
> { .name = "cortex-r5f", .initfn = cortex_r5f_initfn },
> +#endif
> { .name = "cortex-a7", .initfn = cortex_a7_initfn },
> { .name = "cortex-a8", .initfn = cortex_a8_initfn },
> { .name = "cortex-a9", .initfn = cortex_a9_initfn },
Ah, patch 1 fixed here. I think these should be squashed.
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH 3/4] RFC target/arm: Do not build pre-ARMv7 cpus when using KVM
2019-08-23 13:58 ` [Qemu-devel] [PATCH 3/4] RFC target/arm: Do not build pre-ARMv7 cpus when using KVM Philippe Mathieu-Daudé
2019-08-23 14:28 ` Thomas Huth
@ 2019-08-23 17:12 ` Richard Henderson
2019-08-29 18:08 ` Philippe Mathieu-Daudé
1 sibling, 1 reply; 14+ messages in thread
From: Richard Henderson @ 2019-08-23 17:12 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Thomas Huth, qemu-arm, Peter Maydell
On 8/23/19 6:58 AM, Philippe Mathieu-Daudé wrote:
> A KVM-only build won't be able to run pre-ARMv7 cpus, disable them.
>
> If KVM is not enabled, they are enabled by default.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> Sadly this does not work with --enable-tcg --enable-kvm dual config.
> ---
Huh? --enable-kvm does not imply --disable-tcg.
> +config ARM_V4
> + default y
> + depends on !KVM
> + bool
This should surely be "depends on TCG".
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH 4/4] RFC target/arm: Do not build A/M-profile cpus when using KVM
2019-08-23 13:58 ` [Qemu-devel] [PATCH 4/4] RFC target/arm: Do not build A/M-profile " Philippe Mathieu-Daudé
@ 2019-08-23 17:14 ` Richard Henderson
0 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2019-08-23 17:14 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Thomas Huth, qemu-arm, Peter Maydell
On 8/23/19 6:58 AM, Philippe Mathieu-Daudé wrote:
> +# ARM Microcontroller profile
> +config ARM_V7M
> + default y
> + depends on !KVM
> + bool
Likewise as for the previous patch, "depends on TCG".
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH 1/4] target/arm: Restrict pre-ARMv7 cpus to TCG
2019-08-23 17:04 ` Richard Henderson
@ 2019-08-29 18:04 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-29 18:04 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Paolo Bonzini, Thomas Huth, qemu-arm, Peter Maydell
On 8/23/19 7:04 PM, Richard Henderson wrote:
> On 8/23/19 6:58 AM, Philippe Mathieu-Daudé wrote:
>> @@ -2535,6 +2544,7 @@ static const ARMCPUInfo arm_cpus[] = {
>> { .name = "arm1176", .initfn = arm1176_initfn },
>> { .name = "arm11mpcore", .initfn = arm11mpcore_initfn },
>> { .name = "cortex-m0", .initfn = cortex_m0_initfn,
>> +#endif
>> .class_init = arm_v7m_class_init },
>> { .name = "cortex-m3", .initfn = cortex_m3_initfn,
>> .class_init = arm_v7m_class_init },
>
> Ifdef is misplaced. This shouldn't even compile without CONFIG_TCG.
What a shame... I hope I messed this due to a failed rebase...
> Also, m-profile shouldn't work with kvm either, so I think the endif should go
> below cortex-m33.
Obviously.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH 3/4] RFC target/arm: Do not build pre-ARMv7 cpus when using KVM
2019-08-23 17:12 ` Richard Henderson
@ 2019-08-29 18:08 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-29 18:08 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Paolo Bonzini, Thomas Huth, qemu-arm, Peter Maydell
On 8/23/19 7:12 PM, Richard Henderson wrote:
> On 8/23/19 6:58 AM, Philippe Mathieu-Daudé wrote:
>> A KVM-only build won't be able to run pre-ARMv7 cpus, disable them.
>>
>> If KVM is not enabled, they are enabled by default.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> Sadly this does not work with --enable-tcg --enable-kvm dual config.
>> ---
>
> Huh? --enable-kvm does not imply --disable-tcg.
That would have made my life easier ;)
>> +config ARM_V4
>> + default y
>> + depends on !KVM
>> + bool
>
> This should surely be "depends on TCG".
I restricted this to KVM because this is the only one I know and got
confirmation by Peter. I don't know about other accelerators but I'll
happily take your suggestion!
Thanks,
Phil.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH 3/4] RFC target/arm: Do not build pre-ARMv7 cpus when using KVM
2019-08-23 14:28 ` Thomas Huth
@ 2019-08-29 18:19 ` Philippe Mathieu-Daudé
2019-08-30 5:35 ` Thomas Huth
0 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-29 18:19 UTC (permalink / raw)
To: Thomas Huth, qemu-devel; +Cc: Paolo Bonzini, qemu-arm, Peter Maydell
Hi Thomas,
On 8/23/19 4:28 PM, Thomas Huth wrote:
> On 8/23/19 3:58 PM, Philippe Mathieu-Daudé wrote:
>> A KVM-only build won't be able to run pre-ARMv7 cpus, disable them.
>>
>> If KVM is not enabled, they are enabled by default.
> [...]
>> config CHEETAH
>> bool
>> + select ARM_V4
>> select OMAP
>> select TSC210X
>
> Are you sure about the "enabled by default" ? There is not "default y"
> here, is it?
What I mean is if you build with --disable-kvm, this selects
--enable-tcg which provides the pre-ARMv7 cpus. So to make no changes, I
also added:
config ARM_V4
default y
Which include the "default y".
>
> Also I'm not sure whether it's such a good idea to always disable the
> config switches in default-configs/arm-softmmu.mak ... if somebody wants
> to build such a restricted QEMU, don't they have to maintain their own
> set of config files anyway?
Ah... I followed your example:
$ git show 9e5c2056d1e
commit 9e5c2056d1e80f344a0c412d7a3d847db1f4e034
Author: Thomas Huth <thuth@redhat.com>
Date: Tue Jan 29 10:42:14 2019 +0100
s390x: express dependencies with Kconfig
Instead of hard-coding all config switches in the config file
default-configs/s390x-softmmu.mak, let's use the new Kconfig files
to express the necessary dependencies: The S390_CCW_VIRTIO config switch
for the "s390-ccw-virtio" machine now selects all non-optional devices.
And since we already have the VIRTIO_PCI and VIRTIO_MMIO config switches
for the other two virtio transports, this patch also introduces a new
config switch VIRTIO_CCW for the third, s390x-specific virtio transport,
so that all three virtio transports are now handled in the same way.
diff --git a/default-configs/s390x-softmmu.mak
b/default-configs/s390x-softmmu.mak
@@ -1,9 +1,13 @@
-CONFIG_PCI=y
-CONFIG_VIRTIO_PCI=y
-CONFIG_SCLPCONSOLE=y
-CONFIG_TERMINAL3270=y
-CONFIG_S390_FLIC=y
-CONFIG_WDT_DIAG288=y
+# Default configuration for s390x-softmmu
+
+# Uncomment the following lines to disable these optional devices:
+#
+#CONFIG_TERMINAL3270=n
+#CONFIG_VFIO_AP=n
+#CONFIG_VFIO_CCW=n
+#CONFIG_VIRTIO_PCI=n
+#CONFIG_WDT_DIAG288=n
+
+# Boards:
+#
CONFIG_S390_CCW_VIRTIO=y
-CONFIG_VFIO_CCW=y
-CONFIG_VFIO_AP=y
OK now I see, I should have added your comment and use the opposite form
(because now these boards are all enabled) so 's/=y/=n' in my patch.
> I think we should maybe rather rework the default-configs directory:
> Rename the default to "config/default/" instead and then we can add
> other subfolders with such special configurations, e.g. config/nemu/ or
> config/lean-kvm/ or however you want to call it. Then add a new switch
> to the configure script to be able to use the configs from such a
> different folder.
OK so if someone wants a special config, he'd know the config values to
select, so it is pointless/confusing to keep them commented.
Are you suggesting to simply remove the default entries? Such:
-- >8 --
@@ -9,34 +9,33 @@ CONFIG_ARM_V7M=y
CONFIG_ARM_VIRT=y
CONFIG_CUBIEBOARD=y
CONFIG_EXYNOS4=y
-CONFIG_HIGHBANK=y
-CONFIG_INTEGRATOR=y
CONFIG_FSL_IMX31=y
-CONFIG_MUSICPAL=y
CONFIG_MUSCA=y
-CONFIG_CHEETAH=y
-CONFIG_SX1=y
-CONFIG_NSERIES=y
CONFIG_STELLARIS=y
CONFIG_REALVIEW=y
-CONFIG_VERSATILE=y
CONFIG_VEXPRESS=y
CONFIG_ZYNQ=y
-CONFIG_MAINSTONE=y
-CONFIG_GUMSTIX=y
-CONFIG_SPITZ=y
-CONFIG_TOSA=y
-CONFIG_Z2=y
-CONFIG_COLLIE=y
-CONFIG_ASPEED_SOC=y
CONFIG_NETDUINO2=y
CONFIG_MPS2=y
CONFIG_RASPI=y
-CONFIG_DIGIC=y
CONFIG_SABRELITE=y
CONFIG_EMCRAFT_SF2=y
-CONFIG_MICROBIT=y
-CONFIG_FSL_IMX25=y
CONFIG_FSL_IMX7=y
CONFIG_FSL_IMX6UL=y
CONFIG_SEMIHOSTING=y
---
Thanks,
Phil.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH 3/4] RFC target/arm: Do not build pre-ARMv7 cpus when using KVM
2019-08-29 18:19 ` Philippe Mathieu-Daudé
@ 2019-08-30 5:35 ` Thomas Huth
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2019-08-30 5:35 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, qemu-arm, Peter Maydell
On 29/08/2019 20.19, Philippe Mathieu-Daudé wrote:
> Hi Thomas,
>
> On 8/23/19 4:28 PM, Thomas Huth wrote:
>> On 8/23/19 3:58 PM, Philippe Mathieu-Daudé wrote:
>>> A KVM-only build won't be able to run pre-ARMv7 cpus, disable them.
>>>
>>> If KVM is not enabled, they are enabled by default.
>> [...]
>>> config CHEETAH
>>> bool
>>> + select ARM_V4
>>> select OMAP
>>> select TSC210X
>>
>> Are you sure about the "enabled by default" ? There is not "default y"
>> here, is it?
>
> What I mean is if you build with --disable-kvm, this selects
> --enable-tcg which provides the pre-ARMv7 cpus. So to make no changes, I
> also added:
>
> config ARM_V4
> default y
>
> Which include the "default y".
Well, so the ARM_V4 config switch is enabled by default. But where is
the CHEETAH config switch enabled now?
>> I think we should maybe rather rework the default-configs directory:
>> Rename the default to "config/default/" instead and then we can add
>> other subfolders with such special configurations, e.g. config/nemu/ or
>> config/lean-kvm/ or however you want to call it. Then add a new switch
>> to the configure script to be able to use the configs from such a
>> different folder.
>
> OK so if someone wants a special config, he'd know the config values to
> select, so it is pointless/confusing to keep them commented.
> Are you suggesting to simply remove the default entries?
Certainly not! I meant to keep the current file (with everything
enabled) in config/default/, and to add another config file to
config/lean-kvm/ where the TCG-only boards are disabled. Then the user
can easily run "./configure --build-config-dir=config/lean-kvm/" to
enable these settings.
Thomas
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2019-08-30 5:37 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-23 13:58 [Qemu-devel] [PATCH 0/4] Support disabling TCG on ARM (part 2) Philippe Mathieu-Daudé
2019-08-23 13:58 ` [Qemu-devel] [PATCH 1/4] target/arm: Restrict pre-ARMv7 cpus to TCG Philippe Mathieu-Daudé
2019-08-23 17:04 ` Richard Henderson
2019-08-29 18:04 ` Philippe Mathieu-Daudé
2019-08-23 13:58 ` [Qemu-devel] [PATCH 2/4] target/arm: Restrict R and M profiles " Philippe Mathieu-Daudé
2019-08-23 17:06 ` Richard Henderson
2019-08-23 13:58 ` [Qemu-devel] [PATCH 3/4] RFC target/arm: Do not build pre-ARMv7 cpus when using KVM Philippe Mathieu-Daudé
2019-08-23 14:28 ` Thomas Huth
2019-08-29 18:19 ` Philippe Mathieu-Daudé
2019-08-30 5:35 ` Thomas Huth
2019-08-23 17:12 ` Richard Henderson
2019-08-29 18:08 ` Philippe Mathieu-Daudé
2019-08-23 13:58 ` [Qemu-devel] [PATCH 4/4] RFC target/arm: Do not build A/M-profile " Philippe Mathieu-Daudé
2019-08-23 17:14 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).