• Sean Christopherson's avatar
    KVM: nVMX: Save BNDCFGS to vmcs12 iff relevant controls are exposed to L1 · 308a4fff
    Sean Christopherson authored
    Save BNDCFGS to vmcs12 (from vmcs02) if and only if at least of one of
    the load-on-entry or clear-on-exit fields for BNDCFGS is enumerated as an
    allowed-1 bit in vmcs12.  Skipping the field avoids an unnecessary VMREAD
    when MPX is supported but not exposed to L1.
    
    Per Intel's SDM:
    
      If the processor supports either the 1-setting of the "load IA32_BNDCFGS"
      VM-entry control or that of the "clear IA32_BNDCFGS" VM-exit control, the
      contents of the IA32_BNDCFGS MSR are saved into the corresponding field.
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <20220614215831.3762138-5-seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    308a4fff
nested.c 210 KB