git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d978f7
)
KVM: Make EFER reads safe when EFER does not exist
author
Avi Kivity
<avi@redhat.com>
Thu, 6 Aug 2009 17:40:00 +0000
(14:40 -0300)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Wed, 9 Sep 2009 03:17:20 +0000
(20:17 -0700)
(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
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/x86.c
b/arch/x86/kvm/x86.c
index
1454992
..
662cf12
100644
(file)
--- a/
arch/x86/kvm/x86.c
+++ b/
arch/x86/kvm/x86.c
@@
-983,9
+983,9
@@
void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
static int is_efer_nx(void)
{
- u
64 efer
;
+ u
nsigned long long efer = 0
;
- rdmsrl
(MSR_EFER,
efer);
+ rdmsrl
_safe(MSR_EFER, &
efer);
return efer & EFER_NX;
}