Skip to content

KVM: VMX: Add caching of EXIT_QUAL and INTR_INFO

Sean Christopherson kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5KVM: nVMX: Invoke ept_save_pdptrs() if and only if PAE paging is enabledarch/x86/kvm/vmx/nested.c arch/x86/kvm/vmx/vmx.c+8 -70 replies
2/5KVM: nVMX: Reset register cache (available and dirty masks) on VMCS switcharch/x86/kvm/vmx/nested.c arch/x86/kvm/vmx/vmx.c arch/x86/kvm/vmx/vmx.h+13 -60 replies
3/5KVM: nVMX: Drop manual clearing of segment cache on nested VMCS switcharch/x86/kvm/vmx/nested.c arch/x86/kvm/vmx/vmx.c arch/x86/kvm/vmx/vmx.h+5 -60 replies
4/5KVM: VMX: Cache vmcs.EXIT_QUALIFICATION using arch avail_reg flagsarch/x86/include/asm/kvm_host.h arch/x86/kvm/vmx/nested.c arch/x86/kvm/vmx/nested.h +2 more+40 -270 replies
5/5KVM: VMX: Cache vmcs.EXIT_INTR_INFO using arch avail_reg flagsarch/x86/include/asm/kvm_host.h arch/x86/kvm/vmx/nested.c arch/x86/kvm/vmx/nested.h +2 more+25 -160 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/5] KVM: VMX: Add caching of EXIT_QUAL and INTR_INFO

Patches 4-5 are the focus of this series, adding caching of vmcs.EXIT_QUALIFICATION and proper caching of vmcs.INTR_INFO (instead of caching it with ad hoc rules about when it's available). Patches 1-3 are prep work to clean up the register caching to ensure correctness when switching between vmcs01 and vmcs02.

The idea for this came about when working on the "unionize exit_reason" series. The nested VM-Exit logic looks at both fields multiple times, which is ok-ish when everything is crammed into one or two functions, but incurs multiple VMREADs when split up. I really didn't want to solve that issue by piling on more cases where vmx->exit_intr_info would be valid, or by duplicating that fragile pattern for exit_qualification.

Paolo, this will conflict with the "unionize exit_reason" series, though the conflict resolution is all mechnical in nature. Let me know if you want me to respin one on top of the other, send a single series, etc...

Sean Christopherson (5):
KVM: nVMX: Invoke ept_save_pdptrs() if and only if PAE paging is
enabled
KVM: nVMX: Reset register cache (available and dirty masks) on VMCS
switch
KVM: nVMX: Drop manual clearing of segment cache on nested VMCS switch
KVM: VMX: Cache vmcs.EXIT_QUALIFICATION using arch avail_reg flags
KVM: VMX: Cache vmcs.EXIT_INTR_INFO using arch avail_reg flags

 arch/x86/include/asm/kvm_host.h |  2 +
 arch/x86/kvm/vmx/nested.c       | 29 +++++++------
 arch/x86/kvm/vmx/nested.h       |  4 +-
 arch/x86/kvm/vmx/vmx.c          | 73 ++++++++++++++++-----------------
 arch/x86/kvm/vmx/vmx.h          | 35 +++++++++++++++-
 5 files changed, 86 insertions(+), 57 deletions(-)
Signature · 1 line
2.26.0