BOOKE KVM calling load_up_fpu from C?

Bhushan Bharat-R65777 R65777 at freescale.com
Tue Feb 12 14:37:54 EST 2013



> -----Original Message-----
> From: Linuxppc-dev [mailto:linuxppc-dev-
> bounces+bharat.bhushan=freescale.com at lists.ozlabs.org] On Behalf Of Michael
> Neuling
> Sent: Tuesday, February 12, 2013 8:59 AM
> To: Wood Scott-B07421
> Cc: linuxppc-dev at lists.ozlabs.org
> Subject: BOOKE KVM calling load_up_fpu from C?
> 
> Scott,
> 
> I was looking at changing how load_up_fpu works and I found this in
> arch/powerpc/kvm/booke.h:
> 
> static inline void kvmppc_load_guest_fp(struct kvm_vcpu *vcpu) { #ifdef
> CONFIG_PPC_FPU
> 	if (vcpu->fpu_active && !(current->thread.regs->msr & MSR_FP)) {
> 		load_up_fpu();
> 		current->thread.regs->msr |= MSR_FP;
> 	}
> #endif
> }
> 
> I'm wondering how this is suppose to work since load_up_fpu is suppose to have
> MSR in R12?

Is not the load_up_fpu() does mfmsr:

_GLOBAL(load_up_fpu)
        mfmsr   r5
        ori     r5,r5,MSR_FP
#ifdef CONFIG_VSX
BEGIN_FTR_SECTION
        oris    r5,r5,MSR_VSX at h
END_FTR_SECTION_IFSET(CPU_FTR_VSX)
#endif
        SYNC
        MTMSRD(r5)                      /* enable use of fpu now */
        isync
<snip>

-Bharat

> 
> Mikey
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev




More information about the Linuxppc-dev mailing list