]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Move setting of sregs during vCPU RESET/INIT to common x86
authorSean Christopherson <seanjc@google.com>
Tue, 13 Jul 2021 16:33:14 +0000 (09:33 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Aug 2021 15:01:57 +0000 (11:01 -0400)
commit60fff52c8c07d2b30a7b28bfc19e108ebbf6848f
tree6562d34ce21338007033b99757aa78f878bfebc7
parente5883ca2b4d2fbbc6d77e524ff13b2fe97396bcd
KVM: x86: Move setting of sregs during vCPU RESET/INIT to common x86

Move the setting of CR0, CR4, EFER, RFLAGS, and RIP from vendor code to
common x86.  VMX and SVM now have near-identical sequences, the only
difference being that VMX updates the exception bitmap.  Updating the
bitmap on SVM is unnecessary, but benign.  Unfortunately it can't be left
behind in VMX due to the need to update exception intercepts after the
control registers are set.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210713163324.627647-37-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c