diff options
-rw-r--r-- | arch/x86/kvm/x86.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 6dde99ca743e..0e74d98641a0 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -4326,13 +4326,7 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, | |||
4326 | 4326 | ||
4327 | vcpu->arch.cr2 = sregs->cr2; | 4327 | vcpu->arch.cr2 = sregs->cr2; |
4328 | mmu_reset_needed |= vcpu->arch.cr3 != sregs->cr3; | 4328 | mmu_reset_needed |= vcpu->arch.cr3 != sregs->cr3; |
4329 | 4329 | vcpu->arch.cr3 = sregs->cr3; | |
4330 | down_read(&vcpu->kvm->slots_lock); | ||
4331 | if (gfn_to_memslot(vcpu->kvm, sregs->cr3 >> PAGE_SHIFT)) | ||
4332 | vcpu->arch.cr3 = sregs->cr3; | ||
4333 | else | ||
4334 | set_bit(KVM_REQ_TRIPLE_FAULT, &vcpu->requests); | ||
4335 | up_read(&vcpu->kvm->slots_lock); | ||
4336 | 4330 | ||
4337 | kvm_set_cr8(vcpu, sregs->cr8); | 4331 | kvm_set_cr8(vcpu, sregs->cr8); |
4338 | 4332 | ||