On Mon, Jul 23, 2018 at 12:33 PM Sean Christopherson <sean.j.christopherson@xxxxxxxxx> wrote: > > Make host_state a property of a loaded_vmcs so that it can be > used as a cache of the VMCS fields, e.g. to lazily VMWRITE the > corresponding VMCS field. Treating host_state as a cache does > not work if it's not VMCS specific as the cache would become > incoherent when switching between vmcs01 and vmcs02. > > Move vmcs_host_cr3 and vmcs_host_cr4 into host_state. > > Explicitly zero out host_state when allocating a new VMCS for a > loaded_vmcs. Unlike the pre-existing vmcs_host_cr{3,4} usage, > the segment information is not guaranteed to be (re)initialized > when running a new nested VMCS, e.g. HOST_FS_BASE is not written > in vmx_set_constant_host_state(). > > Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx> Reviewed-by: Peter Shier <pshier@xxxxxxxxxx> Tested-by: Peter Shier <pshier@xxxxxxxxxx>