projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6c06ed
)
KVM: x86 emulator: fix RDPMC privilege check
author
Avi Kivity
<avi@redhat.com>
Thu, 10 Nov 2011 12:57:29 +0000
(14:57 +0200)
committer
Avi Kivity
<avi@redhat.com>
Tue, 27 Dec 2011 09:24:41 +0000
(11:24 +0200)
RDPMC is only privileged if CR4.PCE=0. check_rdpmc() already implements this,
so all we need to do is drop the Priv flag.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/emulate.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kvm/emulate.c
b/arch/x86/kvm/emulate.c
index de7be77820d5313f71753e3721866df2a9f10c4d..d270f1a817dc6c191161b2139413aa2973f36d98 100644
(file)
--- a/
arch/x86/kvm/emulate.c
+++ b/
arch/x86/kvm/emulate.c
@@
-3411,7
+3411,7
@@
static struct opcode twobyte_table[256] = {
II(ImplicitOps | Priv, em_wrmsr, wrmsr),
IIP(ImplicitOps, em_rdtsc, rdtsc, check_rdtsc),
II(ImplicitOps | Priv, em_rdmsr, rdmsr),
- DIP(ImplicitOps
| Priv
, rdpmc, check_rdpmc),
+ DIP(ImplicitOps, rdpmc, check_rdpmc),
I(ImplicitOps | VendorSpecific, em_sysenter),
I(ImplicitOps | Priv | VendorSpecific, em_sysexit),
N, N,