Skip to content

Emulate VMXON region correctly

Bandan Das kvm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 3 repliesIn review
  2. v13 patches 4 repliesSuperseded

Changes in v2 from the cover letter

1/4
- Commit message change to reflect addition of new function
2/4
- Use cpuid_maxphyaddr()
- Fix a leak with kunmap()
- Remove unnecessary braces around comparisions
- Move all checks into a common function, this will be later used by handle_vmptrld and handle_vmclear in 4/4
4/4
- New patch - use common function to perform checks on vmptr

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4KVM: nVMX: rearrange get_vmx_mem_addressarch/x86/kvm/vmx.c+53 -530 replies
2/4KVM: nVMX: additional checks on vmxon regionarch/x86/kvm/cpuid.c arch/x86/kvm/vmx.c+68 -00 replies
3/4KVM: nVMX: fail on invalid vmclear/vmptrld pointerarch/x86/kvm/vmx.c+12 -00 replies
4/4KVM: nVMX: move vmclear and vmptrld pre-checks to nested_vmx_check_vmptrarch/x86/kvm/vmx.c+37 -460 replies

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/4] Emulate VMXON region correctly

Reference: https://bugzilla.kernel.org/show_bug.cgi?id=54521

The vmxon region is unused by nvmx, but adding these checks are probably harmless and may detect buggy L1 hypervisors in the future!

v2:
1/4
- Commit message change to reflect addition of new function
2/4
- Use cpuid_maxphyaddr()
- Fix a leak with kunmap()
- Remove unnecessary braces around comparisions
- Move all checks into a common function, this will be later used by handle_vmptrld and handle_vmclear in 4/4
4/4
- New patch - use common function to perform checks on vmptr

Bandan Das (4):
KVM: nVMX: rearrange get_vmx_mem_address
KVM: nVMX: additional checks on vmxon region
KVM: nVMX: fail on invalid vmclear/vmptrld pointer
KVM: nVMX: move vmclear and vmptrld pre-checks to
nested_vmx_check_vmptr

 arch/x86/kvm/cpuid.c |   1 +
 arch/x86/kvm/vmx.c   | 240 +++++++++++++++++++++++++++++++++------------------
 2 files changed, 156 insertions(+), 85 deletions(-)
Signature · 1 line
1.8.3.1