WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] pciback: question about the permissive flag

To: Joanna Rutkowska <joanna@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] pciback: question about the permissive flag
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Wed, 7 Jul 2010 11:18:51 -0400
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 07 Jul 2010 08:20:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C33A217.3050006@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4C33A217.3050006@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-12-10)
On Tue, Jul 06, 2010 at 11:37:27PM +0200, Joanna Rutkowska wrote:
> I'm trying to understand the purpose of the permissive flag in the Xen
> pciback driver. The comments in the code suggest that setting
> permissive=1 is "potentially unsafe", and I've been wondering why?
> 
> My thinking goes this way -- we either:
> 
> 1) have IOMMU/VT-d in the system, and use it to isolate the device
> assigned to a DomU, in which case allowing the DomU to fully control the
> assigned device's config space should not be a problem because VT-d

But that is not the case. The PCI config writes are actually done by
Dom0. The Xen PCI frontend redirects all config space reads/writes to
the Xen PCI backend that does them on the guest behalf.

There are some backend-backend config space libs that deal with
different regions (power, MSI), and for those that are not present
the permissive flag is used to figure out whether the guest is allowed
to write to that region.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel