]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: x86/xen: fix Xen hypercall page msr handling
authorJoao Martins <joao.m.martins@oracle.com>
Wed, 13 Jun 2018 10:10:37 +0000 (06:10 -0400)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Fri, 29 Jan 2021 16:08:15 +0000 (16:08 +0000)
commitcb380deb6b190ae0143bd24db2016ddce75a036b
tree9946220e9bb8b6d436c2ec14bff6902dfa2bf2bd
parent9a78e15802a87de2b08dfd1bd88e855201d2c8fa
KVM: x86/xen: fix Xen hypercall page msr handling

Xen usually places its MSR at 0x40000000 or 0x40000200 depending on
whether it is running in viridian mode or not. Note that this is not
ABI guaranteed, so it is possible for Xen to advertise the MSR some
place else.

Given the way xen_hvm_config() is handled, if the former address is
selected, this will conflict with Hyper-V's MSR
(HV_X64_MSR_GUEST_OS_ID) which unconditionally uses the same address.

Given that the MSR location is arbitrary, move the xen_hvm_config()
handling to the top of kvm_set_msr_common() before falling through.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
arch/x86/kvm/x86.c