Messages in this thread Patch in this message | | | Date | Fri, 04 Sep 2009 13:07:37 -0700 | From | Greg KH <> | Subject | [patch 25/48] KVM: Make EFER reads safe when EFER does not exist |
| |
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------ From: Avi Kivity <avi@redhat.com>
(cherry picked from commit e286e86e6d2042d67d09244aa0e05ffef75c9d54)
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 @@ -983,9 +983,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; }
| |