OSDN Git Service

KVM: VMX: Fold ept_update_paging_mode_cr0() back into vmx_set_cr0()
authorSean Christopherson <seanjc@google.com>
Tue, 13 Jul 2021 16:33:01 +0000 (09:33 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Aug 2021 15:01:54 +0000 (11:01 -0400)
commitc834fd7fc1308a0e0429d203a6c3af528cd902fa
tree973a37c75f79a72292c2c947dff45ef0bb358932
parent4f0dcb544038e016277fb691f1e60d52d7448cf6
KVM: VMX: Fold ept_update_paging_mode_cr0() back into vmx_set_cr0()

Move the CR0/CR3/CR4 shenanigans for EPT without unrestricted guest back
into vmx_set_cr0().  This will allow a future patch to eliminate the
rather gross stuffing of vcpu->arch.cr0 in the paging transition cases
by snapshotting the old CR0.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210713163324.627647-24-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c