KVM: vmx: handle_dr does not handle RSP correctly
authorNadav Amit <namit@cs.technion.ac.il>
Wed, 7 May 2014 12:32:49 +0000 (15:32 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 7 May 2014 15:24:59 +0000 (17:24 +0200)
The RSP register is not automatically cached, causing mov DR instruction with
RSP to fail.  Instead the regular register accessing interface should be used.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c

index a5fd47e4abfc5b2984e51cd072ef0f6e13583d0e..61e818d807325dbeac326ded92e4e871f2b0d063 100644 (file)
@@ -5143,7 +5143,7 @@ static int handle_dr(struct kvm_vcpu *vcpu)
                        return 1;
                kvm_register_write(vcpu, reg, val);
        } else
-               if (kvm_set_dr(vcpu, dr, vcpu->arch.regs[reg]))
+               if (kvm_set_dr(vcpu, dr, kvm_register_read(vcpu, reg)))
                        return 1;
 
        skip_emulated_instruction(vcpu);