Skip to content

KVM: nVMX: Don't let L2's LMSW modify CR0 bits owned by L1

Mahmoud Abumandour kvm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 6 repliesIn review
  2. v12 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Patch 2: order the CR0 store before FNOP and check L2's whole CR0.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: nVMX: Don't let L2's LMSW modify CR0 bits owned by L1arch/x86/kvm/vmx/vmx.c+15 -02 replies
2/2KVM: selftests: Verify that L2's LMSW leaves L1-owned CR0 bits alonetools/testing/selftests/kvm/x86/nested_exceptions_test.c+36 -01 reply

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/2] KVM: nVMX: Don't let L2's LMSW modify CR0 bits owned by L1

When L2's LMSW exits to L0 but not to L1, KVM emulates it with kvm_lmsw(), which ignores vmcs12's CR0 guest/host mask, so L2 can change CR0 bits that L1 owns.

v2:
- Patch 2: order the CR0 store before FNOP and check L2's whole CR0.

v1: https://lore.kernel.org/all/[email protected]

Mahmoud Abumandour (2):
KVM: nVMX: Don't let L2's LMSW modify CR0 bits owned by L1
KVM: selftests: Verify that L2's LMSW leaves L1-owned CR0 bits alone

 arch/x86/kvm/vmx/vmx.c                        | 15 ++++++++
 .../kvm/x86/nested_exceptions_test.c          | 36 +++++++++++++++++++
 2 files changed, 51 insertions(+)

base-commit: dea4f6380f4ec96e8f3b0aaf2343764bd0d25ef4

Signature · 1 line
2.25.1