Skip to content

KVM: VMX: Fix handling of invalid L2 guest state

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 Latest4 patches 5 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4KVM: VMX: Always clear vmx->fail on emulation_requiredarch/x86/kvm/vmx/vmx.c+1 -31 reply
2/4KVM: nVMX: Synthesize TRIPLE_FAULT for L2 if emulation is requiredarch/x86/kvm/vmx/vmx.c+24 -81 reply
3/4KVM: VMX: Fix stale docs for kvm-intel.emulate_invalid_guest_stateDocumentation/admin-guide/kernel-parameters.txt+6 -21 reply
4/4KVM: selftests: Add test to verify TRIPLE_FAULT on invalid L2 guest statetools/testing/selftests/kvm/.gitignore tools/testing/selftests/kvm/Makefile tools/testing/selftests/kvm/x86_64/vmx_invalid_nested_guest_state.c+107 -01 reply

Reviews trailers per patch

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

PatchMaxim Levitsky
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: VMX: Fix handling of invalid L2 guest state

Fixes and a test for invalid L2 guest state. TL;DR: KVM should never emulate L2 if L2's guest state is invalid.

Patch 01 fixes a regression found by syzbot. Patch 02 closes what I suspect was the hole the buggy patch was trying to close. Patch 03 is a related docs update. Patch 04 is a selftest for the regression and for a subset of patch 02's behavior.

Sean Christopherson (4):
KVM: VMX: Always clear vmx->fail on emulation_required
KVM: nVMX: Synthesize TRIPLE_FAULT for L2 if emulation is required
KVM: VMX: Fix stale docs for kvm-intel.emulate_invalid_guest_state
KVM: selftests: Add test to verify TRIPLE_FAULT on invalid L2 guest
state

 .../admin-guide/kernel-parameters.txt         |   8 +-
 arch/x86/kvm/vmx/vmx.c                        |  36 ++++--
 tools/testing/selftests/kvm/.gitignore        |   1 +
 tools/testing/selftests/kvm/Makefile          |   1 +
 .../x86_64/vmx_invalid_nested_guest_state.c   | 105 ++++++++++++++++++
 5 files changed, 138 insertions(+), 13 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/x86_64/vmx_invalid_nested_guest_state.c
Signature · 1 line
2.34.1.400.ga245620fadb-goog