aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-05-11 15:30:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-05-11 15:30:34 -0400
commit84c3a0979c4c29711807747280dfecbb54b8af7c (patch)
tree1df3ac089378c58fa97e24532680c7795e8ba379
parentbe83bbf806822b1b89e0a0f23cd87cddc409e429 (diff)
parentd1ecfa9d1f402366b1776fbf84e635678a51414f (diff)
Merge tag 'for-linus-4.17-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen fix from Juergen Gross: "One fix for the kernel running as a fully virtualized guest using PV drivers on old Xen hypervisor versions" * tag 'for-linus-4.17-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/xen: Reset VCPU0 info pointer after shared_info remap
-rw-r--r--arch/x86/xen/enlighten_hvm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
index 826898701045..19c1ff542387 100644
--- a/arch/x86/xen/enlighten_hvm.c
+++ b/arch/x86/xen/enlighten_hvm.c
@@ -65,6 +65,19 @@ static void __init xen_hvm_init_mem_mapping(void)
65{ 65{
66 early_memunmap(HYPERVISOR_shared_info, PAGE_SIZE); 66 early_memunmap(HYPERVISOR_shared_info, PAGE_SIZE);
67 HYPERVISOR_shared_info = __va(PFN_PHYS(shared_info_pfn)); 67 HYPERVISOR_shared_info = __va(PFN_PHYS(shared_info_pfn));
68
69 /*
70 * The virtual address of the shared_info page has changed, so
71 * the vcpu_info pointer for VCPU 0 is now stale.
72 *
73 * The prepare_boot_cpu callback will re-initialize it via
74 * xen_vcpu_setup, but we can't rely on that to be called for
75 * old Xen versions (xen_have_vector_callback == 0).
76 *
77 * It is, in any case, bad to have a stale vcpu_info pointer
78 * so reset it now.
79 */
80 xen_vcpu_info_reset(0);
68} 81}
69 82
70static void __init init_hvm_pv_info(void) 83static void __init init_hvm_pv_info(void)