OSDN Git Service

KVM: SVM: merge update_cr0_intercept into svm_set_cr0
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 Feb 2021 14:51:06 +0000 (09:51 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Mar 2021 08:42:38 +0000 (04:42 -0400)
commit2a32a77cefa662773197b362db8e4190027c89fa
treefadb60d365945e2be9fa236a1296acd07e46e86a
parent11f0cbf0c6050f2d8b3a24fc2ab8535bcaad54ea
KVM: SVM: merge update_cr0_intercept into svm_set_cr0

The logic of update_cr0_intercept is pointlessly complicated.
All svm_set_cr0 is compute the effective cr0 and compare it with
the guest value.

Inlining the function and simplifying the condition
clarifies what it is doing.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c