From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>, xen-devel@lists.xenproject.org
Cc: Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH v2 2/2] x86/spec: adjust logic to logic that elides lfence
Date: Thu, 25 Apr 2024 14:30:33 +0100 [thread overview]
Message-ID: <65819d08-eea1-4ce3-8eca-6358ecba1bb2@citrix.com> (raw)
In-Reply-To: <20240418155208.7771-3-roger.pau@citrix.com>
On 18/04/2024 4:52 pm, Roger Pau Monne wrote:
> It's currently too restrictive by just checking whether there's a BHB clearing
> sequence selected. It should instead check whether BHB clearing is used on
> entry from PV or HVM specifically.
>
> Switch to use opt_bhb_entry_{pv,hvm} instead, and then remove cpu_has_bhb_seq
> since it no longer has any users.
>
> Reported-by: Jan Beulich <jbeulich@suse.com>
> Fixes: 954c983abcee ('x86/spec-ctrl: Software BHB-clearing sequences')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Changes since v1:
> - New in this version.
>
> There (possibly) still a bit of overhead for dom0 if BHB clearing is not used
> for dom0, as Xen would still add the lfence if domUs require it.
This is the note about dom0 that I made on the previous patch.
"protect dom0" only has any effect if the appropriate foo_pv or foo_hvm
is also selected. It's not possible to express "protect dom0 but not
domU of $TYPE".
This early on boot we have no idea whether dom0 is going to be PV or
HVM. We could in principle figure it out by peeking at dom0's ELF
notes, but that needs a lot of rearranging of __start_xen() to do safely.
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
prev parent reply other threads:[~2024-04-25 13:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 15:52 [PATCH v2 0/2] x86/spec: misc fixes for XSA-456 Roger Pau Monne
2024-04-18 15:52 ` [PATCH v2 1/2] x86/spec: fix reporting of BHB clearing usage from guest entry points Roger Pau Monne
2024-04-18 15:59 ` Jan Beulich
2024-04-25 13:08 ` Andrew Cooper
2024-04-18 15:52 ` [PATCH v2 2/2] x86/spec: adjust logic to logic that elides lfence Roger Pau Monne
2024-04-19 6:25 ` Jan Beulich
2024-04-22 13:35 ` Roger Pau Monné
2024-04-22 13:59 ` Jan Beulich
2024-04-25 13:30 ` Andrew Cooper [this message]
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=65819d08-eea1-4ce3-8eca-6358ecba1bb2@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--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.