All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH] xen/x86: Move microcode into its own directory
Date: Thu, 19 Mar 2020 10:21:59 +0100	[thread overview]
Message-ID: <9168f174-1f75-86cd-267d-0b4bcd3a07e5@suse.com> (raw)
In-Reply-To: <080ba22f-f79d-1e50-71ba-ef3d2653e920@citrix.com>

On 18.03.2020 22:42, Andrew Cooper wrote:
> On 18/03/2020 21:05, Andrew Cooper wrote:
>> Split the existing asm/microcode.h in half, keeping the per-cpu cpu_sig
>> available to external users, and moving everything else into private.h
>>
>> Take the opportunity to trim and clean up the include lists for all 3 source
>> files, all of which include rather more than necessary.
>>
>> No functional change.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> ---
>> CC: Jan Beulich <JBeulich@suse.com>
>> CC: Wei Liu <wl@xen.org>
>> CC: Roger Pau Monné <roger.pau@citrix.com>
>>
>> Inclusion of asm/flushtlb.h in isolation was broken by c/s 80943aa40e, and the
>> commit message even states this breakage.  I'm surprised it got accepted.
>>
>> Either this needs fixing, or the 23(!) other files including asm/flushtlb.h
>> should be adjusted.  Personally I don't think it is reasonable to require
>> including xen/mm.h just to get at tlb flushing functionality, but I also can't
>> spot an obvious way to untangle the dependencies (hence the TODO).
> 
> Actually, I've found that microcode_free_patch() has no external callers.
> 
> I've folded the following delta in, to avoid moving a useless function
> declaration
> 
> diff --git a/xen/arch/x86/microcode/core.c b/xen/arch/x86/microcode/core.c
> index e99f4ab06c..19e1d4b221 100644
> --- a/xen/arch/x86/microcode/core.c
> +++ b/xen/arch/x86/microcode/core.c
> @@ -243,7 +243,7 @@ static struct microcode_patch *parse_blob(const char
> *buf, size_t len)
>      return NULL;
>  }
>  
> -void microcode_free_patch(struct microcode_patch *microcode_patch)
> +static void microcode_free_patch(struct microcode_patch *microcode_patch)
>  {
>      microcode_ops->free_patch(microcode_patch->mc);
>      xfree(microcode_patch);
> diff --git a/xen/arch/x86/microcode/private.h
> b/xen/arch/x86/microcode/private.h
> index 97c7405dad..2e3be79eaf 100644
> --- a/xen/arch/x86/microcode/private.h
> +++ b/xen/arch/x86/microcode/private.h
> @@ -34,6 +34,4 @@ struct microcode_ops {
>  
>  extern const struct microcode_ops *microcode_ops;
>  
> -void microcode_free_patch(struct microcode_patch *patch);
> -
>  #endif /* ASM_X86_MICROCODE_PRIVATE_H */
> 
> 
> Alternatively, I might consider pulling this and the similar change to
> early_microcode_update_cpu() into an earlier patch, to separate the
> static-ing of functions from the general moving of code/declarations.
> 
> Thoughts?

Either way is fine by me, and can have my ack right away.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2020-03-19  9:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18 21:05 [Xen-devel] [PATCH] xen/x86: Move microcode into its own directory Andrew Cooper
2020-03-18 21:30 ` [Xen-devel] [PATCH 2/n] x86/microcode: Move interface from processor.h to microcode.h Andrew Cooper
2020-03-19  9:22   ` Jan Beulich
2020-03-18 21:42 ` [Xen-devel] [PATCH] xen/x86: Move microcode into its own directory Andrew Cooper
2020-03-19  9:21   ` Jan Beulich [this message]
2020-03-19  9:21 ` Jan Beulich
2020-03-19  9:52   ` Andrew Cooper
2020-03-19  9:59     ` Jan Beulich
2020-03-19 10:41       ` Andrew Cooper
2020-03-19 11:16         ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9168f174-1f75-86cd-267d-0b4bcd3a07e5@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.