Skip to content

KVM: x86: CR0 vs. KVM_SET_SREGS and !URG

Sean Christopherson 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 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3KVM: x86: Disallow KVM_SET_SREGS{2} if incoming CR0 is invalidarch/x86/include/asm/kvm-x86-ops.h arch/x86/include/asm/kvm_host.h arch/x86/kvm/svm/svm.c +2 more+52 -202 replies
2/3KVM: VMX: Don't fudge CR0 and CR4 for restricted L2 guestarch/x86/kvm/vmx/vmx.c+9 -40 replies
3/3KVM: selftests: Expand x86's sregs test to cover illegal CR0 valuestools/testing/selftests/kvm/x86_64/set_sregs_test.c+39 -310 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] KVM: x86: CR0 vs. KVM_SET_SREGS and !URG

Fix a longstanding bug where KVM doesn't check the incoming CR0 provided by userspace via KVM_SET_SREGS, and then fix a VMX specific bug that let the missing CR0 check escalate from "just" a failed VM-Entry, to a "KVM is all kinds of confused and generates a WARN" issue.

Expand the set_sregs_test selftest to provide basic CR0 coverage

Sean Christopherson (3):
KVM: x86: Disallow KVM_SET_SREGS{2} if incoming CR0 is invalid
KVM: VMX: Don't fudge CR0 and CR4 for restricted L2 guest
KVM: selftests: Expand x86's sregs test to cover illegal CR0 values

 arch/x86/include/asm/kvm-x86-ops.h            |  1 +
 arch/x86/include/asm/kvm_host.h               |  3 +-
 arch/x86/kvm/svm/svm.c                        |  6 ++
 arch/x86/kvm/vmx/vmx.c                        | 41 ++++++++---
 arch/x86/kvm/x86.c                            | 34 +++++----
 .../selftests/kvm/x86_64/set_sregs_test.c     | 70 +++++++++++--------
 6 files changed, 100 insertions(+), 55 deletions(-)

base-commit: 24ff4c08e5bbdd7399d45f940f10fed030dfadda

Signature · 1 line
2.41.0.162.gfafddb0af9-goog