From: Joerg Roedel Date: Wed, 24 Feb 2010 17:59:17 +0000 (+0100) Subject: KVM: x86: Don't set arch.cr0 in kvm_set_cr0 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b44ea385d8cb187e04ec8d901d4c320c8b07c40b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git KVM: x86: Don't set arch.cr0 in kvm_set_cr0 The vcpu->arch.cr0 variable is already set in the architecture specific set_cr0 callbacks. There is no need to set it in the common code. This allows the architecture code to keep the old arch.cr0 value if it wants. This is required for nested svm to decide if a selective_cr0 exit needs to be injected. Signed-off-by: Joerg Roedel Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 81b7af5558f9..d0b184b5c248 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -475,7 +475,6 @@ void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) } kvm_x86_ops->set_cr0(vcpu, cr0); - vcpu->arch.cr0 = cr0; kvm_mmu_reset_context(vcpu); return;