From: Eslam Elnikety <elnikety@amazon.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Julien Grall <julien@xen.org>, Wei Liu <wl@xen.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Paul Durrant <pdurrant@amazon.co.uk>,
xen-devel@lists.xenproject.org,
David Woodhouse <dwmw@amazon.co.uk>
Subject: Re: [Xen-devel] [PATCH v2 2/4] x86/microcode: avoid unnecessary xmalloc/memcpy of ucode data
Date: Thu, 19 Dec 2019 22:25:32 +0100 [thread overview]
Message-ID: <8a15bbca-e730-cbf7-2108-b8f0260e846a@amazon.com> (raw)
In-Reply-To: <eaaffb6f-b2b1-f81e-8643-ccc238914e52@suse.com>
On 18.12.19 13:05, Jan Beulich wrote:
> On 18.12.2019 02:32, Eslam Elnikety wrote:
>> @@ -725,7 +701,7 @@ static int __init microcode_init(void)
>> */
>> if ( ucode_blob.size )
>> {
>> - xfree(ucode_blob.data);
>> + bootstrap_map(NULL);
>
> As much as I like the change, I wholeheartedly disagree with this
> aspect of it: You make it largely unpredictable when the boot
> mappings will go away - it becomes entirely dependent upon link
> order. And of course we really want these mappings to be gone,
> the very latest (I think), by the time we start bringing up APs
> (but generally the sooner the better). This is (one of?) the main
> reason(s) why it hadn't been done this way to begin with. The
> alternative is more complicated (set up a proper, long term
> mapping), but it's going to be more clean (including the mapping
> then also being suitable to post-boot CPU onlining).
>
This change is an improvement on the current status. We get to avoid
xmalloc/memcpy in the case of a successful ucode=scan. The problematic
aspect you highlight is anyway there regardless of this patch (ref. to
the "else if ( ucode_mod.mod_end )" in microcode_init). The proper, long
term mapping would be a welcome change, but is otherwise independent of
this patch imo.
Thanks,
Eslam
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-12-19 21:26 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 1:32 [Xen-devel] [PATCH v2 0/4] x86/microcode: Support builtin CPU microcode Eslam Elnikety
2019-12-18 1:32 ` [Xen-devel] [PATCH v2 1/4] x86/microcode: Improve documentation and parsing for ucode= Eslam Elnikety
2019-12-18 11:49 ` Jan Beulich
2019-12-19 21:08 ` Eslam Elnikety
2019-12-20 9:53 ` Jan Beulich
2020-01-17 19:06 ` Eslam Elnikety
2020-01-20 8:42 ` Jan Beulich
2020-01-20 23:50 ` Eslam Elnikety
2020-01-21 9:27 ` Jan Beulich
2020-01-21 20:51 ` Eslam Elnikety
2020-01-22 22:36 ` Eslam Elnikety
2020-01-21 20:57 ` Konrad Rzeszutek Wilk
2019-12-18 1:32 ` [Xen-devel] [PATCH v2 2/4] x86/microcode: avoid unnecessary xmalloc/memcpy of ucode data Eslam Elnikety
2019-12-18 12:05 ` Jan Beulich
2019-12-19 21:25 ` Eslam Elnikety [this message]
2019-12-20 9:57 ` Jan Beulich
2020-01-17 21:05 ` Andrew Cooper
2019-12-18 1:32 ` [Xen-devel] [PATCH v2 3/4] x86/microcode: use const qualifier for microcode buffer Eslam Elnikety
2019-12-18 12:07 ` Jan Beulich
2019-12-18 1:32 ` [Xen-devel] [PATCH v2 4/4] x86/microcode: Support builtin CPU microcode Eslam Elnikety
2019-12-18 12:42 ` Jan Beulich
2019-12-19 22:11 ` Eslam Elnikety
2019-12-20 10:12 ` Jan Beulich
2019-12-20 10:34 ` Jürgen Groß
2019-12-20 10:38 ` Jan Beulich
2020-01-17 20:20 ` Eslam Elnikety
2020-01-17 20:06 ` Eslam Elnikety
2020-01-20 8:46 ` 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=8a15bbca-e730-cbf7-2108-b8f0260e846a@amazon.com \
--to=elnikety@amazon.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=dwmw@amazon.co.uk \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=konrad.wilk@oracle.com \
--cc=pdurrant@amazon.co.uk \
--cc=sstabellini@kernel.org \
--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.