Commit eeec065
committed
arch: x86_64: recommend Hyper-V paravirt TLB flush and cluster IPI
Adds three recommendation bits to CPUID 0x40000004.EAX so Windows / Hyper-V-
aware guests use the corresponding paravirtualized hypercalls instead of
falling back to architectural primitives. The hypercalls themselves are
emulated unconditionally by KVM and surfaced via the corresponding
KVM_CAP_HYPERV_* info caps; no userspace cap negotiation is needed because
KVM advertises support to the guest at hypercall-issue time:
KVM_CAP_HYPERV_TLBFLUSH advertises HvFlush{VirtualAddressSpace,Ex,List,
ListEx} (per Documentation/virt/kvm/api.rst §8.18,
"Architectures: x86" — info-only cap).
KVM_CAP_HYPERV_SEND_IPI advertises HvCallSendSyntheticClusterIpi{,Ex}
(api.rst §8.20, also info-only).
Leaf 0x40000004.EAX (HV_CPUID_ENLIGHTMENT_INFO):
bit 1 LocalTlbFlushRecommended
bit 2 RemoteTlbFlushRecommended
These recommend HvFlushVirtualAddressSpace / HvFlushVirtualAddress
List in place of architectural INVPCID / INVLPG broadcasts. Remote
TLB shoot-down via hypercall lets the host skip vCPUs that are
not currently scheduled, instead of waiting for them to receive
and ack the IPI.
bit 10 ClusterIpiRecommended
Recommends HvCallSendSyntheticClusterIpi over per-target APIC ICR
writes. A single hypercall can target up to 64 vCPUs (or all of
them via the Ex variant) versus one VM exit per APIC access on
the architectural path.
These bits depend on AccessVpIndex (0x40000003.EAX bit 6), which is now
advertised after the partition-privileges fix.
Sources:
Microsoft Hypervisor Top-Level Functional Specification 7.4.5
qemu/qemu docs/system/i386/hyperv.rst (hv-tlbflush, hv-ipi)
Linux Documentation/virt/kvm/api.rst §8.18, §8.201 parent 255a73c commit eeec065
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
875 | | - | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
876 | 879 | | |
877 | 880 | | |
878 | 881 | | |
| |||
0 commit comments