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.coop...@citrix.com>

Acked-by: Roger Pau Monné <roger....@citrix.com>

> ---
> CC: Jan Beulich <jbeul...@suse.com>
> CC: Roger Pau Monné <roger....@citrix.com>
> CC: Wei Liu <w...@xen.org>
> ---
>  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.

Reply via email to