[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86/ucode: Trivial further cleanup


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 8 Oct 2020 09:49:20 +0200
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 08 Oct 2020 07:49:57 +0000
  • Ironport-sdr: ZXhjVTZXIdzLastKb3c60KsYO24CBlJcj8xrt1SJH6B2+4y2Z2g24dVydqT7JeuoxgwuJsDCvc hSSAWGuc6f8WFfNYEx4id86xfzFs0pNpBzzsnGylSE+LFKGyxnmzx8eO5Iawew3Zg3MofGhu6/ hxpvhERqywhpYtrWSMojqViyida2vxj0K/SMSBTsiH+K+qwPU0ACTZ3B7KgmPxWY0puRtVmF5E nqkiunFJvR4CKtfp0OWbfg4NkXarJVH5oBNLI0zRP4OMrB2825dZNHpTZCrqIEZsr5wNg0Gufk P24=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 <andrew.cooper3@xxxxxxxxxx>

Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> CC: Wei Liu <wl@xxxxxxx>
> ---
>  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.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.