• Sean Christopherson's avatar
    KVM: VMX: Process CR0.PG side effects after setting CR0 assets · 32437c2a
    Sean Christopherson authored
    
    
    Move the long mode and EPT w/o unrestricted guest side effect processing
    down in vmx_set_cr0() so that the EPT && !URG case doesn't have to stuff
    vcpu->arch.cr0 early.  This also fixes an oddity where CR0 might not be
    marked available, i.e. the early vcpu->arch.cr0 write would appear to be
    in danger of being overwritten, though that can't actually happen in the
    current code since CR0.TS is the only guest-owned bit, and CR0.TS is not
    read by vmx_set_cr4().
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <20210713163324.627647-28-seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    32437c2a
vmx.c 224 KB