From: Nadav Amit Date: Wed, 7 May 2014 12:32:49 +0000 (+0300) Subject: KVM: vmx: handle_dr does not handle RSP correctly X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=a4ab9d0cf1ef0bf521bb69099aa464f38c71393c;p=deliverable%2Flinux.git KVM: vmx: handle_dr does not handle RSP correctly 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 Signed-off-by: Paolo Bonzini --- diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index a5fd47e4abfc..61e818d80732 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -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);