Skip to content

KVM: support the cpu feature FLUSH_L1D

Emanuele Giuseppe Esposito kvm lkml 1 version Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 14 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3kvm: vmx: Add IA32_FLUSH_CMD guest supportarch/x86/kvm/vmx/nested.c arch/x86/kvm/vmx/vmx.c+48 -259 replies
2/3kvm: svm: Add IA32_FLUSH_CMD guest supportarch/x86/kvm/svm/svm.c+31 -130 replies
3/3kvm: x86: Advertise FLUSH_L1D to user spacearch/x86/kvm/cpuid.c+1 -10 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchNathan Chancellor
1/3T-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] KVM: support the cpu feature FLUSH_L1D

As the title suggest, if the host cpu supports flush_l1d flag and QEMU/userspace wants to boot a VM with the same flag (or emulate same host features), KVM should be able to do so.

Patch 3 is the main fix, because if flush_l1d is not advertised by KVM, a linux VM will erroneously mark /sys/devices/system/cpu/vulnerabilities/mmio_stale_data
as vulnerable, even though it isn't since the host has the feature and takes care of this. Not sure what would happen in the nested case though.

Patch 1 and 2 are just taken and refactored from Jim Mattison's serie that it seems was lost a while ago:
https://patchwork.kernel.org/project/kvm/patch/[email protected]/

I thought it was worth re-posting them.

Thank you,
Emanuele

Emanuele Giuseppe Esposito (3):
kvm: vmx: Add IA32_FLUSH_CMD guest support
kvm: svm: Add IA32_FLUSH_CMD guest support
kvm: x86: Advertise FLUSH_L1D to user space

 arch/x86/kvm/cpuid.c      |  2 +-
 arch/x86/kvm/svm/svm.c    | 44 ++++++++++++++++--------
 arch/x86/kvm/vmx/nested.c |  3 ++
 arch/x86/kvm/vmx/vmx.c    | 70 +++++++++++++++++++++++++--------------
 4 files changed, 80 insertions(+), 39 deletions(-)
Signature · 1 line
2.39.1