Skip to content

Keep cr3 cached in VMCS

Avi Kivity kvm 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesNew
  2. v22 patches 2 repliesSuperseded
  3. v12 patches 1 replySuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: Replace reads of vcpu->arch.cr3 by an accessorarch/x86/kvm/kvm_cache_regs.h arch/x86/kvm/mmu.c arch/x86/kvm/svm.c +2 more+26 -190 replies
2/2KVM: Fetch guest cr3 from hardware on demandarch/x86/include/asm/kvm_host.h arch/x86/kvm/kvm_cache_regs.h arch/x86/kvm/svm.c +2 more+27 -60 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/2] Keep cr3 cached in VMCS

This patchset keeps cr3 cached in the VMCS (GUEST_CR3) instead of syncing it every exit. Saves a VMREAD/VMWRITE on Intel with EPT enabled.

Avi Kivity (2):
KVM: Replace reads of vcpu->arch.cr3 by an accessor
KVM: Fetch guest cr3 from hardware on demand
v3: mark cr3 as available when we write it
remove misleading comment in vmx_decache_cr3()
v2: fix ept identity pagetable leak into guest cr3

 arch/x86/include/asm/kvm_host.h |    2 ++
 arch/x86/kvm/kvm_cache_regs.h   |    7 +++++++
 arch/x86/kvm/mmu.c              |    6 +++---
 arch/x86/kvm/svm.c              |   13 +++++++++----
 arch/x86/kvm/vmx.c              |   29 ++++++++++++++++++++---------
 arch/x86/kvm/x86.c              |   21 ++++++++++++---------
 6 files changed, 53 insertions(+), 25 deletions(-)