Browse Source

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>
master
Alexander Graf 1 month ago
committed by Paolo Bonzini
parent
commit
246f0f6727
  1. 8
      target/arm/cpu64.c

8
target/arm/cpu64.c

@ -813,6 +813,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);
aarch64_add_sve_properties(obj);

Loading…
Cancel
Save