On 13.08.2013, at 20:03, Peter Maydell wrote:
These patches add support to target-arm for '-cpu host'.
The general semantics are the same as for ppc and x86 (ie "whatever
the host kernel can support that looks basically like the host
CPU"), but the mechanism is a little different.
The kernel API (currently still proposed rather than implemented,
hence the RFC nature of this patchset) is that the existing
KVM_ARM_VCPU_INIT supports a new 'target' value KVM_ARM_TARGET_HOST,
which it treats as "whatever you are". On the userspace side,
we use this if the kernel supports it. If it doesn't then we
know the kernel must be an A15-on-A15 only one, and so can
safely implement '-cpu host' with KVM_ARM_TARGET_CORTEX_A15.
How do you know what core specific registers QEMU can expect from
this particular CPU? Imagine ARM changes the MMU implementation in
the
next ARMv8 CPU. With -cpu host you wouldn't be able to support
gdbstub
anymore, because you wouldn't know whether the MMU format is the old
or the new one.