diff options
-rw-r--r-- | arch/x86/hyperv/mmu.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/x86/hyperv/mmu.c b/arch/x86/hyperv/mmu.c index 9cc9e1c1e2db..56c9ebac946f 100644 --- a/arch/x86/hyperv/mmu.c +++ b/arch/x86/hyperv/mmu.c | |||
@@ -137,7 +137,12 @@ static void hyperv_flush_tlb_others(const struct cpumask *cpus, | |||
137 | } | 137 | } |
138 | 138 | ||
139 | if (info->mm) { | 139 | if (info->mm) { |
140 | /* | ||
141 | * AddressSpace argument must match the CR3 with PCID bits | ||
142 | * stripped out. | ||
143 | */ | ||
140 | flush->address_space = virt_to_phys(info->mm->pgd); | 144 | flush->address_space = virt_to_phys(info->mm->pgd); |
145 | flush->address_space &= CR3_ADDR_MASK; | ||
141 | flush->flags = 0; | 146 | flush->flags = 0; |
142 | } else { | 147 | } else { |
143 | flush->address_space = 0; | 148 | flush->address_space = 0; |
@@ -219,7 +224,12 @@ static void hyperv_flush_tlb_others_ex(const struct cpumask *cpus, | |||
219 | } | 224 | } |
220 | 225 | ||
221 | if (info->mm) { | 226 | if (info->mm) { |
227 | /* | ||
228 | * AddressSpace argument must match the CR3 with PCID bits | ||
229 | * stripped out. | ||
230 | */ | ||
222 | flush->address_space = virt_to_phys(info->mm->pgd); | 231 | flush->address_space = virt_to_phys(info->mm->pgd); |
232 | flush->address_space &= CR3_ADDR_MASK; | ||
223 | flush->flags = 0; | 233 | flush->flags = 0; |
224 | } else { | 234 | } else { |
225 | flush->address_space = 0; | 235 | flush->address_space = 0; |
@@ -278,8 +288,6 @@ void hyperv_setup_mmu_ops(void) | |||
278 | if (!(ms_hyperv.hints & HV_X64_REMOTE_TLB_FLUSH_RECOMMENDED)) | 288 | if (!(ms_hyperv.hints & HV_X64_REMOTE_TLB_FLUSH_RECOMMENDED)) |
279 | return; | 289 | return; |
280 | 290 | ||
281 | setup_clear_cpu_cap(X86_FEATURE_PCID); | ||
282 | |||
283 | if (!(ms_hyperv.hints & HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED)) { | 291 | if (!(ms_hyperv.hints & HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED)) { |
284 | pr_info("Using hypercall for remote TLB flush\n"); | 292 | pr_info("Using hypercall for remote TLB flush\n"); |
285 | pv_mmu_ops.flush_tlb_others = hyperv_flush_tlb_others; | 293 | pv_mmu_ops.flush_tlb_others = hyperv_flush_tlb_others; |