Skip to content

KVM: x86: hyper-v: Check if guest is allowed to use XMM registers for hypercall input

Vitaly Kuznetsov kvm lkml 1 version Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 9 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4KVM: x86: hyper-v: Check access to hypercall before reading XMM registersarch/x86/kvm/hyperv.c+3 -31 reply
2/4KVM: x86: Introduce trace_kvm_hv_hypercall_done()arch/x86/kvm/hyperv.c arch/x86/kvm/trace.h+16 -01 reply
3/4KVM: x86: hyper-v: Check if guest is allowed to use XMM registers for hypercall inputarch/x86/kvm/hyperv.c+11 -21 reply
4/4KVM: selftests: Test access to XMM fast hypercallstools/testing/selftests/kvm/include/x86_64/hyperv.h tools/testing/selftests/kvm/x86_64/hyperv_features.c+42 -44 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchSiddharth Chandrasekaran
1/4R-b
2/4R-b
3/4R-b
4/4R-b

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/4] KVM: x86: hyper-v: Check if guest is allowed to use XMM registers for hypercall input

"KVM: x86: hyper-v: Fine-grained access check to Hyper-V hypercalls and MSRs" and "Add support for XMM fast hypercalls" series were developed at the same time so the later landed without a proper feature bit check for 'strict' (KVM_CAP_HYPERV_ENFORCE_CPUID) mode. Add it now.

TLFS states that "Availability of the XMM fast hypercall interface is indicated via the “Hypervisor Feature Identification” CPUID Leaf (0x40000003, see section 2.4.4) ... Any attempt to use this interface when the hypervisor does not indicate availability will result in a #UD fault."

Vitaly Kuznetsov (4):
KVM: x86: hyper-v: Check access to hypercall before reading XMM
registers
KVM: x86: Introduce trace_kvm_hv_hypercall_done()
KVM: x86: hyper-v: Check if guest is allowed to use XMM registers for
hypercall input
KVM: selftests: Test access to XMM fast hypercalls

 arch/x86/kvm/hyperv.c                         | 18 ++++++--
 arch/x86/kvm/trace.h                          | 15 +++++++
 .../selftests/kvm/include/x86_64/hyperv.h     |  5 ++-
 .../selftests/kvm/x86_64/hyperv_features.c    | 41 +++++++++++++++++--
 4 files changed, 71 insertions(+), 8 deletions(-)
Signature · 1 line
2.31.1