diff options
author | Avi Kivity <avi@redhat.com> | 2011-11-10 07:57:29 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-12-27 04:24:41 -0500 |
commit | 80bdec64c05b645708b0dd97919783ad077fcdc8 (patch) | |
tree | 549b2084fe5b53b234c0638b1086ff04c08934b6 /arch/x86 | |
parent | a6c06ed1a60aff77b27ba558c315c3fed4e35565 (diff) |
KVM: x86 emulator: fix RDPMC privilege check
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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/emulate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index de7be77820d5..d270f1a817dc 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -3411,7 +3411,7 @@ static struct opcode twobyte_table[256] = { | |||
3411 | II(ImplicitOps | Priv, em_wrmsr, wrmsr), | 3411 | II(ImplicitOps | Priv, em_wrmsr, wrmsr), |
3412 | IIP(ImplicitOps, em_rdtsc, rdtsc, check_rdtsc), | 3412 | IIP(ImplicitOps, em_rdtsc, rdtsc, check_rdtsc), |
3413 | II(ImplicitOps | Priv, em_rdmsr, rdmsr), | 3413 | II(ImplicitOps | Priv, em_rdmsr, rdmsr), |
3414 | DIP(ImplicitOps | Priv, rdpmc, check_rdpmc), | 3414 | DIP(ImplicitOps, rdpmc, check_rdpmc), |
3415 | I(ImplicitOps | VendorSpecific, em_sysenter), | 3415 | I(ImplicitOps | VendorSpecific, em_sysenter), |
3416 | I(ImplicitOps | Priv | VendorSpecific, em_sysexit), | 3416 | I(ImplicitOps | Priv | VendorSpecific, em_sysexit), |
3417 | N, N, | 3417 | N, N, |