Hi,

On 29/6/25 22:48, Bernhard Beschow wrote:
Allows the imx8mp-evk machine to be run with KVM acceleration as a guest.

Signed-off-by: Bernhard Beschow <shen...@gmail.com>
---
  docs/system/arm/imx8mp-evk.rst |  7 +++++++
  hw/arm/fsl-imx8mp.c            | 33 ++++++++++++++++++++++++++++-----
  hw/arm/imx8mp-evk.c            | 11 +++++++++++
  hw/arm/Kconfig                 |  3 ++-
  hw/arm/meson.build             |  2 +-
  5 files changed, 49 insertions(+), 7 deletions(-)


diff --git a/hw/arm/imx8mp-evk.c b/hw/arm/imx8mp-evk.c
index b3082fa60d..30eb57318d 100644
--- a/hw/arm/imx8mp-evk.c
+++ b/hw/arm/imx8mp-evk.c
@@ -95,9 +95,20 @@ static void imx8mp_evk_init(MachineState *machine)
static void imx8mp_evk_machine_init(MachineClass *mc)
  {
+    static const char *const valid_cpu_types[] = {
+        ARM_CPU_TYPE_NAME("cortex-a53"),
+#ifdef CONFIG_KVM
+        ARM_CPU_TYPE_NAME("host"),

IMO 'host' should be kept for 'virt' machines where we want the cpu
type with the maximum features possible.

For this case where a real SoC is virtualized with KVM, I'd keep the
SoC CPU type. If the host misses Cortex-A53 features, KVM will fail,
otherwise it will disable the extra features and only expose a A53
to the guest.

+#endif /* CONFIG_KVM */
+        NULL
+    };


Reply via email to