Re: powerpc/64s: Fix hypercall entry clobbering r12 input

2017-07-21 Thread Michael Ellerman
On Tue, 2017-07-18 at 05:32:44 UTC, Nicholas Piggin wrote: > A previous optimisation incorrectly assumed the PAPR hcall does > not use r12, and clobbers it upon entry. In fact it is used as > an input. This can result in KVM guests crashing (observed with > PR KVM). > > Instead of using r12 to sav

Re: [PATCH] powerpc/64s: Fix hypercall entry clobbering r12 input

2017-07-18 Thread Nicholas Piggin
On Tue, 18 Jul 2017 10:52:47 -0700 Ram Pai wrote: > On Tue, Jul 18, 2017 at 03:32:44PM +1000, Nicholas Piggin wrote: > > A previous optimisation incorrectly assumed the PAPR hcall does > > not use r12, and clobbers it upon entry. In fact it is used as > > an input. This can result in KVM guests c

Re: [PATCH] powerpc/64s: Fix hypercall entry clobbering r12 input

2017-07-18 Thread Ram Pai
On Tue, Jul 18, 2017 at 03:32:44PM +1000, Nicholas Piggin wrote: > A previous optimisation incorrectly assumed the PAPR hcall does > not use r12, and clobbers it upon entry. In fact it is used as > an input. This can result in KVM guests crashing (observed with > PR KVM). > > Instead of using r12

Re: [PATCH] powerpc/64s: Fix hypercall entry clobbering r12 input

2017-07-18 Thread Michael Ellerman
Nicholas Piggin writes: > A previous optimisation incorrectly assumed the PAPR hcall does > not use r12, and clobbers it upon entry. In fact it is used as > an input. This can result in KVM guests crashing (observed with > PR KVM). > > Instead of using r12 to save r13, tihs patch saves r13 in ctr

[PATCH] powerpc/64s: Fix hypercall entry clobbering r12 input

2017-07-17 Thread Nicholas Piggin
A previous optimisation incorrectly assumed the PAPR hcall does not use r12, and clobbers it upon entry. In fact it is used as an input. This can result in KVM guests crashing (observed with PR KVM). Instead of using r12 to save r13, tihs patch saves r13 in ctr. This is more costly, but not as slo