]> xenbits.xensource.com Git - people/pauldu/linux.git/commit
KVM: xen: re-initialize shared_info if guest (32/64-bit) mode is set
authorPaul Durrant <pdurrant@amazon.com>
Wed, 8 Nov 2023 10:06:33 +0000 (10:06 +0000)
committerPaul Durrant <pdurrant@amazon.com>
Tue, 19 Dec 2023 15:56:56 +0000 (15:56 +0000)
commite82b871aedcfc44a1a9c0b4cac85738b5d8635d8
tree5089fd1a3a2905271181ef6406e0de3e072d81b8
parentf20251f0b3931422d4bb99b744ce09c7744ac6a1
KVM: 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>
---
Cc: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: x86@kernel.org
v11:
 - Drop the hunk removing the call to kvm_xen_shared_info_init() when
   KVM_XEN_ATTR_TYPE_SHARED_INFO is set; it was a mistake and causes self-
   test failures.

v10:
 - New in this version.
arch/x86/kvm/xen.c