On Thu, Aug 13, 2020 at 02:05:13PM +0800, Peng Liang wrote: > In AArch64, guest will read the same values of the ID regsiters with > host. Both of them read the values from arm64_ftr_regs. This patch > series add support to emulate and configure ID registers so that we can > control the value of ID registers that guest read. > > Peng Liang (4): > arm64: add a helper function to traverse arm64_ftr_regs > kvm: arm64: emulate the ID registers > kvm: arm64: make ID registers configurable > kvm: arm64: add KVM_CAP_ARM_CPU_FEATURE extension > > arch/arm64/include/asm/cpufeature.h | 2 ++ > arch/arm64/include/asm/kvm_host.h | 2 ++ > arch/arm64/kernel/cpufeature.c | 13 ++++++++ > arch/arm64/kvm/arm.c | 21 ++++++++++++ > arch/arm64/kvm/sys_regs.c | 50 ++++++++++++++++++++++------- > include/uapi/linux/kvm.h | 12 +++++++ > 6 files changed, 89 insertions(+), 11 deletions(-) > > -- > 2.18.4 > Hi Peng, After having looked at the QEMU series I don't believe this is the right approach to CPU models. As stated in my reply [*] this approach appears to just be shifting the problem wholesale to the user. On the KVM side, I think we should start by auditing all the ID registers to see what should be masked and what should be under user control. Then, we need to consider what MIDR a guest that can migrate between hosts of different MIDRs should have. And that'll require addressing the errata problem in one way or another. [*] https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg02587.html Thanks, drew