target/arm/cpu64: Allow -host for nitro
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 <graf@amazon.com> Link: https://lore.kernel.org/r/20260225220807.33092-8-graf@amazon.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Alexander Graf committed
Feb 25, 2026 at 22:08 UTC
246f0f67271e35e9d1ac178c5fd19372e18e70be
1 file changed
+8
target/arm/cpu64.c
+8
@@ -813,6 +813,14 @@ static void aarch64_a53_initfn(Object *obj)
813
static void aarch64_host_initfn(Object *obj)
814
{
815
ARMCPU *cpu = ARM_CPU(obj);
816
+
817
+#if defined(CONFIG_NITRO)
818
+ if (nitro_enabled()) {
819
+ /* The nitro accel uses -cpu host, but does not actually consume it */
820
+ return;
821
+ }
822
+#endif
823
+
824
#if defined(CONFIG_KVM)
825
kvm_arm_set_cpu_features_from_host(cpu);
826
aarch64_add_sve_properties(obj);