lkml.org 
[lkml]   [2009]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 44/51] KVM: Make EFER reads safe when EFER does not exist
    2.6.29-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Avi Kivity <avi@redhat.com>

    commit e286e86e6d2042d67d09244aa0e05ffef75c9d54 upstream.

    Some processors don't have EFER; don't oops if userspace wants us to
    read EFER when we check NX.

    Signed-off-by: Avi Kivity <avi@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    arch/x86/kvm/x86.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    --- a/arch/x86/kvm/x86.c
    +++ b/arch/x86/kvm/x86.c
    @@ -1075,9 +1075,9 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *

    static int is_efer_nx(void)
    {
    - u64 efer;
    + unsigned long long efer = 0;

    - rdmsrl(MSR_EFER, efer);
    + rdmsrl_safe(MSR_EFER, &efer);
    return efer & EFER_NX;
    }




    \
     
     \ /
      Last update: 2009-05-15 01:05    [W:0.022 / U:29.820 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site