On 10/13/26 12:51, Peter Maydell wrote:
Currently when using KVM on Arm, the normal thing is to use either
the 'host' or 'max' CPU types, both of which give the guest the same
CPU as the host.  We also for legacy reasons allow 'cortex-a53' and
'cortex-a57' CPU types, which will only work when the host CPU is
exactly that matching CPU.  This is because the original idea of the
KVM ABI was that userspace would request a particular CPU type by
setting the target field in the KVM_ARM_VCPU_INIT ioctl to an
appropriate KVM_ARM_TARGET_* constant.  However, it quickly became
clear that this was a bad idea, and now everything uses
KVM_ARM_TARGET_GENERIC_V8; the tiny number of existing CPU-specific
target values behave identically to GENERIC_V8 except that they will
only work if the host CPU matches them.

Future support for "show the KVM guest a CPU type that's not
identical to the host" is going to work by telling it different ID
register values.  Real Cortex-A53 and A57 CPUs are now all over a
decade old and not in widespread use.  Deprecate the ability to use
'-cpu cortex-a53' and '-cpu cortex-a57' with KVM, to get rid of this
odd legacy corner and open up the opportunity in future to support
named CPU types via ID register settings if we want that.

For any situation where the cortex-a53 and cortex-a57 CPU types
currently work with KVM, '-cpu host' or '-cpu max' will have
identical behaviour.  (Though note that if you are using "KVM, but
fall back to TCG" then the fallback under TCG will be different.)

Signed-off-by: Peter Maydell<[email protected]>
---
Personally I doubt anybody is actually using these named
CPU types...
---
  docs/about/deprecated.rst | 13 +++++++++++++
  target/arm/kvm.c          |  7 +++++++
  2 files changed, 20 insertions(+)

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

r~

Reply via email to