Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52E1AC433E7 for ; Thu, 8 Oct 2020 07:50:10 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C1C1C2184D for ; Thu, 8 Oct 2020 07:50:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="Dq5kVikp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1C1C2184D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.4263.11499 (Exim 4.92) (envelope-from ) id 1kQQgA-00007W-Vy; Thu, 08 Oct 2020 07:49:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 4263.11499; Thu, 08 Oct 2020 07:49:34 +0000 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" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQQgA-00007P-SS; Thu, 08 Oct 2020 07:49:34 +0000 Received: by outflank-mailman (input) for mailman id 4263; Thu, 08 Oct 2020 07:49:33 +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 1kQQg9-00007K-7g for xen-devel@lists.xenproject.org; Thu, 08 Oct 2020 07:49:33 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id b65c7d19-1663-43c0-90c1-6041c147e048; Thu, 08 Oct 2020 07:49:29 +0000 (UTC) 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 1kQQg9-00007K-7g for xen-devel@lists.xenproject.org; Thu, 08 Oct 2020 07:49:33 +0000 X-Inumbo-ID: b65c7d19-1663-43c0-90c1-6041c147e048 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id b65c7d19-1663-43c0-90c1-6041c147e048; Thu, 08 Oct 2020 07:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1602143369; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=8oXHE9yaD0ZDiGDH+pTLdVL5S7SMWQLtXkvi2k8KzIw=; b=Dq5kVikpptVB3gBbMfzgHGdqn0Z3iVixVm0h3Xl9LOZQ5ib1L0M/X8ju lcoYhQ/aPXgHCuCclUsSFI8MubFDEHH4kL6fIda0nw/lKfF/UnvpeIB0p zwEpinqcbxSQjc0DjE1ZXm1RCfrsmbvYFmYtERbChegS5R6KTzs3xy4cH I=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: ZXhjVTZXIdzLastKb3c60KsYO24CBlJcj8xrt1SJH6B2+4y2Z2g24dVydqT7JeuoxgwuJsDCvc hSSAWGuc6f8WFfNYEx4id86xfzFs0pNpBzzsnGylSE+LFKGyxnmzx8eO5Iawew3Zg3MofGhu6/ hxpvhERqywhpYtrWSMojqViyida2vxj0K/SMSBTsiH+K+qwPU0ACTZ3B7KgmPxWY0puRtVmF5E nqkiunFJvR4CKtfp0OWbfg4NkXarJVH5oBNLI0zRP4OMrB2825dZNHpTZCrqIEZsr5wNg0Gufk P24= X-SBRS: None X-MesageID: 29580987 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.77,350,1596513600"; d="scan'208";a="29580987" Date: Thu, 8 Oct 2020 09:49:20 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Andrew Cooper CC: Xen-devel , Jan Beulich , Wei Liu Subject: Re: [PATCH] x86/ucode: Trivial further cleanup Message-ID: <20201008074920.GI19254@Air-de-Roger> References: <20201007180120.27203-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201007180120.27203-1-andrew.cooper3@citrix.com> X-ClientProxiedBy: AMSPEX02CAS01.citrite.net (10.69.22.112) To FTLPEX02CL06.citrite.net (10.13.108.179) On Wed, Oct 07, 2020 at 07:01:20PM +0100, Andrew Cooper wrote: > * Drop unused include in private.h. > * Used explicit width integers for Intel header fields. > * Adjust comment to better describe the extended header. > * Drop unnecessary __packed attribute for AMD header. > * Switch mc_patch_data_id to being uint16_t, which is how it is more commonly > referred to. > * Fix types and style. > > Signed-off-by: Andrew Cooper Acked-by: Roger Pau Monné > --- > CC: Jan Beulich > CC: Roger Pau Monné > CC: Wei Liu > --- > xen/arch/x86/cpu/microcode/amd.c | 10 +++++----- > xen/arch/x86/cpu/microcode/intel.c | 34 +++++++++++++++++----------------- > xen/arch/x86/cpu/microcode/private.h | 2 -- > 3 files changed, 22 insertions(+), 24 deletions(-) > > diff --git a/xen/arch/x86/cpu/microcode/amd.c b/xen/arch/x86/cpu/microcode/amd.c > index cd532321e8..e913232067 100644 > --- a/xen/arch/x86/cpu/microcode/amd.c > +++ b/xen/arch/x86/cpu/microcode/amd.c > @@ -24,7 +24,7 @@ > > #define pr_debug(x...) ((void)0) > > -struct __packed equiv_cpu_entry { > +struct equiv_cpu_entry { > uint32_t installed_cpu; > uint32_t fixed_errata_mask; > uint32_t fixed_errata_compare; > @@ -35,7 +35,7 @@ struct __packed equiv_cpu_entry { > struct microcode_patch { > uint32_t data_code; > uint32_t patch_id; > - uint8_t mc_patch_data_id[2]; > + uint16_t mc_patch_data_id; > uint8_t mc_patch_data_len; I think you could also drop the mc_patch_ prefixes from a couple of fields in this structure, since they serve no purpose AFAICT. Thanks, Roger.