lkml.org 
[lkml]   [2011]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCHv2 8/9] KVM: x86 emulator: fix RDPMC privilege check
    Date
    From: Avi Kivity <avi@redhat.com>

    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>
    ---
    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 8547958..c0ee85b 100644
    --- a/arch/x86/kvm/emulate.c
    +++ b/arch/x86/kvm/emulate.c
    @@ -3254,7 +3254,7 @@ static struct opcode twobyte_table[256] = {
    DI(ImplicitOps | Priv, wrmsr),
    IIP(ImplicitOps, em_rdtsc, rdtsc, check_rdtsc),
    DI(ImplicitOps | Priv, 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,
    --
    1.7.5.3


    \
     
     \ /
      Last update: 2011-11-03 13:37    [W:2.555 / U:1.208 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site