| From ec982acc2e9f754d321b07a3e391b8874e91dd22 Mon Sep 17 00:00:00 2001 |
| From: Paul Gortmaker <paul.gortmaker@windriver.com> |
| Date: Sat, 2 May 2020 11:39:48 -0400 |
| Subject: [PATCH] kvm: allow shadow_bits to exist in kvm/x86.c |
| |
| In older code base, the shadow_bits via backports exists in |
| two files and not just one - hence it can't be static. |
| |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c |
| index 94efbbea2327..1df967ff7ac3 100644 |
| --- a/arch/x86/kvm/mmu.c |
| +++ b/arch/x86/kvm/mmu.c |
| @@ -288,7 +288,7 @@ static u64 __read_mostly shadow_nonpresent_or_rsvd_lower_gfn_mask; |
| * The number of non-reserved physical address bits irrespective of features |
| * that repurpose legal bits, e.g. MKTME. |
| */ |
| -static u8 __read_mostly shadow_phys_bits; |
| +u8 __read_mostly shadow_phys_bits; |
| |
| static void mmu_spte_set(u64 *sptep, u64 spte); |
| static union kvm_mmu_page_role |
| diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c |
| index 9b43d0976e2c..10e351ea89f6 100644 |
| --- a/arch/x86/kvm/x86.c |
| +++ b/arch/x86/kvm/x86.c |
| @@ -6981,6 +6981,8 @@ static struct perf_guest_info_callbacks kvm_guest_cbs = { |
| .handle_intel_pt_intr = kvm_handle_intel_pt_intr, |
| }; |
| |
| +extern u8 __read_mostly shadow_phys_bits; |
| + |
| static void kvm_set_mmio_spte_mask(void) |
| { |
| u64 mask; |
| -- |
| 2.7.4 |
| |