KVM: x86: check DR6/7 high-bits are clear only on long-mode
When the guest sets DR6 and DR7, KVM asserts the high 32-bits are clear, and otherwise injects a #GP exception. This exception should only be injected only if running in long-mode. Signed-off-by: Nadav Amit <namit@cs.technion.ac.il> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:

committed by
Paolo Bonzini

parent
5381417f6a
commit
5777392e83
@@ -5184,7 +5184,7 @@ static int handle_dr(struct kvm_vcpu *vcpu)
|
||||
return 1;
|
||||
kvm_register_write(vcpu, reg, val);
|
||||
} else
|
||||
if (kvm_set_dr(vcpu, dr, kvm_register_read(vcpu, reg)))
|
||||
if (kvm_set_dr(vcpu, dr, kvm_register_readl(vcpu, reg)))
|
||||
return 1;
|
||||
|
||||
skip_emulated_instruction(vcpu);
|
||||
|
Reference in New Issue
Block a user