The nitro accel does not actually make use of CPU emulation or details: It always uses the host CPU regardless of configuration. Machines for the nitro accel select the host CPU type as default to have a clear statement of the above and to have a unified cpu type across all supported architectures.
The arm64 logic on Linux currently only allows -cpu host for KVM based virtual machines. Add a special case for nitro so that when the nitro accel is active, it allows use of the host cpu type. Signed-off-by: Alexander Graf <[email protected]> --- target/arm/cpu64.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 5d7c6b7fbb..c01051f038 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -765,6 +765,14 @@ static void aarch64_a53_initfn(Object *obj) static void aarch64_host_initfn(Object *obj) { ARMCPU *cpu = ARM_CPU(obj); + +#if defined(CONFIG_NITRO) + if (nitro_enabled()) { + /* The nitro accel uses -cpu host, but does not actually consume it */ + return; + } +#endif + #if defined(CONFIG_KVM) kvm_arm_set_cpu_features_from_host(cpu); if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) { -- 2.47.1 Amazon Web Services Development Center Germany GmbH Tamara-Danz-Str. 13 10243 Berlin Geschaeftsfuehrung: Christof Hellmis, Andreas Stieger Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B Sitz: Berlin Ust-ID: DE 365 538 597
