KVM: x86: Add a struct to consolidate host values, e.g. EFER, XCR0, etc...
authorSean Christopherson <seanjc@google.com>
Tue, 23 Apr 2024 22:15:18 +0000 (15:15 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 3 Jun 2024 15:58:53 +0000 (08:58 -0700)
commit7974c0643ee3b493d5a3f2a1ee25e9ddb53283c3
tree3ccf734a4e23ff39ecf35fef73406666faf6827f
parentc3f38fa61af77b49866b006939479069cd451173
KVM: x86: Add a struct to consolidate host values, e.g. EFER, XCR0, etc...

Add "struct kvm_host_values kvm_host" to hold the various host values
that KVM snapshots during initialization.  Bundling the host values into
a single struct simplifies adding new MSRs and other features with host
state/values that KVM cares about, and provides a one-stop shop.  E.g.
adding a new value requires one line, whereas tracking each value
individual often requires three: declaration, definition, and export.

No functional change intended.

Link: https://lore.kernel.org/r/20240423221521.2923759-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/sev.c
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c
arch/x86/kvm/x86.h