From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
jmattson@google.com, stable@vger.kernel.org
Subject: Re: [PATCH v2] KVM: x86: Allow guests to see MSR_IA32_TSX_CTRL even if tsx=off
Date: Mon, 1 Feb 2021 09:03:07 -0800 [thread overview]
Message-ID: <YBg0Sy3MlD0Rn3mF@google.com> (raw)
In-Reply-To: <37be5fb8-056f-8fba-3016-464634e069af@redhat.com>
On Mon, Feb 01, 2021, Paolo Bonzini wrote:
> On 29/01/21 17:58, Sean Christopherson wrote:
> > On Fri, Jan 29, 2021, Paolo Bonzini wrote:
> > > */
> > > if (!boot_cpu_has(X86_FEATURE_RTM))
> > > - data &= ~(ARCH_CAP_TAA_NO | ARCH_CAP_TSX_CTRL_MSR);
> > > + data &= ~ARCH_CAP_TAA_NO;
> >
> > Hmm, simply clearing TSX_CTRL will only preserve the host value. Since
> > ARCH_CAPABILITIES is unconditionally emulated by KVM, wouldn't it make sense to
> > unconditionally expose TSX_CTRL as well, as opposed to exposing it only if it's
> > supported in the host? I.e. allow migrating a TSX-disabled guest to a host
> > without TSX. Or am I misunderstanding how TSX_CTRL is checked/used?
>
> I'm a bit wary of having a combination (MDS_NO=0, TSX_CTRL=1) that does not
> exist on bare metal. There are other cases where such combinations can
> happen, especially with the Spectre and SSBD mitigations (for example due to
> AMD CPUID bits for Intel processors), but at least those are just
> redundancies in the CPUID bits and it's more likely that the guest does
> something sensible with them.
Gotcha. The vulnerability combos and all the double and triple negatives make
my head spin.
Thanks!
prev parent reply other threads:[~2021-02-01 17:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-29 10:19 [PATCH v2] KVM: x86: Allow guests to see MSR_IA32_TSX_CTRL even if tsx=off Paolo Bonzini
2021-01-29 16:58 ` Sean Christopherson
2021-02-01 8:46 ` Paolo Bonzini
2021-02-01 9:08 ` Paolo Bonzini
2021-02-01 16:38 ` Sean Christopherson
2021-02-01 17:34 ` Paolo Bonzini
2021-02-01 17:36 ` Sean Christopherson
2021-02-01 17:03 ` Sean Christopherson [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=YBg0Sy3MlD0Rn3mF@google.com \
--to=seanjc@google.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=stable@vger.kernel.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.