From: Paolo Bonzini <pbonzini@redhat.com>
To: "Leonardo Brás" <leobras@redhat.com>,
"Sean Christopherson" <seanjc@google.com>,
"Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
Cc: kvm@vger.kernel.org, tglx@linutronix.de,
linux-kernel@vger.kernel.org, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org
Subject: Re: [PATCH] KVM: x86: Always enable legacy fp/sse
Date: Wed, 17 Aug 2022 10:45:14 +0200 [thread overview]
Message-ID: <a76066e2-af2c-1be2-5e3e-1f42557523e6@redhat.com> (raw)
In-Reply-To: <e9b456cee5032c62cab6b9a3ab1411196d4d1c3c.camel@redhat.com>
On 8/17/22 05:29, Leonardo Brás wrote:
>>> QEMU always calls kvm_put_xsave, even on this combination because
>>> KVM_CAP_CHECK_EXTENSION_VM always returns true for KVM_CAP_XSAVE.
> Any particular reason why it always returns true for KVM_CAP_XSAVE, even when
> the CPU does not support it?
>
> IIUC, if it returns false to this capability, kvm_put_xsave() should never be
> called, and thus it can avoid bug reproduction.
Because it allows userspace to have a single path for saving/restoring
FPU state. See for example the "migration" code in
tools/testing/selftests/kvm/lib/x86_64/processor.c (the vcpu_save_state
and vcpu_load_state functions).
In fact, the QEMU code that uses KVM_GET_FPU/KVM_SET_FPU in x86 is
obsolete, because it's not been used since Linux 2.6.36.
Paolo
next prev parent reply other threads:[~2022-08-17 8:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 17:59 Dr. David Alan Gilbert (git)
2022-08-16 21:37 ` Sean Christopherson
2022-08-17 3:29 ` Leonardo Brás
2022-08-17 8:45 ` Paolo Bonzini [this message]
2022-08-17 11:03 ` Dr. David Alan Gilbert
2022-08-17 16:11 ` Sean Christopherson
2022-08-17 16:14 ` Dr. David Alan Gilbert
2022-08-23 0:15 ` 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=a76066e2-af2c-1be2-5e3e-1f42557523e6@redhat.com \
--to=pbonzini@redhat.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dgilbert@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=leobras@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=x86@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 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®