Fix pseries hcall functions

Anton Blanchard anton at samba.org
Thu Feb 10 22:03:48 EST 2005


 
Hi Alan,

> Do you really need to save cr?  ie. Does the hypervisor call trash
> cr2, cr3 or cr4?

Good question. I went back and read the spec, it only trashes 0, 1, 5-7.

> >  _GLOBAL(plpar_hcall_4out)
> >  	mfcr	r0
> > -	std	r0,-8(r1)
> > -	ld      r14,112(r1)
> > -	stdu	r1,-48(r1) 
> > -
> > -	std     r8,32(r1)       /* Save out ptrs. */
> > -	std     r9,24(r1)
> > -	std     r10,16(r1)
> > -	std     r14,8(r1)
> > -	
> > -	HVSC                    /* invoke the hypervisor */
> > +	std	r0,8(r1)
> 
> stw here.

Ouch, good catch.

Anton



More information about the Linuxppc64-dev mailing list