From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Andrew Cooper <Andrew.Cooper3@citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
George Dunlap <George.Dunlap@citrix.com>,
Julien Grall <julien@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
Roger Pau Monne <roger.pau@citrix.com>,
Demi Marie Obenour <demi@invisiblethingslab.com>,
Henry Wang <Henry.Wang@arm.com>
Subject: Re: [PATCH for-4.17?] x86: support data operand independent timing mode
Date: Mon, 3 Oct 2022 23:12:45 +0200 [thread overview]
Message-ID: <YztQTaXUHKTlskrV@mail-itl> (raw)
In-Reply-To: <04f7de01-4e8e-b964-d676-d756265c2776@citrix.com>
[-- Attachment #1: Type: text/plain, Size: 1666 bytes --]
On Fri, Sep 30, 2022 at 05:24:21PM +0000, Andrew Cooper wrote:
> Hmm. So yes, lets approach the problem from the other side, as "this bit needs setting to unbreak crypto code".
>
> On hardware supporting DOITM, where we do not advertise the feature to guests (all guests right now), the guest kernel would conclude that it is safe, when in fact it is not.
>
> So Xen should set the bit behind the back of a guest which doesn't have the DOITM enumeration presented (which is all guests right now).
Yes, makes sense.
> But I don't think we want any Kconfig about this, or a dedicated cmdline option. So how about this for a plan which avoids painting ourselves into a corner.
>
> 1) Extend cpuid= with a no-doitm option. I know it's not actually a CPUID enumeration, but MSR_ARCH_CAPS should have been CPUID data, and this is the mechanism we have meaning "pretend this feature isn't enumerated".
Sounds fine. But I wonder if there is any plan for [virtualizing] other
MSR_ARCH_CAPS - will they be treated as cpuid too?
> 2) On boot, and S3 resume, if DOITM and availble, set invariant mode.
+1
> That should do as a stopgap for now that keeps software safe.
>
>
> Then, when we've got MSR_ARCH_CAPS working for guests, the internals of MSR_UARCH_MISC_CTL change to being a context switched thing which, like MSR_SPEC_CTRL, we have options for bits set behind the guest's back. Then we set DOITM behind the guests back if levelling causes the feature to be hidden. We do this for some bits already, and need to do so for more controls too.
>
> ~Andrew
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2022-10-03 21:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 10:04 [PATCH for-4.17?] x86: support data operand independent timing mode Jan Beulich
2022-09-15 11:24 ` Demi Marie Obenour
2022-09-15 12:56 ` Julien Grall
2022-09-15 14:18 ` Demi Marie Obenour
2022-09-16 1:28 ` Henry Wang
2022-09-30 11:25 ` Andrew Cooper
2022-09-30 15:41 ` Marek Marczykowski-Górecki
2022-09-30 17:24 ` Andrew Cooper
2022-10-03 21:12 ` Marek Marczykowski-Górecki [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=YztQTaXUHKTlskrV@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=George.Dunlap@citrix.com \
--cc=Henry.Wang@arm.com \
--cc=demi@invisiblethingslab.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=roger.pau@citrix.com \
--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.