[PATCH 2/5] hw/arm: Restrict ARMv7 A-profile cpus to TCG accel

Philippe Mathieu-Daudé posted 5 patches 5 years ago
There is a newer version of this series
[PATCH 2/5] hw/arm: Restrict ARMv7 A-profile cpus to TCG accel
Posted by Philippe Mathieu-Daudé 5 years ago
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").

The following machines are no more built when TCG is disabled:

  - cubieboard           cubietech cubieboard (Cortex-A8)
  - mcimx6ul-evk         Freescale i.MX6UL Evaluation Kit (Cortex A7)
  - mcimx7d-sabre        Freescale i.MX7 DUAL SABRE (Cortex A7)
  - npcm750-evb          Nuvoton NPCM750 Evaluation Board (Cortex A9)
  - nuri                 Samsung NURI board (Exynos4210)
  - orangepi-pc          Orange Pi PC (Cortex-A7)
  - quanta-gsj           Quanta GSJ (Cortex A9)
  - realview-pb-a8       ARM RealView Platform Baseboard for Cortex-A8
  - realview-pbx-a9      ARM RealView Platform Baseboard Explore for Cortex-A9
  - sabrelite            Freescale i.MX6 Quad SABRE Lite Board (Cortex A9)
  - smdkc210             Samsung SMDKC210 board (Exynos4210)
  - vexpress-a15         ARM Versatile Express for Cortex-A15
  - vexpress-a9          ARM Versatile Express for Cortex-A9
  - xilinx-zynq-a9       Xilinx Zynq Platform Baseboard for Cortex-A9

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 default-configs/devices/arm-softmmu.mak | 10 ----------
 hw/arm/Kconfig                          | 11 +++++++++++
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/default-configs/devices/arm-softmmu.mak b/default-configs/devices/arm-softmmu.mak
index 7d55c156bab..1ffa3dbe4bf 100644
--- a/default-configs/devices/arm-softmmu.mak
+++ b/default-configs/devices/arm-softmmu.mak
@@ -3,13 +3,3 @@
 # CONFIG_PCI_DEVICES=n
 # CONFIG_TEST_DEVICES=n
 
-CONFIG_CUBIEBOARD=y
-CONFIG_EXYNOS4=y
-CONFIG_REALVIEW=y
-CONFIG_VEXPRESS=y
-CONFIG_ZYNQ=y
-CONFIG_NPCM7XX=y
-CONFIG_SABRELITE=y
-CONFIG_FSL_IMX7=y
-CONFIG_FSL_IMX6UL=y
-CONFIG_ALLWINNER_H3=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 043710be3df..263f22a80c1 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -39,6 +39,7 @@ config CHEETAH
 
 config CUBIEBOARD
     bool
+    default y if TCG && ARM
     select ALLWINNER_A10
 
 config DIGIC
@@ -50,6 +51,7 @@ config DIGIC
 
 config EXYNOS4
     bool
+    default y if TCG && ARM
     select A9MPCORE
     select I2C
     select LAN9118
@@ -198,6 +200,7 @@ config Z2
 
 config REALVIEW
     bool
+    default y if TCG && ARM
     imply PCI_DEVICES
     imply PCI_TESTDEV
     select SMC91C111
@@ -241,6 +244,7 @@ config SBSA_REF
 
 config SABRELITE
     bool
+    default y if TCG && ARM
     select FSL_IMX6
     select SSI_M25P80
 
@@ -292,6 +296,7 @@ config VERSATILE
 
 config VEXPRESS
     bool
+    default y if TCG && ARM
     select A9MPCORE
     select A15MPCORE
     select ARM_MPTIMER
@@ -307,6 +312,7 @@ config VEXPRESS
 
 config ZYNQ
     bool
+    default y if TCG && ARM
     select A9MPCORE
     select CADENCE # UART
     select PFLASH_CFI02
@@ -331,6 +337,7 @@ config ALLWINNER_A10
 
 config ALLWINNER_H3
     bool
+    default y if TCG && ARM
     select ALLWINNER_A10_PIT
     select ALLWINNER_SUN8I_EMAC
     select SERIAL
@@ -395,6 +402,7 @@ config XLNX_VERSAL
 
 config NPCM7XX
     bool
+    default y if TCG && ARM
     select A9MPCORE
     select ARM_GIC
     select PL310  # cache controller
@@ -424,6 +432,7 @@ config FSL_IMX31
 
 config FSL_IMX6
     bool
+    default y if TCG && ARM
     select A9MPCORE
     select IMX
     select IMX_FEC
@@ -467,6 +476,7 @@ config MPS2
 
 config FSL_IMX7
     bool
+    default y if TCG && ARM
     imply PCI_DEVICES
     imply TEST_DEVICES
     select A15MPCORE
@@ -484,6 +494,7 @@ config ARM_SMMUV3
 
 config FSL_IMX6UL
     bool
+    default y if TCG && ARM
     select A15MPCORE
     select IMX
     select IMX_FEC
-- 
2.26.2

Re: [PATCH 2/5] hw/arm: Restrict ARMv7 A-profile cpus to TCG accel
Posted by Philippe Mathieu-Daudé 5 years ago
On 1/31/21 5:44 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").
> 
> The following machines are no more built when TCG is disabled:
> 
>   - cubieboard           cubietech cubieboard (Cortex-A8)
>   - mcimx6ul-evk         Freescale i.MX6UL Evaluation Kit (Cortex A7)
>   - mcimx7d-sabre        Freescale i.MX7 DUAL SABRE (Cortex A7)
>   - npcm750-evb          Nuvoton NPCM750 Evaluation Board (Cortex A9)
>   - nuri                 Samsung NURI board (Exynos4210)
>   - orangepi-pc          Orange Pi PC (Cortex-A7)
>   - quanta-gsj           Quanta GSJ (Cortex A9)
>   - realview-pb-a8       ARM RealView Platform Baseboard for Cortex-A8
>   - realview-pbx-a9      ARM RealView Platform Baseboard Explore for Cortex-A9
>   - sabrelite            Freescale i.MX6 Quad SABRE Lite Board (Cortex A9)
>   - smdkc210             Samsung SMDKC210 board (Exynos4210)
>   - vexpress-a15         ARM Versatile Express for Cortex-A15
>   - vexpress-a9          ARM Versatile Express for Cortex-A9
>   - xilinx-zynq-a9       Xilinx Zynq Platform Baseboard for Cortex-A9
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  default-configs/devices/arm-softmmu.mak | 10 ----------
>  hw/arm/Kconfig                          | 11 +++++++++++
>  2 files changed, 11 insertions(+), 10 deletions(-)
...

>  
>  config REALVIEW
>      bool
> +    default y if TCG && ARM
>      imply PCI_DEVICES
>      imply PCI_TESTDEV
>      select SMC91C111
> @@ -241,6 +244,7 @@ config SBSA_REF
>  
>  config SABRELITE
>      bool
> +    default y if TCG && ARM
>      select FSL_IMX6
>      select SSI_M25P80
>  
> @@ -292,6 +296,7 @@ config VERSATILE
>  
>  config VEXPRESS
>      bool
> +    default y if TCG && ARM
>      select A9MPCORE
>      select A15MPCORE
>      select ARM_MPTIMER
> @@ -307,6 +312,7 @@ config VEXPRESS
>  
>  config ZYNQ
>      bool
> +    default y if TCG && ARM
>      select A9MPCORE
>      select CADENCE # UART
>      select PFLASH_CFI02

Missing:
-- >8 --
diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c
index cb0409c5a11..c1746284ee2 100644
--- a/tests/qtest/cdrom-test.c
+++ b/tests/qtest/cdrom-test.c
@@ -225,10 +225,11 @@ int main(int argc, char **argv)
 #ifdef CONFIG_TCG
             "realview-eb",
             "realview-eb-mpcore",
-#endif /* CONFIG_TCG */
             "realview-pb-a8",
             "realview-pbx-a9", "versatileab", "versatilepb",
"vexpress-a15",
-            "vexpress-a9", "virt", NULL
+            "vexpress-a9",
+#endif /* CONFIG_TCG */
+            "virt", NULL
         };
         add_cdrom_param_tests(armmachines);
     } else {
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index c83bc211b6a..d8ebd5bf98e 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -159,10 +159,10 @@
   (cpu != 'arm' ? ['bios-tables-test'] : []) +
                         \
   (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ?
['tpm-tis-device-test'] : []) +        \
   (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ?
['tpm-tis-device-swtpm-test'] : []) +  \
+  (config_all.has_key('CONFIG_TCG') ? ['xlnx-can-test'] : []) +  \
   ['arm-cpu-features',
    'numa-test',
    'boot-serial-test',
-   'xlnx-can-test',
    'migration-test']

 qtests_s390x = \
---