[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] x86/amd: Address AMD erratum #1485
- To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 17 Oct 2023 11:21:47 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=fWH6PyxsxbxR2mPdR/PgCHGLg1K4mC+PPMLkGM0TcsY=; b=hO/eu53kTEyYQLP/JGBIfGmQ/WjkEulawE5O9QN/r2tRQZxoeSwZ3WNGXYq735hHM1ZZt4lBmXncmsRLkNtr/Qag/bceeyHFFEbA6isj5XUfXgnWxNw/+FvNvErkT1ee1jJ+p7KgDdNa0TRbB7PEjvXAj0oZpqfqo2xzmZzxODW6Jktdcs+pcqwWI8CWfTBZTBsH8DzYHjKMTjwUWubws+hunvlPD3NVZRGcLgP/S22cWlBdLvVSY3A9UApDjgu1NJxA4evoJLXVZcPROKwhj4YWrla1Nr5hPfMrzkNEIgnTJnpDKDeROt/RKXl1CxCPDFPumRyPrzv7ugS2M04stQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Df+rgkpu7HkQoHuF78l4ZX8vrVT2raE/5E57qVKi6E0wu2Rwwg+R9sazsVlXaCWRkObzbEjrFi0EZDWD64zlhuGwaXDRIdEGCoB0bF6+gxpiznGHJ1VhIKuM+IZAeiy4Ag76SdHCtLlfI39n+GXgO1cP1QtR3rS2AIH2Xvd3gtIBbzrdQsTmkQsJbKbWyzcEY20nJ9CaRdFmJSsPbA2qIq3wN+XhWxWyTI8lGEa9fXMjNAXNxKZgDWeelJgp8ZL/ynBXEXSv4KTcbHgffcf71TJaeTdTKgTCzbULgoV4k1QxNHa1/cgdvt5twhT7gKKnJA6G7xSFWmYH/NEbpewxdA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.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:21:57 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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".
Jan
|