From: Haren Myneni <haren@linux.ibm.com>
To: Nicholas Piggin <npiggin@gmail.com>,
linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au
Subject: Re: [PATCH v3 03/10] powerpc/pseries/vas: Save LPID in pseries_vas_window struct
Date: Tue, 15 Feb 2022 17:09:12 -0800 [thread overview]
Message-ID: <ae9c6a42fb9e19e9a1dfc6beb84bddc72ad6c637.camel@linux.ibm.com> (raw)
In-Reply-To: <1644805860.xhvkad4duc.astroid@bobo.none>
On Mon, 2022-02-14 at 12:41 +1000, Nicholas Piggin wrote:
> Excerpts from Haren Myneni's message of January 22, 2022 5:55 am:
> > The kernel sets the VAS window with partition PID when is opened in
> > the hypervisor. During DLPAR operation, windows can be closed and
> > reopened in the hypervisor when the credit is available. So saves
> > this PID in pseries_vas_window struct when the window is opened
> > initially and reuse it later during DLPAR operation.
>
> This probably shouldn't be called lpid, while you're changing it.
> "partition PID" and "LPAR PID" is also confusing. I know the name
> somewhat comes from the specifiction, but pid/PID would be fine,
> it's clear we are talking about "this LPAR" when in pseries code.
>
> > Signed-off-by: Haren Myneni <haren@linux.ibm.com>
> > ---
> > arch/powerpc/platforms/pseries/vas.c | 7 ++++---
> > arch/powerpc/platforms/pseries/vas.h | 1 +
> > 2 files changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/powerpc/platforms/pseries/vas.c
> > b/arch/powerpc/platforms/pseries/vas.c
> > index d2c8292bfb33..2ef56157634f 100644
> > --- a/arch/powerpc/platforms/pseries/vas.c
> > +++ b/arch/powerpc/platforms/pseries/vas.c
> > @@ -107,7 +107,6 @@ static int h_deallocate_vas_window(u64 winid)
> > static int h_modify_vas_window(struct pseries_vas_window *win)
> > {
> > long rc;
> > - u32 lpid = mfspr(SPRN_PID);
> >
> > /*
> > * AMR value is not supported in Linux VAS implementation.
> > @@ -115,7 +114,7 @@ static int h_modify_vas_window(struct
> > pseries_vas_window *win)
> > */
> > do {
> > rc = plpar_hcall_norets(H_MODIFY_VAS_WINDOW,
> > - win->vas_win.winid, lpid, 0,
> > + win->vas_win.winid, win->lpid,
> > 0,
> > VAS_MOD_WIN_FLAGS, 0);
> >
> > rc = hcall_return_busy_check(rc);
> > @@ -125,7 +124,7 @@ static int h_modify_vas_window(struct
> > pseries_vas_window *win)
> > return 0;
> >
> > pr_err("H_MODIFY_VAS_WINDOW error: %ld, winid %u lpid %u\n",
> > - rc, win->vas_win.winid, lpid);
> > + rc, win->vas_win.winid, win->lpid);
> > return -EIO;
> > }
> >
> > @@ -338,6 +337,8 @@ static struct vas_window
> > *vas_allocate_window(int
> > vas_id, u64 flags,
> > }
> > }
> >
> > + txwin->lpid = mfspr(SPRN_PID);
> > +
> > /*
> > * Allocate / Deallocate window hcalls and setup / free IRQs
> > * have to be protected with mutex.
> > diff --git a/arch/powerpc/platforms/pseries/vas.h
> > b/arch/powerpc/platforms/pseries/vas.h
> > index fa7ce74f1e49..0538760d13be 100644
> > --- a/arch/powerpc/platforms/pseries/vas.h
> > +++ b/arch/powerpc/platforms/pseries/vas.h
> > @@ -115,6 +115,7 @@ struct pseries_vas_window {
> > u64 domain[6]; /* Associativity domain Ids */
> > /* this window is allocated */
> > u64 util;
> > + u32 lpid;
>
> Comment could be "PID associated with this window".
yes, will add this comment.
>
> BTW, is the TID parameter deprecated? Doesn't seem that we use that.
Right, tpid is deprecated on p10 and we are not using it.
Thanks
Haren
>
> Thanks,
> Nick
next prev parent reply other threads:[~2022-02-16 1:10 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-21 19:52 [PATCH v3 00/10] powerpc/pseries/vas: NXGZIP support with DLPAR Haren Myneni
2022-01-21 19:54 ` [PATCH v3 01/10] powerpc/pseries/vas: Use common names in VAS capability structure Haren Myneni
2022-02-14 2:14 ` Nicholas Piggin
2022-02-15 18:32 ` Haren Myneni
2022-01-21 19:54 ` [PATCH v3 02/10] powerpc/pseries/vas: Add notifier for DLPAR core removal/add Haren Myneni
2022-02-14 2:27 ` Nicholas Piggin
2022-02-16 1:07 ` Haren Myneni
2022-01-21 19:55 ` [PATCH v3 03/10] powerpc/pseries/vas: Save LPID in pseries_vas_window struct Haren Myneni
2022-02-14 2:41 ` Nicholas Piggin
2022-02-16 1:09 ` Haren Myneni [this message]
2022-01-21 19:56 ` [PATCH v3 04/10] powerpc/pseries/vas: Reopen windows with DLPAR core add Haren Myneni
2022-02-14 3:08 ` Nicholas Piggin
2022-02-16 1:38 ` Haren Myneni
2022-01-21 19:57 ` [PATCH v3 05/10] powerpc/pseries/vas: Close windows with DLPAR core removal Haren Myneni
2022-02-14 3:17 ` Nicholas Piggin
2022-02-16 1:48 ` Haren Myneni
2022-01-21 19:58 ` [PATCH v3 06/10] powerpc/vas: Map paste address only if window is active Haren Myneni
2022-02-14 3:20 ` Nicholas Piggin
2022-02-16 1:58 ` Haren Myneni
2022-01-21 19:59 ` [PATCH v3 07/10] powerpc/vas: Add paste address mmap fault handler Haren Myneni
2022-02-14 3:37 ` Nicholas Piggin
2022-02-16 2:21 ` Haren Myneni
2022-01-21 19:59 ` [PATCH v3 08/10] powerpc/vas: Return paste instruction failure if no active window Haren Myneni
2022-02-14 3:41 ` Nicholas Piggin
2022-01-21 20:00 ` [PATCH v3 09/10] powerpc/pseries/vas: sysfs interface to export capabilities Haren Myneni
2022-02-14 3:49 ` Nicholas Piggin
2022-01-21 20:01 ` [PATCH v3 10/10] powerpc/pseries/vas: Write 'target_creds' for QoS credits change Haren Myneni
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=ae9c6a42fb9e19e9a1dfc6beb84bddc72ad6c637.camel@linux.ibm.com \
--to=haren@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
/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).