OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
334b8ad
)
KVM: Make EFER reads safe when EFER does not exist
author
Avi Kivity
<avi@redhat.com>
Sun, 3 May 2009 15:50:55 +0000
(18:50 +0300)
committer
Avi Kivity
<avi@redhat.com>
Mon, 11 May 2009 08:19:00 +0000
(11:19 +0300)
Some processors don't have EFER; don't oops if userspace wants us to
read EFER when we check NX.
Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/x86.c
b/arch/x86/kvm/x86.c
index
834a7bf
..
49079a4
100644
(file)
--- a/
arch/x86/kvm/x86.c
+++ b/
arch/x86/kvm/x86.c
@@
-1121,9
+1121,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;
}