[PATCH v4 0/8] Misc clean ups to target/ppc exception handling

BALATON Zoltan posted 8 patches 2 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1698158152.git.balaton@eik.bme.hu
Maintainers: Nicholas Piggin <npiggin@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>
There is a newer version of this series
target/ppc/cpu.h         |   1 +
target/ppc/excp_helper.c | 420 ++++++++++++---------------------------
target/ppc/translate.c   |  16 +-
3 files changed, 139 insertions(+), 298 deletions(-)
[PATCH v4 0/8] Misc clean ups to target/ppc exception handling
Posted by BALATON Zoltan 2 years, 2 months ago
These are some small clean ups for target/ppc/excp_helper.c trying to
make this code a bit simpler. No functional change is intended. This
series was submitted before but only partially merged due to freeze
and conflicting series os thia was postponed then to avoid conflicts.

v4: Rebased on master dropping what was merged

BALATON Zoltan (7):
  target/ppc: Use env_cpu for cpu_abort in excp_helper
  target/ppc: Readability improvements in exception handlers
  target/ppc: Fix gen_sc to use correct nip
  target/ppc: Simplify syscall exception handlers
  target/ppc: Clean up ifdefs in excp_helper.c, part 1
  target/ppc: Clean up ifdefs in excp_helper.c, part 2
  target/ppc: Clean up ifdefs in excp_helper.c, part 3

Nicholas Piggin (1):
  target/ppc: Move patching nip from exception handler to helper_scv

 target/ppc/cpu.h         |   1 +
 target/ppc/excp_helper.c | 420 ++++++++++++---------------------------
 target/ppc/translate.c   |  16 +-
 3 files changed, 139 insertions(+), 298 deletions(-)

-- 
2.30.9
Re: [PATCH v4 0/8] Misc clean ups to target/ppc exception handling
Posted by BALATON Zoltan 2 years, 2 months ago
On Tue, 24 Oct 2023, BALATON Zoltan wrote:
> These are some small clean ups for target/ppc/excp_helper.c trying to
> make this code a bit simpler. No functional change is intended. This
> series was submitted before but only partially merged due to freeze
> and conflicting series os thia was postponed then to avoid conflicts.

Ping?

> v4: Rebased on master dropping what was merged
>
> BALATON Zoltan (7):
>  target/ppc: Use env_cpu for cpu_abort in excp_helper
>  target/ppc: Readability improvements in exception handlers
>  target/ppc: Fix gen_sc to use correct nip
>  target/ppc: Simplify syscall exception handlers
>  target/ppc: Clean up ifdefs in excp_helper.c, part 1
>  target/ppc: Clean up ifdefs in excp_helper.c, part 2
>  target/ppc: Clean up ifdefs in excp_helper.c, part 3
>
> Nicholas Piggin (1):
>  target/ppc: Move patching nip from exception handler to helper_scv
>
> target/ppc/cpu.h         |   1 +
> target/ppc/excp_helper.c | 420 ++++++++++++---------------------------
> target/ppc/translate.c   |  16 +-
> 3 files changed, 139 insertions(+), 298 deletions(-)
>
>
Re: [PATCH v4 0/8] Misc clean ups to target/ppc exception handling
Posted by Nicholas Piggin 2 years, 1 month ago
On Wed Nov 1, 2023 at 8:44 PM AEST, BALATON Zoltan wrote:
> On Tue, 24 Oct 2023, BALATON Zoltan wrote:
> > These are some small clean ups for target/ppc/excp_helper.c trying to
> > make this code a bit simpler. No functional change is intended. This
> > series was submitted before but only partially merged due to freeze
> > and conflicting series os thia was postponed then to avoid conflicts.
>
> Ping?

May just leave this for next release, sorry.

I still didn't like the change to logging -- that's not intended to
print some machine implementation detail, but the address of the
instruction that caused the syscall/hcall. That could be changed
easily enough.

But I am also now in two minds about the change to nip too.
Synchronous interrupt is today handled here with nip at the address
of the instruction that caused it. That's *also* a nice invaraint to
have.

Other patches seem okay.

Thanks,
Nick
Re: [PATCH v4 0/8] Misc clean ups to target/ppc exception handling
Posted by BALATON Zoltan 2 years, 1 month ago
On Mon, 13 Nov 2023, Nicholas Piggin wrote:
> On Wed Nov 1, 2023 at 8:44 PM AEST, BALATON Zoltan wrote:
>> On Tue, 24 Oct 2023, BALATON Zoltan wrote:
>>> These are some small clean ups for target/ppc/excp_helper.c trying to
>>> make this code a bit simpler. No functional change is intended. This
>>> series was submitted before but only partially merged due to freeze
>>> and conflicting series os thia was postponed then to avoid conflicts.
>>
>> Ping?
>
> May just leave this for next release, sorry.

No problem, these aren't that important. I've tried to optimise exception 
handling a bit as these seem to happen very often with some guests. 
Especially sc is common so that's why I tried to avoid moving nip around 
unnecessarily. But these did not have a great impact (unlike the ppc440 
tlbwe patches) so they are just clean ups now to alow further profiling 
and optimisation later. It can wait until the next devel window.

Regards,
BALATON Zoltan

> I still didn't like the change to logging -- that's not intended to
> print some machine implementation detail, but the address of the
> instruction that caused the syscall/hcall. That could be changed
> easily enough.
>
> But I am also now in two minds about the change to nip too.
> Synchronous interrupt is today handled here with nip at the address
> of the instruction that caused it. That's *also* a nice invaraint to
> have.
>
> Other patches seem okay.
>
> Thanks,
> Nick
>
>