mbox series

[0/3] powerpc/ps3: Fixes for lv1 hcall assembly

Message ID 20231227072405.63751-1-npiggin@gmail.com (mailing list archive)
Headers show
Series powerpc/ps3: Fixes for lv1 hcall assembly | expand

Message

Nicholas Piggin Dec. 27, 2023, 7:24 a.m. UTC
This (hopefully) fixes the ELFv2 bug that Geoff reported, with patch
1. And a couple of other possible improvements I noticed.

I don't have a PS3 setup[*] so I have only compile tested these, I'm
sorry.

[*] Is RPCS3 usable for this kind of thing?

Thanks,
Nick

Nicholas Piggin (3):
  powerpc/ps3: Fix lv1 hcall assembly for ELFv2 calling convention
  powerpc/ps3: lv1 hcall code use symbolic constant for LR save offset
  powerpc/ps3: Make real stack frames for LV1 hcalls

 arch/powerpc/include/asm/ppc_asm.h  |   6 +-
 arch/powerpc/platforms/ps3/hvcall.S | 298 ++++++++++++++++------------
 2 files changed, 171 insertions(+), 133 deletions(-)

Comments

Geoff Levand Dec. 27, 2023, 9:50 a.m. UTC | #1
Hi,

On 12/27/23 16:24, Nicholas Piggin wrote:
> This (hopefully) fixes the ELFv2 bug that Geoff reported, with patch
> 1. And a couple of other possible improvements I noticed.
> 
> I don't have a PS3 setup[*] so I have only compile tested these, I'm
> sorry.
> 
> [*] Is RPCS3 usable for this kind of thing?
> 
> Thanks,
> Nick
> 
> Nicholas Piggin (3):
>   powerpc/ps3: Fix lv1 hcall assembly for ELFv2 calling convention
>   powerpc/ps3: lv1 hcall code use symbolic constant for LR save offset
>   powerpc/ps3: Make real stack frames for LV1 hcalls

A big thanks for working on this.  I'll test on PS3 within the next
few days and report back.

-Geoff
Geoff Levand Dec. 29, 2023, 8:53 a.m. UTC | #2
Hi Nick,

On 12/27/23 18:50, Geoff Levand wrote:
>> Nicholas Piggin (3):
>>   powerpc/ps3: Fix lv1 hcall assembly for ELFv2 calling convention
>>   powerpc/ps3: lv1 hcall code use symbolic constant for LR save offset
>>   powerpc/ps3: Make real stack frames for LV1 hcalls

I tested these patches applied to v6.7-rc7 on PS3 with
CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2=y, and they seem to be working OK.  I did
not do any extensive testing though.

I tested three configurations:

 - With only the first patch 'Fix lv1 hcall assembly for ELFv2 calling
   convention' applied.

 - With the first two patches, 'Fix lv1 hcall assembly for ELFv2 calling
   convention' and 'lv1 hcall code use symbolic constant for LR save
   offset' applied.

 - And with all three patches applied.

All three configurations worked OK.  Thanks again for working on this.

Michael, I think we can just add these three patches and remove my patch that
disables CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2.

Tested-by: Geoff Levand <geoff@infradead.org>
Michael Ellerman Feb. 26, 2024, 5:56 a.m. UTC | #3
On Wed, 27 Dec 2023 17:24:02 +1000, Nicholas Piggin wrote:
> This (hopefully) fixes the ELFv2 bug that Geoff reported, with patch
> 1. And a couple of other possible improvements I noticed.
> 
> I don't have a PS3 setup[*] so I have only compile tested these, I'm
> sorry.
> 
> [*] Is RPCS3 usable for this kind of thing?
> 
> [...]

Applied to powerpc/next.

[1/3] powerpc/ps3: Fix lv1 hcall assembly for ELFv2 calling convention
      https://git.kernel.org/powerpc/c/6735fef14c1f089ae43fd6d43add818b7ff682a8
[2/3] powerpc/ps3: lv1 hcall code use symbolic constant for LR save offset
      https://git.kernel.org/powerpc/c/d901473c4dd0198d2d60553ea483d632175af4ea
[3/3] powerpc/ps3: Make real stack frames for LV1 hcalls
      https://git.kernel.org/powerpc/c/28b2ed86750cf5be86d19dd6ff236b23e98b255d

cheers