KVM: x86: hyper-v: make L2 Hyper-V 2019 on KVM guests see MD_CLEAR
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | cpu/SMT: create and export cpu_smt_possible()include/ kernel/ | +11 | 3 replies | |
| 2/3 | KVM: x86: hyper-v: set NoNonArchitecturalCoreSharing CPUID bit when SMT is impossiblearch/ arch/ | +10 | 5 replies | |
| 3/3 | KVM: selftests: hyperv_cpuid: add check for NoNonArchitecturalCoreSharing bittools/ | +27 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] KVM: x86: hyper-v: make L2 Hyper-V 2019 on KVM guests see MD_CLEAR
[The series is KVM specific but the first patch of the series likely requires
someone else's ACK. hyperv-tlfs.h gets a small addition too.]
It was discovered that L2 guests on Hyper-V 2019 on KVM don't see MD_CLEAR bit (and thus think they're MDS vulnerable) even when it is present on the host. Turns out, Hyper-V is filtering it out because it is not sure the topology L0 is exposing is trustworthy and generally it is not. In some specific cases (e.g. when SMT is unsupported or forcesully disabled) it is and we can tell this to userspace hoping that it'll pass this info to L1. See PATCH2 of the series for additional details.
The series can be tested with QEMU-4.1+ and 'hv-passthrough' CPU flag.
Vitaly Kuznetsov (3):
cpu/SMT: create and export cpu_smt_possible()
KVM: x86: hyper-v: set NoNonArchitecturalCoreSharing CPUID bit when
SMT is impossible
KVM: selftests: hyperv_cpuid: add check for
NoNonArchitecturalCoreSharing bit
arch/x86/include/asm/hyperv-tlfs.h | 7 +++++ arch/x86/kvm/hyperv.c | 4 ++- include/linux/cpu.h | 2 ++ kernel/cpu.c | 11 ++++++-- .../selftests/kvm/x86_64/hyperv_cpuid.c | 27 +++++++++++++++++++ 5 files changed, 48 insertions(+), 3 deletions(-)
Signature · 1 line
2.20.1