projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5623f75
)
KVM: x86: Use DR7_GD macro instead of open coding check in emulator
author
Sean Christopherson
<seanjc@google.com>
Tue, 30 Aug 2022 23:15:56 +0000
(23:15 +0000)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Mon, 26 Sep 2022 16:03:06 +0000
(12:03 -0400)
Use DR7_GD in the emulator instead of open coding the check, and drop a
comically wrong comment.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Link:
https://lore.kernel.org/r/20220830231614.3580124-10-seanjc@google.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/emulate.c
b/arch/x86/kvm/emulate.c
index 862498dc3d75b0ea84bb9f54ce813cab3b1eb61f..b6180032dfd6c0f888655d1bfe77c33d4ed994cb 100644
(file)
--- a/
arch/x86/kvm/emulate.c
+++ b/
arch/x86/kvm/emulate.c
@@
-4166,8
+4166,7
@@
static int check_dr7_gd(struct x86_emulate_ctxt *ctxt)
ctxt->ops->get_dr(ctxt, 7, &dr7);
- /* Check if DR7.Global_Enable is set */
- return dr7 & (1 << 13);
+ return dr7 & DR7_GD;
}
static int check_dr_read(struct x86_emulate_ctxt *ctxt)