qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Nicholas Piggin" <npiggin@gmail.com>
To: "Harsh Prateek Bora" <harshpb@linux.ibm.com>, <qemu-ppc@nongnu.org>
Cc: <qemu-devel@nongnu.org>
Subject: Re: [RFC PATCH 3/4] spapr: load and store l2 state with helper functions
Date: Sat, 13 May 2023 13:30:55 +1000	[thread overview]
Message-ID: <CSKTZ8U3VQHZ.3727FT9EHMMUU@wheely> (raw)
In-Reply-To: <1d0ce917-7ea0-35dd-b79f-5054ac81412b@linux.ibm.com>

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	other threads:[~2023-05-13  3:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03  0:39 [RFC PATCH 0/4] spapr: clean up nested hv Nicholas Piggin
2023-05-03  0:39 ` [RFC PATCH 1/4] spapr: H_ENTER_NESTED should restore host XER ca field Nicholas Piggin
2023-05-05 10:20   ` Harsh Prateek Bora
2023-05-03  0:39 ` [RFC PATCH 2/4] spapr: Add a nested state struct Nicholas Piggin
2023-05-05 10:54   ` Harsh Prateek Bora
2023-05-13  3:27     ` Nicholas Piggin
2023-05-03  0:39 ` [RFC PATCH 3/4] spapr: load and store l2 state with helper functions Nicholas Piggin
2023-05-05 11:03   ` Harsh Prateek Bora
2023-05-13  3:30     ` Nicholas Piggin [this message]
2023-05-03  0:39 ` [RFC PATCH 4/4] spapr: Move spapr nested HV to a new file Nicholas Piggin
2023-05-05 11:09   ` Harsh Prateek Bora
2023-05-13  3:32     ` Nicholas Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CSKTZ8U3VQHZ.3727FT9EHMMUU@wheely \
    --to=npiggin@gmail.com \
    --cc=harshpb@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).