On 1/19/23 09:07, Fabiano Rosas wrote:
Richard Henderson <[email protected]> writes:

On 1/19/23 03:54, Fabiano Rosas wrote:
Move the 64-bit CPUs that are TCG-only:
- cortex-a35
- cortex-a55
- cortex-a72
- cortex-a76
- a64fx
- neoverse-n1

Keep the CPUs that can be used with KVM:
- cortex-a57
- cortex-a53
- max
- host

All of those cpus can be used with kvm, if and only if you have matching 
hardware.  There
is no rationale for considering any of them differently.

But is that allowed by QEMU today? If so I must be missing something. I
see that kvm_arch_init_vcpu looks at cpu->kvm_target, which is only set
at kvm_arm_set_cpu_features_from_host, called from aarch64_host_initfn.

     if (cpu->kvm_target == QEMU_KVM_ARM_TARGET_NONE ||
         !object_dynamic_cast(OBJECT(cpu), TYPE_AARCH64_CPU)) {
         error_report("KVM is not supported for this guest CPU type");
         return -EINVAL;
     }

Hmm, no, you're right. It could guess that some of those could be marked KVM_ARM_TARGET_GENERIC_V8, but there's probably no point, since -cpu {host,max} are the only reasonable options to use with kvm, practically.

Reviewed-by: Richard Henderson <[email protected]>

r~

Reply via email to