From: David Woodhouse <dwmw2@infradead.org>
To: "Jürgen Groß" <jgross@suse.com>,
"Sean Christopherson" <seanjc@google.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
kvm@vger.kernel.org, linux-coco@lists.linux.dev,
Paolo Bonzini <pbonzini@redhat.com>,
Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Kiryl Shutsemau <kas@kernel.org>,
Rick Edgecombe <rick.p.edgecombe@intel.com>,
Paul Durrant <paul@xen.org>
Subject: Re: [PATCH v2 0/6] KVM/x86: Drop "1" as MSR emulation return value
Date: Thu, 28 May 2026 16:32:04 +0100 [thread overview]
Message-ID: <a6fdbcc655ea24209ed03e377f7e4a2a4d43bd9c.camel@infradead.org> (raw)
In-Reply-To: <8d3f3cbe-89ca-44df-b35f-90c2724e9154@suse.com>
[-- Attachment #1: Type: text/plain, Size: 1168 bytes --]
On Thu, 2026-05-28 at 16:33 +0200, Jürgen Groß wrote:
> On 28.05.26 15:21, Sean Christopherson wrote:
> > On Thu, May 28, 2026, Jürgen Groß wrote:
> > > On 28.05.26 15:09, Sean Christopherson wrote:
> > > > On Thu, May 28, 2026, Juergen Gross wrote:
> > > > > Please disregard this series, there is one complication sashiko made me
> > > > > aware of.
> > > >
> > > > Sashiko beat me to the punch. :-)
> > > >
> > > > See commit 2368048bf5c2 ("KVM: x86: Signal #GP, not -EPERM, on bad WRMSR(MCi_CTL/STATUS)")
> > > > for a real world example of how things can and will go wrong.
> > >
> > > Yeah, with Sashiko's pointer it was easy to spot.
> > >
> > > Question now is whether the already existing cases of -errno passed as return
> > > value are wrong or on purpose.
> >
> > What are the existing cases?
>
> Found another one:
>
> kvm_xen_write_hypercall_page() (called by kvm_set_msr_common())
You mean in the case where it's using the user-provided hypercall page,
and can't copy from the buffer that the VMM provided?
I think that's correct to return -errno via PTR_ERR() and let the guest
die?
The rest return 0 or 1.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5069 bytes --]
next prev parent reply other threads:[~2026-05-28 15:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-28 11:35 Juergen Gross
2026-05-28 11:36 ` [PATCH v2 1/6] KVM/x86: Change comment before KVM_MSR_RET_* defines Juergen Gross
2026-05-28 11:36 ` [PATCH v2 2/6] KVM/x86: Return -errno instead of "1" for APIC related MSR emulation Juergen Gross
2026-05-28 11:36 ` [PATCH v2 3/6] KVM/x86: Return -errno instead of "1" for Hyper-V " Juergen Gross
2026-05-28 11:36 ` [PATCH v2 4/6] KVM/x86: Return -errno instead of "1" for VMX " Juergen Gross
2026-05-28 11:36 ` [PATCH v2 5/6] KVM/x86: Return -errno instead of "1" for SVM " Juergen Gross
2026-05-28 11:36 ` [PATCH v2 6/6] KVM/x86: Return -errno instead of "1" for common " Juergen Gross
2026-05-28 11:58 ` [PATCH v2 0/6] KVM/x86: Drop "1" as MSR emulation return value Juergen Gross
2026-05-28 13:09 ` Sean Christopherson
2026-05-28 13:18 ` Jürgen Groß
2026-05-28 13:21 ` Sean Christopherson
2026-05-28 14:01 ` Jürgen Groß
2026-05-28 14:33 ` Jürgen Groß
2026-05-28 15:32 ` David Woodhouse [this message]
2026-05-28 15:36 ` Jürgen Groß
2026-05-28 15:50 ` Jürgen Groß
2026-05-29 9:31 ` Juergen Gross
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=a6fdbcc655ea24209ed03e377f7e4a2a4d43bd9c.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=kas@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paul@xen.org \
--cc=pbonzini@redhat.com \
--cc=rick.p.edgecombe@intel.com \
--cc=seanjc@google.com \
--cc=tglx@kernel.org \
--cc=vkuznets@redhat.com \
--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®