From: Lai Jiangshan <laijs@xxxxxxxxxxxxxxxxx> VCPU_EXREG_CR3 is never cleared from vcpu->arch.regs_avail in SVM so marking available for CR3 is mere an NOP, just remove it. And it is not required to mark it dirty since VCPU_EXREG_CR3 is neither never cleared from vcpu->arch.regs_dirty and SVM doesn't use the dirty information of VCPU_EXREG_CR3. Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxxxxx> --- arch/x86/kvm/svm/nested.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c index 13a58722e097..2d88ff584d61 100644 --- a/arch/x86/kvm/svm/nested.c +++ b/arch/x86/kvm/svm/nested.c @@ -444,7 +444,6 @@ static int nested_svm_load_cr3(struct kvm_vcpu *vcpu, unsigned long cr3, kvm_mmu_new_pgd(vcpu, cr3); vcpu->arch.cr3 = cr3; - kvm_register_mark_available(vcpu, VCPU_EXREG_CR3); /* Re-initialize the MMU, e.g. to pick up CR4 MMU role changes. */ kvm_init_mmu(vcpu); -- 2.19.1.6.gb485710b