[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] x86/amd: Address AMD erratum #1485
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Tue, 17 Oct 2023 11:33:24 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MUyiJlry2f3+2kRIedj7PLj+jMMn+Wc3WjU6xAos6WQ=; b=SHBnV3UAh30VmKR/Zm2bzla3MWXec6f7gOWN+3QzImiWefb8BI9joTejmCKUFHWHY8b6E2tBGrfcVz/A1ltveHDsAHEkO5Mqyx7EiZSLF0jYaAmb5v0W7NhqXi1AB5b+OFCulr3dbga809DTWrfpAxYrab8e12KAeaaP4mcascbvSHpHZT9G3NDn3tFtFVJ/XlgyRHamEYQRWWqv0zZrSzFU4U3ykbFXWBcZIcpLXgSdeNoLTZz7BuQEQKmsFD/MZdB8SUVYCX1ScPspIftR+UZHN1Iudpd9gdjy4awJjo2AlsTYzK+qZMbe0a8jAdX0ptzsFxpu2JkIX6VEy55mOQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lrP9OUtvpF59T0mS+9jI0s9yxAGf7rsjdUwo1k3s8bptRDOikuIyD16Tqy4vt08vWV14muf0/46cG3vqTT3TvXysPJMV78840bbYDOh0wVFKYkFfREe2bDDN5Sx9/BJpsqxJoKI46o+5J4oDRCmVvL+brEjMSDFxTitscJajrPJiYkwCjHL7pRC1e8bTOamM+RtxtRdlOAUWzNvRPv0VbbvGNhrL6P4o0CmnbwbAXZhv6UodZpvA27EgBGIP8uDj5yO0AjJyciRPEWWNTAD9w9y9023iMF/mqLajtv5Of5fQ4yJhdRdysvuSiue19eoPZrmZxX+jM6UyWu1+G2/cBA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Delivery-date: Tue, 17 Oct 2023 09:33:57 +0000
- Ironport-data: A9a23:9L9JnqONgtxeYRrvrR10lsFynXyQoLVcMsEvi/4bfWQNrUorgzQFm GEeX2yCbvyPNGrwet8gbYm/8RkAuJeBzYNkQAto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CQ6jefQAOOkVIYoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGjxSs/nrRC9H5qyo42pA5wNmPJingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0ux4QjFo5 6QCFDoIPyCjusin6bCGROY506zPLOGzVG8ekldJ6GiBSNMZG9XESaiM4sJE1jAtgMwIBezZe 8cSdTtoalLHfgFLPVAUTpk5mY9EhFGmK2Ee9A3T+PdxujCLpOBy+OGF3N79YNuFSN8Thk+Fj mnH4374ElcRM9n3JT+tqyj827CRwX6kMG4UPLajrcJTsVCq+jUOCRMdBGW1g6WEk0HrDrqzL GRRoELCt5Ma9kamU938VB2Qu2Ofs1gXXN84O+Q+5QOEzKbO5ECHD2wAQzxGQNcis9I6Azct0 zehgNfBFTFp9rqPRhq11rqStyL0BiETIkcLfypCRgwAi/HzrYd2gh/RQ9JLFK+uksazCTz22 yqNriU1m/MUl8Fj6kmg1VXOgjbpo4eTSAcwv13TRjj8tls/Y5O5bYu171Sd9exHMIuSUliGu j4DhtSa6+cNS5qKkURhXdkwIV1g3N7dWBW0vLKlN8BJG+iFk5J7Qb1t3Q==
- Ironport-hdrordr: A9a23:OnditK2QRP7EFfgbsmDzcAqjBHYkLtp133Aq2lEZdPU0SKGlfq GV7ZEmPHrP4gr5N0tOpTntAse9qBDnhPxICOsqXYtKNTOO0AeVxelZhrcKqAeQeBEWmNQ96U 9hGZIOcuEZDzJB/LvHCN/TKadd/DGFmprY+ts31x1WPGVXgzkL1XYANu6ceHcGIzVuNN4CO7 e3wNFInDakcWR/VLXBOpFUN9KzweEijfjdEGc7OyI=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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@xxxxxxxxxxxxx/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.
|