From: Paolo Bonzini <pbonzini@redhat.com>
To: "Graf (AWS), Alexander" <graf@amazon.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
Aaron Lewis <aaronlewis@google.com>, Peter Xu <peterx@redhat.com>,
Sean Christopherson <sean.j.christopherson@intel.com>
Subject: Re: [PATCH] KVM: VMX: Forbid userspace MSR filters for x2APIC
Date: Tue, 20 Oct 2020 11:27:23 +0200 [thread overview]
Message-ID: <c9dd6726-2783-2dfd-14d1-5cec6f69f051@redhat.com> (raw)
In-Reply-To: <618E2129-7AB5-4F0D-A6C9-E782937FE935@amazon.de>
On 19/10/20 19:45, Graf (AWS), Alexander wrote:
>> + * In principle it would be possible to trap x2apic ranges
>> + * if !lapic_in_kernel. This however would be complicated
>> + * because KVM_X86_SET_MSR_FILTER can be called before
>> + * KVM_CREATE_IRQCHIP or KVM_ENABLE_CAP.
>> + */
>> + for (i = 0; i < ARRAY_SIZE(filter.ranges); i++)
>> + if (range_overlaps_x2apic(&filter.ranges[i]))
>> + return -EINVAL;
>
> What if the default action of the filter is to "deny"? Then only an
> MSR filter to allow access to x2apic MSRs would make the full
> filtering logic adhere to the constraints, no?
Right; or more precisely, that is handled by Sean's patch that he had
posted earlier. This patch only makes it impossible to set up such a
filter.
(That said, this is a quick patch that I posted yesterday just before
dinner. I'll send out the real deal with docs fixes and better commit
message).
Paolo
> Also, this really deserves a comment in the API documentation :).
>
> In fact, I think a pure comment in documentation is enough. Just make
> x2apic && filter on them "undefined behavior".
next prev parent reply other threads:[~2020-10-20 9:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 17:05 [PATCH] KVM: VMX: Forbid userspace MSR filters for x2APIC Paolo Bonzini
2020-10-19 17:35 ` Peter Xu
2020-10-19 17:45 ` Graf (AWS), Alexander
2020-10-20 9:27 ` Paolo Bonzini [this message]
2020-10-20 9:48 ` Alexander Graf
2020-10-20 10:34 ` Paolo Bonzini
2020-10-20 10:52 ` Alexander Graf
2020-10-20 11:49 ` Paolo Bonzini
2020-10-21 21:36 Paolo Bonzini
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=c9dd6726-2783-2dfd-14d1-5cec6f69f051@redhat.com \
--to=pbonzini@redhat.com \
--cc=aaronlewis@google.com \
--cc=graf@amazon.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterx@redhat.com \
--cc=sean.j.christopherson@intel.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;
as well as URLs for NNTP newsgroup(s).