qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 3/4] spapr: load and store l2 state with helper functions


From: Nicholas Piggin
Subject: Re: [RFC PATCH 3/4] spapr: load and store l2 state with helper functions
Date: Sat, 13 May 2023 13:30:55 +1000

On Fri May 5, 2023 at 9:03 PM AEST, Harsh Prateek Bora wrote:
> <correcting my email in CC>
>
> On 5/3/23 06:09, Nicholas Piggin wrote:
> > Arguably this is just shuffling around register accesses, but one nice
> > thing it does is allow the exit to save away the L2 state then switch
> > the environment to the L1 before copying L2 data back to the L1, which
> > logically flows more naturally and simplifies the error paths.
> > 
> The supposed advantage you have mentioned is coming at the cost of 
> double copy (env -> l2_state, switch to L1, l2_state -> hvstate/ptregs), 
> but previously we were just doing a single copy that directly conveyed 
> it to L1 before switching to L1. Additional copy means additional delay 
> in transition of L1/L2. Not sure if it's worth it?

Yeah, the memcpy in the host  is the least of our performance concerns
though (and removing the CPUPPCState memcpy in the series will reduce
the total amount of copying done in entry/exit anyway).

I think clearer code is more important here.

Thanks,
Nick



reply via email to

[Prev in Thread] Current Thread [Next in Thread]