projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2ad2bb
)
KVM: x86 emulator: Replace calls to is_pae() and is_paging with ->get_cr()
author
Avi Kivity
<avi@redhat.com>
Wed, 20 Apr 2011 12:24:32 +0000
(15:24 +0300)
committer
Avi Kivity
<avi@redhat.com>
Sun, 22 May 2011 12:39:12 +0000
(08:39 -0400)
Avoid use of ctxt->vcpu.
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/emulate.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kvm/emulate.c
b/arch/x86/kvm/emulate.c
index be1532f4b8b8c736299040f1350dac6c886bbf82..6a512532866912cb424ad0c467b3fbc2d0882cd5 100644
(file)
--- a/
arch/x86/kvm/emulate.c
+++ b/
arch/x86/kvm/emulate.c
@@
-2644,9
+2644,9
@@
static int check_cr_write(struct x86_emulate_ctxt *ctxt)
ctxt->ops->get_msr(ctxt, MSR_EFER, &efer);
if (efer & EFER_LMA)
rsvd = CR3_L_MODE_RESERVED_BITS;
- else if (
is_pae(ctxt->vcpu)
)
+ else if (
ctxt->ops->get_cr(ctxt, 4) & X86_CR4_PAE
)
rsvd = CR3_PAE_RESERVED_BITS;
- else if (
is_paging(ctxt->vcpu)
)
+ else if (
ctxt->ops->get_cr(ctxt, 0) & X86_CR0_PG
)
rsvd = CR3_NONPAE_RESERVED_BITS;
if (new_val & rsvd)