diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-30 16:04:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-30 16:04:50 -0500 |
commit | 72906f38934a49faf4d2d38ea9ae32adcf7d5d0c (patch) | |
tree | 804605afa9073a35c4fee2db686fefc77aa8b490 | |
parent | 3ccabd6d9d9b0da5780e0386b4bf7c5f07669e37 (diff) | |
parent | 617ab45c9a8900e64a78b43696c02598b8cad68b (diff) |
Merge branch 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 hyperv update from Ingo Molnar:
"Enable PCID support on Hyper-V guests"
* 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/hyperv: Stop suppressing X86_FEATURE_PCID
-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; |