From: Avi Kivity Date: Wed, 20 Apr 2011 12:24:32 +0000 (+0300) Subject: KVM: x86 emulator: Replace calls to is_pae() and is_paging with ->get_cr() X-Git-Tag: upstream/snapshot3+hdmi~10359^2~51 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd72c4192220d0086fb24356ac6ff9c3b1e067d9;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git KVM: x86 emulator: Replace calls to is_pae() and is_paging with ->get_cr() Avoid use of ctxt->vcpu. Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index be1532f..6a51253 100644 --- 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)