summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorSean Christopherson <sean.j.christopherson@intel.com>2018-07-23 21:32:42 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2018-08-06 17:59:11 +0200
commitbd9966de4e14fb559e89a06f7f5c9aab2cc028b9 (patch)
tree8e737942600c9c4f98965cc6478013e57b458fad /ipc
parentKVM: vmx: refactor segmentation code in vmx_save_host_state() (diff)
downloadlinux-bd9966de4e14fb559e89a06f7f5c9aab2cc028b9.tar.xz
linux-bd9966de4e14fb559e89a06f7f5c9aab2cc028b9.zip
KVM: vmx: track host_state.loaded using a loaded_vmcs pointer
Using 'struct loaded_vmcs*' to track whether the CPU registers contain host or guest state kills two birds with one stone. 1. The (effective) boolean host_state.loaded is poorly named. It does not track whether or not host state is loaded into the CPU registers (which most readers would expect), but rather tracks if host state has been saved AND guest state is loaded. 2. Using a loaded_vmcs pointer provides a more robust framework for the optimized guest/host state switching, especially when consideration per-VMCS enhancements. To that end, WARN_ONCE if we try to switch to host state with a different VMCS than was last used to save host state. Resolve an occurrence of the new WARN by setting loaded_vmcs after the call to vmx_vcpu_put() in vmx_switch_vmcs(). Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions