Skip to content

KVM: x86: Collect host state snapshots into a struct

Sean Christopherson kvm lkml 1 version Applied

Status from this message: Applied to kvm-x86 misc, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 7 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4KVM: x86: Add a struct to consolidate host values, e.g. EFER, XCR0, etc...arch/x86/include/asm/kvm_host.h arch/x86/kvm/svm/sev.c arch/x86/kvm/vmx/nested.c +3 more+35 -404 replies
2/4KVM: SVM: Use KVM's snapshot of the host's XCR0 for SEV-ES host statearch/x86/kvm/svm/sev.c+1 -10 replies
3/4KVM: x86/mmu: Snapshot shadow_phys_bits when kvm.ko is loadedarch/x86/kvm/mmu.h arch/x86/kvm/mmu/spte.c+4 -40 replies
4/4KVM: x86: Move shadow_phys_bits into "kvm_host", as "maxphyaddr"arch/x86/kvm/mmu.h arch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/spte.c +3 more+37 -390 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/4] KVM: x86: Collect host state snapshots into a struct

Add a global "kvm_host" structure to hold various host values, e.g. for EFER, XCR0, raw MAXPHYADDR etc., instead of having a bunch of one-off variables that inevitably need to be exported, or in the case of shadow_phys_bits, are buried in a random location and are awkward to use, leading to duplicate code.

Sean Christopherson (4):
KVM: x86: Add a struct to consolidate host values, e.g. EFER, XCR0,

    etc...

KVM: SVM: Use KVM's snapshot of the host's XCR0 for SEV-ES host state
KVM: x86/mmu: Snapshot shadow_phys_bits when kvm.ko is loaded
KVM: x86: Move shadow_phys_bits into "kvm_host", as "maxphyaddr"

 arch/x86/include/asm/kvm_host.h |  1 -
 arch/x86/kvm/mmu.h              | 27 +----------------------
 arch/x86/kvm/mmu/mmu.c          |  2 +-
 arch/x86/kvm/mmu/spte.c         | 26 ++++++++++++++++++----
 arch/x86/kvm/svm/sev.c          |  4 ++--
 arch/x86/kvm/vmx/nested.c       |  8 +++----
 arch/x86/kvm/vmx/vmx.c          | 28 +++++++++++-------------
 arch/x86/kvm/vmx/vmx.h          |  2 +-
 arch/x86/kvm/x86.c              | 38 +++++++++++++--------------------
 arch/x86/kvm/x86.h              | 19 +++++++++++++----
 10 files changed, 74 insertions(+), 81 deletions(-)

base-commit: 7b076c6a308ec5bce9fc96e2935443ed228b9148

Signature · 1 line
2.44.0.769.g3c40516874-goog