[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c9c7c983235a5aaaee111f8ad258a99c8e4b04ba.camel@surriel.com>
Date: Mon, 06 Jan 2025 12:32:38 -0500
From: Rik van Riel <riel@...riel.com>
To: Dave Hansen <dave.hansen@...el.com>, Borislav Petkov <bp@...en8.de>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, kernel-team@...a.com,
dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
akpm@...ux-foundation.org, nadav.amit@...il.com,
zhengqi.arch@...edance.com, linux-mm@...ck.org
Subject: Re: [PATCH 05/12] x86/mm: add INVLPGB support code
On Mon, 2025-01-06 at 08:50 -0800, Dave Hansen wrote:
> On 1/2/25 04:42, Borislav Petkov wrote:
> > > +#define INVLPGB_VA BIT(0)
> > > +#define INVLPGB_PCID BIT(1)
> > > +#define INVLPGB_ASID BIT(2)
> > > +#define INVLPGB_INCLUDE_GLOBAL BIT(3)
> > > +#define INVLPGB_FINAL_ONLY BIT(4)
> > > +#define INVLPGB_INCLUDE_NESTED BIT(5)
> > Please add only the defines which are actually being used. Ditto
> > for the
> > functions.
>
> There's some precedent for defining them all up front, like we did
> for
> invpcid_flush_*().
>
> For INVPCID, there are four variants and two of them got used up
> front.
> But I get that it's a balancing act between having untested code that
> might bitrot and introducing helpers at a time when someone (Rik) is
> very likely to get all the variants coded up correctly.
>
> Rik, how many of these end up being used by the end of the series?
>
Only invlpgb_flush_single_asid is unused at the
end of the series.
I'll remove that one.
As for the bit flags, those are a hardware
interface. I can remove the unused ones, but
would like to know why :)
--
All Rights Reversed.
Powered by blists - more mailing lists