[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-4.15] x86/ucode: Fix microcode payload size for Fam19 processors
- To: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Tue, 9 Feb 2021 17:39:31 +0000
- 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-SenderADCheck; bh=AXn9QUImd1S3SlodRF6h6lNwYvlJo/Pz7byyPzeRIVA=; b=Giruf/oHuAOWLRTULtX9Dv0aECB2h5X2Oxc0xMwnT2aFGKLXbgCxwcSfpUsWxOvUkKQEg+IskiaAdiBDZBcreXuE1oM9g8Ua8hivyfvDTcFA1ee9t2+BNoEGh175d3HBbCTF0Osy6pKgVNO0syTtBVSkOrSqjFBqqFTJv1NzBRkOXQiktueKQzuiRlqwHwz13lxSPpsSd459ZKbfw6xKrOLYJF3F/3IZv6nq8pEIwemsTkA1aa2OwjFJgQz8e3AgB4eHAYjFHKDuJmAsgj9TtjIw7zReh3Sr0TAA/yU2/Tl6L/NDu3y1jtETwm9acZQqpXJo36+AqJWsvep8xDOzAA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UQ4JKCN7FI9lrh/6QvgivZhHNr2YPkLkGa1JBkQXfEXT9G8H2u3H4DbZc6UUTXVGcudtHSAa1mtgS1szZ7CaiUrBkogdBm/bduWUMBUmcbxTDvDUiyMMES/LuNyZ+xjJ9dM5J9PG2ZM4nKSrMTXP/k5iTqKA/2ANf8+zdH2tCy1VVEVh+3Jd2H27eUfxwLIHoRXUYsHQONq3D4sj3cYg/trWBfIkVpdnA7zPlqXb6JBIpL3vd12qdFle/vCd9EU58fWxkllswq0hvF9+OFgtB2sLRwKX+s2UGH3LeXjbFW+ucDV7QK186Jxbz9JnZduagU/MC+NIuIxo5rK/JMr7lw==
- Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 09 Feb 2021 17:39:50 +0000
- Ironport-sdr: 8QT1x28PzYwSByDlQE4pguL8FEPFcmNiRpkTesBCQ/a1Ph/tkAr73EcwQeN3meekWSTDcP8xCT FR+Y+MouZnJBVGKRGuM56/9MnpTyPLUEoU80MwN/DR0WYpjd0xUVjl3S073iKcjE9nGVlQBSlw MMvVVpUA2sTgQk9VfTxLMc3ojaFejxjfP1MdyQ+7v9+M3EE2FMR8MkpJL1eNtcoL9brOVjnXSo m90zDmfxh2VcvwmLkjvopCiLLk2OuMp7RYVhQQft8Jwszk6V4rKFrApO0gkSZz0CY16ymqobiI JAw=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 09/02/2021 17:17, Ian Jackson wrote:
> Jan Beulich writes ("Re: [PATCH for-4.15] x86/ucode: Fix microcode payload
> size for Fam19 processors"):
>> On 09.02.2021 16:33, Andrew Cooper wrote:
>>> The original limit provided wasn't accurate. Blobs are in fact rather
>>> larger.
>>>
>>> Fixes: fe36a173d1 ("x86/amd: Initial support for Fam19h processors")
>>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
>>
>>> --- a/xen/arch/x86/cpu/microcode/amd.c
>>> +++ b/xen/arch/x86/cpu/microcode/amd.c
>>> @@ -111,7 +111,7 @@ static bool verify_patch_size(uint32_t patch_size)
>>> #define F15H_MPB_MAX_SIZE 4096
>>> #define F16H_MPB_MAX_SIZE 3458
>>> #define F17H_MPB_MAX_SIZE 3200
>>> -#define F19H_MPB_MAX_SIZE 4800
>>> +#define F19H_MPB_MAX_SIZE 5568
>> How certain is it that there's not going to be another increase?
>> And in comparison, how bad would it be if we pulled this upper
>> limit to something that's at least slightly less of an "odd"
>> number, e.g. 0x1800, and thus provide some headroom?
> 5568 does seem really an excessively magic number...
It reads better in hex - 0x15c0. It is exactly the header,
match/patch-ram, and the digital signature of a fixed algorithm.
Its far simpler than Intel's format which contains multiple embedded
blobs, and support for minor platform variations within the same blob.
There are a lot of problems with how we do patch verification on AMD
right now, but its all a consequence of the header not containing a
length field.
This number wont change now. Zen3 processors are out in the world.
~Andrew
|