mbox series

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

Message ID cover.1698158152.git.balaton@eik.bme.hu
Headers show
Series Misc clean ups to target/ppc exception handling | expand

Message

BALATON Zoltan Oct. 24, 2023, 3:34 p.m. UTC
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(-)

Comments

BALATON Zoltan Nov. 1, 2023, 10:44 a.m. UTC | #1
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(-)
>
>
Nicholas Piggin Nov. 13, 2023, 10:34 a.m. UTC | #2
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
BALATON Zoltan Nov. 13, 2023, 12:08 p.m. UTC | #3
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
>
>