Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80bdec64 authored by Avi Kivity's avatar Avi Kivity
Browse files

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: default avatarAvi Kivity <avi@redhat.com>
Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent a6c06ed1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,