From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Alejandro Vallejo <alejandro.vallejo@cloud.com>,
Wei Liu <wl@xen.org>, Henry Wang <Henry.Wang@arm.com>,
Xen-devel <xen-devel@lists.xenproject.org>,
Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH v3] x86/amd: Address AMD erratum #1485
Date: Tue, 17 Oct 2023 11:33:24 +0200 [thread overview]
Message-ID: <ZS5U5MF5MuBK4guP@macbook> (raw)
In-Reply-To: <3d043b4e-f6b6-1852-94d0-c0cfb5489661@suse.com>
On Tue, Oct 17, 2023 at 11:21:47AM +0200, Jan Beulich wrote:
> On 17.10.2023 11:13, Roger Pau Monné wrote:
> > On Tue, Oct 17, 2023 at 08:50:45AM +0100, Andrew Cooper wrote:
> >> On 17/10/2023 8:44 am, Jan Beulich wrote:
> >>> On 13.10.2023 17:38, Alejandro Vallejo wrote:
> >>>> Fix adapted off Linux's mailing list:
> >>>> https://lore.kernel.org/lkml/D99589F4-BC5D-430B-87B2-72C20370CF57@exactcode.com/T/#u
> >>> Why reference the bug report when there's a proper commit (f454b18e07f5) now?
> >>> Plus in any event a short summary of the erratum would help if put right here
> >>> (without needing to look up any documents or follow any links).
> >>
> >> That is not public information yet. The erratum number alone is the
> >> best we can do at this juncture.
> >>>> --- a/xen/arch/x86/cpu/amd.c
> >>>> +++ b/xen/arch/x86/cpu/amd.c
> >>>> @@ -1004,6 +1004,28 @@ static void cf_check zen2_disable_c6(void *arg)
> >>>> wrmsrl(MSR_AMD_CSTATE_CFG, val & mask);
> >>>> }
> >>>>
> >>>> +static void amd_check_erratum_1485(void)
> >>>> +{
> >>>> + uint64_t val, chickenbit = (1 << 5);
> >>> Linux gives the bit a name. Any reason you don't?
> >>
> >> There are multiple different names depending on where you look, and none
> >> are particularly relevant here.
> >
> > Could we make chickenbit const static?
> >
> > I would also use ULL just to be on the safe side, because we then copy
> > this for a different bit and it explodes.
>
> I guess the way it is resembles what we already have in amd_check_zenbleed().
> Also it's not clear to me why besides "const" you also ask for "static".
Yes, makes no sense to put in .rodata, sorry, just const.
Roger.
next prev parent reply other threads:[~2023-10-17 9:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 15:38 [PATCH v3] x86/amd: Address AMD erratum #1485 Alejandro Vallejo
2023-10-17 7:44 ` Jan Beulich
2023-10-17 7:50 ` Andrew Cooper
2023-10-17 9:13 ` Roger Pau Monné
2023-10-17 9:21 ` Jan Beulich
2023-10-17 9:33 ` Roger Pau Monné [this message]
2023-10-17 9:23 ` Andrew Cooper
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=ZS5U5MF5MuBK4guP@macbook \
--to=roger.pau@citrix.com \
--cc=Henry.Wang@arm.com \
--cc=alejandro.vallejo@cloud.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.