Re: [PATCH] KVM: PPC: Save/Restore CR over vcpu_run

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/05/2012 10:02 AM, Alexander Graf wrote:
> @@ -442,6 +444,7 @@ heavyweight_exit:
>  
>  	/* Return to kvm_vcpu_run(). */
>  	mtlr	r5
> +	mtcr	r6
>  	addi	r1, r1, HOST_STACK_SIZE
>  	/* r3 still contains the return code from kvmppc_handle_exit(). */
>  	blr
> @@ -459,6 +462,9 @@ _GLOBAL(__kvmppc_vcpu_run)
>  	mflr	r3
>  	PPC_STL	r3, HOST_STACK_LR(r1)
>  
> +	mfcr	r5
> +	stw	r5, HOST_CR(r1)

If you move the mfcr before the PPC_STL they should be able to run in
parallel.  Otherwise on e500mc mfcr will wait for PPC_STL to take its 3
cycles and then mfcr will take 5 cyles before the stw of HOST_CR.
Alternatively, consider using mcrf/mtocrf three times.

Similar issues in booke_interrupts.S (except we can't assume mtocrf
exists there), but I'm less worried about that one as it still needs an
optimization pass in general.

-Scott

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux