[Hyper-V] x86/hyperv: Stop suppressing X86_FEATURE_PCID
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux |
Confirmed
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Trusty |
Invalid
|
Undecided
|
Marcelo Cerri | ||
Xenial |
Invalid
|
Undecided
|
Marcelo Cerri | ||
Artful |
Invalid
|
Undecided
|
Marcelo Cerri | ||
linux-azure (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Marcelo Cerri | ||
linux-azure-edge (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Xenial |
Fix Committed
|
Undecided
|
Marcelo Cerri |
Bug Description
Anywhere where Meltdown fixes have gone in have likely also picked up upstream work on TLB flushes. This is an important performance change.
x86/hyperv: Stop suppressing X86_FEATURE_
When hypercall-based TLB flush was enabled for Hyper-V guests PCID feature
was deliberately suppressed as a precaution: back then PCID was never
exposed to Hyper-V guests and it wasn't clear what will happen if some day
it becomes available. The day came and PCID/INVPCID features are already
exposed on certain Hyper-V hosts.
From TLFS (as of 5.0b) it is unclear how TLB flush hypercalls combine with
PCID. In particular the usage of PCID is per-cpu based: the same mm gets
different CR3 values on different CPUs. If the hypercall does exact
matching this will fail. However, this is not the case. David Zhang
explains:
"In practice, the AddressSpace argument is ignored on any VM that supports
PCIDs.
Architecturally, the AddressSpace argument must match the CR3 with PCID
bits stripped out (i.e., the low 12 bits of AddressSpace should be 0 in
long mode). The flush hypercalls flush all PCIDs for the specified
AddressSpace."
With this, PCID can be enabled.
Upstream commit link: https:/
Changed in linux-lts-vivid (Ubuntu): | |
status: | New → Confirmed |
Changed in linux: | |
status: | New → Confirmed |
Changed in linux-lts-xenial (Ubuntu): | |
status: | New → Confirmed |
no longer affects: | linux-lts-xenial (Ubuntu Artful) |
no longer affects: | linux-lts-vivid (Ubuntu Artful) |
no longer affects: | linux-lts-vivid (Ubuntu) |
no longer affects: | linux-lts-vivid (Ubuntu Trusty) |
no longer affects: | linux-lts-vivid (Ubuntu Xenial) |
no longer affects: | linux-lts-xenial (Ubuntu Xenial) |
no longer affects: | linux-lts-xenial (Ubuntu Trusty) |
no longer affects: | linux-lts-xenial (Ubuntu) |
no longer affects: | linux-azure (Ubuntu Trusty) |
no longer affects: | linux-azure (Ubuntu Artful) |
no longer affects: | linux-azure-edge (Ubuntu Trusty) |
no longer affects: | linux-azure-edge (Ubuntu Artful) |
Changed in linux-azure (Ubuntu Xenial): | |
status: | New → Fix Committed |
Changed in linux-azure-edge (Ubuntu Xenial): | |
status: | In Progress → Fix Committed |
Josh. Is that intended to be included in both the custom kernels as well in the regular kernels?