From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "Keir (Xen.org)" <keir@xen.org>,
Ian Campbell <Ian.Campbell@citrix.com>,
Haitao Shan <haitao.shan@intel.com>,
Donald D Dugger <donald.d.dugger@intel.com>,
xen-devel <xen-devel@lists.xen.org>,
"xiantao.zhang@intel.com" <xiantao.zhang@intel.com>
Subject: Re: Ping: [PATCH] x86/MSI: add mechanism to protect MSI-X table from PV guest accesses
Date: Thu, 28 Feb 2013 12:30:29 +0000 [thread overview]
Message-ID: <512F4DE5.306@citrix.com> (raw)
In-Reply-To: <512F2FEA02000078000C1D17@nat28.tlf.novell.com>
On 28/02/13 09:22, Jan Beulich wrote:
>>>> On 07.02.13 at 09:44, "Jan Beulich" <JBeulich@suse.com> wrote:
>>>>> On 06.02.13 at 17:50, "Jan Beulich" <JBeulich@suse.com> wrote:
>>> This adds two new physdev operations for Dom0 to invoke when resource
>>> allocation for devices is known to be complete, so that the hypervisor
>>> can arrange for the respective MMIO ranges to be marked read-only
>>> before an eventual guest getting such a device assigned even gets
>>> started, such that it won't be able to set up writable mappings for
>>> these MMIO ranges before Xen has a chance to protect them.
>> I should probably mention the alternatives:
>>
>> 1) Brute force scan of the (PV) guest's L1 page tables, locating
>> eventual mappings of the questionable MMIO pages, and
>> converting those mappings to R/O ones.
>>
>> 2) Snoop BAR modifications (via xen/arch/x86/traps.c:
>> guest_io_write(), taking note of which BAR(s) are relevant at the
>> point where the device gets first detected/reported), perhaps
>> along with snoops of the PCI_COMMAND_MEMORY bit.
> So I just now sent a mail to Linux'es PCI subsystem maintainer,
> assuming that we'll go with the approach the patch presented at
> the start of this thread. The outcome of this, however, is not
> really relevant for the hypervisor side change to go in, as it
> would only affect the placement of the new hypercall within
> pciback or the core PCI subsystem.
>
> That assumption is largely because no-one really voiced an opinion
> towards a preference of one of the alternatives described above.
>
> Unless I'll receive an explicit NAK or further comments moving this
> discussion forward, I'm intending to commit the patch without
> anyone's ACK in a few days time _and_ backport it to the stable
> trees (4.2 at least, not sure how well it will backport to 4.1).
>
> Jan
For what it is worth, I think the principle is good. One query I have
is whether it is sensible to restrict this to dom0, as the comments
indicate, or whether it should be permitted to be used by any domain
with appropriate permissions to manage PCI passthrough.
How do you see dom0 attempting to use these hypercalls in an example of
passing a PCI device through to an untrusted domain?
~Andrew
next prev parent reply other threads:[~2013-02-28 12:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-06 16:50 [PATCH] x86/MSI: add mechanism to protect MSI-X table from PV guest accesses Jan Beulich
2013-02-07 8:44 ` Jan Beulich
2013-02-14 10:00 ` Ian Campbell
2013-02-14 10:49 ` Jan Beulich
2013-02-28 9:22 ` Ping: " Jan Beulich
2013-02-28 12:30 ` Andrew Cooper [this message]
2013-02-28 13:46 ` Jan Beulich
2013-02-25 5:17 ` Zhang, Xiantao
2013-02-25 9:38 ` Jan Beulich
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=512F4DE5.306@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=donald.d.dugger@intel.com \
--cc=haitao.shan@intel.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xen.org \
--cc=xiantao.zhang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.