From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Simon Pilkington <simonp.git@mailbox.org>,
Tom Lendacky <thomas.lendacky@amd.com>
Subject: Re: [PATCH] KVM: SVM: Allow guest writes to set MSR_AMD64_DE_CFG bits
Date: Thu, 19 Dec 2024 07:20:02 -0800 [thread overview]
Message-ID: <Z2Q5ovivF849OPcZ@google.com> (raw)
In-Reply-To: <c20368b8-ef6b-4be5-b9c6-46a577564f79@redhat.com>
On Thu, Dec 19, 2024, Paolo Bonzini wrote:
> On 12/19/24 03:40, Sean Christopherson wrote:
> > On Wed, 11 Dec 2024 09:29:52 -0800, Sean Christopherson wrote:
> > > Drop KVM's arbitrary behavior of making DE_CFG.LFENCE_SERIALIZE read-only
> > > for the guest, as rejecting writes can lead to guest crashes, e.g. Windows
> > > in particular doesn't gracefully handle unexpected #GPs on the WRMSR, and
> > > nothing in the AMD manuals suggests that LFENCE_SERIALIZE is read-only _if
> > > it exists_.
> > >
> > > KVM only allows LFENCE_SERIALIZE to be set, by the guest or host, if the
> > > underlying CPU has X86_FEATURE_LFENCE_RDTSC, i.e. if LFENCE is guaranteed
> > > to be serializing. So if the guest sets LFENCE_SERIALIZE, KVM will provide
> > > the desired/correct behavior without any additional action (the guest's
> > > value is never stuffed into hardware). And having LFENCE be serializing
> > > even when it's not _required_ to be is a-ok from a functional perspective.
> > >
> > > [...]
> >
> > Applied to kvm-x86 fixes, thanks!
> >
> > [1/1] KVM: SVM: Allow guest writes to set MSR_AMD64_DE_CFG bits
> > https://github.com/kvm-x86/linux/commit/2778c9a4687d
>
> Oh, I missed this! I assume you're going to send me a pull request today or
> tomorrow?
Yep, I'll get it to you today.
prev parent reply other threads:[~2024-12-19 15:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 17:29 [PATCH] KVM: SVM: Allow guest writes to set MSR_AMD64_DE_CFG bits Sean Christopherson
2024-12-11 18:14 ` Tom Lendacky
2024-12-19 2:40 ` Sean Christopherson
2024-12-19 12:47 ` Paolo Bonzini
2024-12-19 15:20 ` 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=Z2Q5ovivF849OPcZ@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=simonp.git@mailbox.org \
--cc=thomas.lendacky@amd.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox