KVM: x86/xen: re-initialize shared_info if guest (32/64-bit) mode is set
authorPaul Durrant <pdurrant@amazon.com>
Thu, 15 Feb 2024 15:29:06 +0000 (15:29 +0000)
committerSean Christopherson <seanjc@google.com>
Tue, 20 Feb 2024 15:37:48 +0000 (07:37 -0800)
commit18b99e4d6db65fface45f1e9bcd1041d93c1ac66
tree818e13df45bf93848a69386625ba03b07aebbd5a
parentc01c55a34f284d27719638c4398282442c13ca34
KVM: x86/xen: re-initialize shared_info if guest (32/64-bit) mode is set

If the shared_info PFN cache has already been initialized then the content
of the shared_info page needs to be re-initialized whenever the guest
mode is (re)set.
Setting the guest mode is either done explicitly by the VMM via the
KVM_XEN_ATTR_TYPE_LONG_MODE attribute, or implicitly when the guest writes
the MSR to set up the hypercall page.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Link: https://lore.kernel.org/r/20240215152916.1158-12-paul@xen.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/xen.c