Skip to content

Cleanup VMFUNC handling in KVM.

Yu Zhang 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 3 repliesIn review
  2. v11 patch 4 repliesSuperseded

Changes in v2 from the cover letter

- Split the patch into two pieces.
- Use KVM_BUG_ON() for unexpected VM Exits.
- Comments changes.
- Commit message changes, trying to better illustrate the reason.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: VMX: Do not trap VMFUNC instructions for L1 guests.arch/x86/kvm/vmx/nested.c arch/x86/kvm/vmx/vmx.c+11 -80 replies
2/2KVM: nVMX: Simplify the setting of SECONDARY_EXEC_ENABLE_VMFUNC for nested.arch/x86/kvm/vmx/nested.c+5 -90 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/2] Cleanup VMFUNC handling in KVM.

Since VMFUNC is not supported for non-nested guests, and executing VMFUNC can cause a #UD directly, if the “enable VM functions” VM-execution control is 0, KVM can just disable it in VM-exectution control, instead of taking pains to trap it and emulate the #UD for L1 guests.

Also, simplified the process of setting SECONDARY_EXEC_ENABLE_VMFUNC for nested VMX MSR configurations.

Change log:
==========
v1->v2
- Split the patch into two pieces.
- Use KVM_BUG_ON() for unexpected VM Exits.
- Comments changes.
- Commit message changes, trying to better illustrate the reason.

Yu Zhang (2):
KVM: VMX: Do not trap VMFUNC instructions for L1 guests.
KVM: nVMX: Simplify the setting of SECONDARY_EXEC_ENABLE_VMFUNC for
nested.

 arch/x86/kvm/vmx/nested.c | 26 ++++++++++----------------
 arch/x86/kvm/vmx/vmx.c    |  7 ++++++-
 2 files changed, 16 insertions(+), 17 deletions(-)
Signature · 1 line
2.17.1