• Paolo Bonzini's avatar
    KVM: nVMX: initialize more non-shadowed fields in prepare_vmcs02_full · 25a2e4fe
    Paolo Bonzini authored
    These fields are also simple copies of the data in the vmcs12 struct.
    For some of them, prepare_vmcs02 was skipping the copy when the field
    was unused.  In prepare_vmcs02_full, we copy them always as long as the
    field exists on the host, because the corresponding execution control
    might be one of the shadowed fields.
    
    Optimization opportunities remain for MSRs that, depending on the
    entry/exit controls, have to be copied from either the vmcs01 or
    the vmcs12: EFER (whose value is partly stored in the entry controls
    too), PAT, DEBUGCTL (and also DR7).  Before moving these three and
    the entry/exit controls to prepare_vmcs02_full, KVM would have to set
    dirty_vmcs12 on writes to the L1 MSRs.
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
    25a2e4fe
vmx.c 346 KB