Преглед на файлове

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 <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Nadav Amit преди 11 години
родител
ревизия
a4ab9d0cf1
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      arch/x86/kvm/vmx.c

+ 1 - 1
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);