diff options
author | Liran Alon | 2019-06-06 00:54:47 +0200 |
---|---|---|
committer | Paolo Bonzini | 2019-06-18 11:43:42 +0200 |
commit | 1fc5d19472f77fc44f0c5b6852b18416f1db3fea (patch) | |
tree | 1ba59cb77ee93567f6c92352059f708eed6575ee /arch/x86/kvm/x86.c | |
parent | KVM: x86: clean up conditions for asynchronous page fault handling (diff) | |
download | kernel-qcow2-linux-1fc5d19472f77fc44f0c5b6852b18416f1db3fea.tar.gz kernel-qcow2-linux-1fc5d19472f77fc44f0c5b6852b18416f1db3fea.tar.xz kernel-qcow2-linux-1fc5d19472f77fc44f0c5b6852b18416f1db3fea.zip |
KVM: x86: Use DR_TRAP_BITS instead of hard-coded 15
Make all code consistent with kvm_deliver_exception_payload() by using
appropriate symbolic constant instead of hard-coded number.
Reviewed-by: Nikita Leshenko <nikita.leshchenko@oracle.com>
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 279ab4e8dd82..eadd987ae350 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -6392,7 +6392,7 @@ static bool kvm_vcpu_check_breakpoint(struct kvm_vcpu *vcpu, int *r) vcpu->arch.db); if (dr6 != 0) { - vcpu->arch.dr6 &= ~15; + vcpu->arch.dr6 &= ~DR_TRAP_BITS; vcpu->arch.dr6 |= dr6 | DR6_RTM; kvm_queue_exception(vcpu, DB_VECTOR); *r = EMULATE_DONE; |