i386/kvm: handle Xen HVM cpuid leaves
commitf66b8a83c5723e5337d522ba2b87bf8c7e306445
authorJoao Martins <joao.m.martins@oracle.com>
Tue, 6 Dec 2022 10:48:53 +0000 (6 10:48 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 1 Mar 2023 08:22:49 +0000 (1 08:22 +0000)
treeccb31034e77473b4b20be5273c4f8706bf80b781
parent61491cf4410423b2d3162143c43b9aeb4ccf7f26
i386/kvm: handle Xen HVM cpuid leaves

Introduce support for emulating CPUID for Xen HVM guests. It doesn't make
sense to advertise the KVM leaves to a Xen guest, so do Xen unconditionally
when the xen-version machine property is set.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
[dwmw2: Obtain xen_version from KVM property, make it automatic]
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
target/i386/cpu.c
target/i386/cpu.h
target/i386/kvm/kvm.c
target/i386/kvm/xen-emu.c
target/i386/kvm/xen-emu.h