public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* deactivate fpu when cr0.PE ON?
@ 2009-04-10  8:19 Dong, Eddie
  2009-04-11 11:43 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Dong, Eddie @ 2009-04-10  8:19 UTC (permalink / raw)
  To: kvm@vger.kernel.org, Avi Kivity; +Cc: Dong, Eddie

	Following code deactivate fpu when CR0.PE is on, any  explaination? Rest of code active/deactive fpu based on cr0.TS bit.
	

thx, eddie




static void vmx_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3)
{
        unsigned long guest_cr3;
        u64 eptp;

        guest_cr3 = cr3;
        if (enable_ept) {
                eptp = construct_eptp(cr3);
                vmcs_write64(EPT_POINTER, eptp);
                ept_sync_context(eptp);
                ept_load_pdptrs(vcpu);
                guest_cr3 = is_paging(vcpu) ? vcpu->arch.cr3 :
                        VMX_EPT_IDENTITY_PAGETABLE_ADDR;
        }

        vmx_flush_tlb(vcpu);
        vmcs_writel(GUEST_CR3, guest_cr3);
        if (vcpu->arch.cr0 & X86_CR0_PE)
                vmx_fpu_deactivate(vcpu);
}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-11 11:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-10  8:19 deactivate fpu when cr0.PE ON? Dong, Eddie
2009-04-11 11:43 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox