mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Sean Christopherson <seanjc@google.com>,
	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: Wed, 18 Dec 2024 18:40:38 -0800	[thread overview]
Message-ID: <173457547595.3295170.16244454188182708227.b4-ty@google.com> (raw)
In-Reply-To: <20241211172952.1477605-1-seanjc@google.com>

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

--
https://github.com/kvm-x86/linux/tree/next

  parent reply	other threads:[~2024-12-19  2:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-11 17:29 Sean Christopherson
2024-12-11 18:14 ` Tom Lendacky
2024-12-19  2:40 ` Sean Christopherson [this message]
2024-12-19 12:47   ` Paolo Bonzini
2024-12-19 15:20     ` Sean Christopherson

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=173457547595.3295170.16244454188182708227.b4-ty@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

all inboxes | Powered by JetHome®