From nobody Fri Mar 29 06:20:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1617265704; cv=none; d=zohomail.com; s=zohoarc; b=f01buMyR1sK2aIxCu5Lq56fR5A2D2FoTQGLRfzz2ODhhfFX9P0zsG2CGMJquDKdfJsKlLOaMxsNCtSjdnHLTaxyd5QBuWHNdXgxhBdlrOLosF9vbpvv6QF3i9zBI3P0g/ojMfmV5wz/tQOkyo32SCTVoiJQnLTnoWWXwH0c4rcY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617265704; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=cWIQ6va35/HadgSZsBXIRMGX3zL3qfKRBRXkkpIfliA=; b=DYBa/gsLLFGaowdaXq9OaEHyqmdmIcrnGh5opjRxalckNW9xzVdNYxFqKqr/bCbNTW4Q/RmYJ6Om2DsHmWIcJS9pFhVycWUvky56K0tT8KWAkHYHCGIEKlcIETnKL1RPGBBSuCJwWKJygRcomZFUz4tl85vMPVZfyzCb4vX9pWs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1617265704079147.94336366434186; Thu, 1 Apr 2021 01:28:24 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.104148.198846 (Exim 4.92) (envelope-from ) id 1lRsgS-0003t3-6K; Thu, 01 Apr 2021 08:28:08 +0000 Received: by outflank-mailman (output) from mailman id 104148.198846; Thu, 01 Apr 2021 08:28:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lRsgS-0003sw-1V; Thu, 01 Apr 2021 08:28:08 +0000 Received: by outflank-mailman (input) for mailman id 104148; Thu, 01 Apr 2021 08:28:06 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lRsgQ-0003sr-HL for xen-devel@lists.xenproject.org; Thu, 01 Apr 2021 08:28:06 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id d7c79b19-9747-4feb-9a33-9e1ea16f3f9e; Thu, 01 Apr 2021 08:28:05 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C85F7AE86; Thu, 1 Apr 2021 08:28:04 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d7c79b19-9747-4feb-9a33-9e1ea16f3f9e X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1617265684; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cWIQ6va35/HadgSZsBXIRMGX3zL3qfKRBRXkkpIfliA=; b=sDhUkmNTd5oIFSOkfnM/qYhVwfDqGgi6ca3UIvXBfw03d9pzwOogDm0nwsIJrXhHzEJ2qN JFk5Jw1KWP2e8S7DknCSqrPrPLbiiQP0grYWl+uy+QCVSXp1aePFXYaDiWeQu5WOj/pFhe 7CGcpg3a1U1Ek0TqY689BwOfYExedaw= To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= From: Jan Beulich Subject: [PATCH] x86/ucode: log blob date also for AMD Message-ID: Date: Thu, 1 Apr 2021 10:28:04 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) Content-Type: text/plain; charset="utf-8" Like Intel, AMD also records the date in their blobs. The field was merely misnamed as "data_code" so far; this was perhaps meant to be "date_code". Split it into individual fields, just like we did for Intel some time ago, and extend the message logged after a successful update. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- a/xen/arch/x86/cpu/microcode/amd.c +++ b/xen/arch/x86/cpu/microcode/amd.c @@ -33,7 +33,9 @@ struct equiv_cpu_entry { }; =20 struct microcode_patch { - uint32_t data_code; + uint16_t year; + uint8_t day; + uint8_t month; uint32_t patch_id; uint8_t mc_patch_data_id[2]; uint8_t mc_patch_data_len; @@ -251,8 +253,9 @@ static int apply_microcode(const struct return -EIO; } =20 - printk(XENLOG_WARNING "microcode: CPU%u updated from revision %#x to %= #x\n", - cpu, old_rev, rev); + printk(XENLOG_WARNING + "microcode: CPU%u updated from revision %#x to %#x, date =3D %0= 4x-%02x-%02x\n", + cpu, old_rev, rev, patch->year, patch->month, patch->day); =20 return 0; }