• Sean Christopherson's avatar
    KVM: VMX: Properly handle dynamic VM Entry/Exit controls · c73da3fc
    Sean Christopherson authored
    EFER and PERF_GLOBAL_CTRL MSRs have dedicated VM Entry/Exit controls
    that KVM dynamically toggles based on whether or not the guest's value
    for each MSRs differs from the host.  Handle the dynamic behavior by
    adding a helper that clears the dynamic bits so the bits aren't set
    when initializing the VMCS field outside of the dynamic toggling flow.
    This makes the handling consistent with similar behavior for other
    controls, e.g. pin, exec and sec_exec.  More importantly, it eliminates
    two global bools that are stealthily modified by setup_vmcs_config.
    
    Opportunistically clean up a comment and print related to errata for
    IA32_PERF_GLOBAL_CTRL.
    Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    c73da3fc
vmx.c 437 KB