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: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] pciback: question about the permissive flag
From: Joanna Rutkowska <joanna@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Jul 2010 23:23:38 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 07 Jul 2010 14:24:48 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type; s=smtpout; bh=YtDxZYTusl0DttxXj1b3lEY9bUI=; b=nyVDBPu1uBJ6H852oVN+quvcHrsXQqRGfh8rrewc8AmIHtp5Nx9ADYsSPYedW9dO0R6vw1d/OaIF/qKQGeyYtbKYpYlHfdoUrDJasB6YP/L3EjXHZXXkj3UdWU1bAAkrWcPRE7uih+m6hSYX8c2jOzUlRn2t/PlDcK4WyGo+CPc=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100707151851.GA12092@xxxxxxxxxxxxxxxxxxx>
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> <20100707151851.GA12092@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Thunderbird/3.0.5
On 07/07/10 17:18, Konrad Rzeszutek Wilk wrote:
> 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.
> 

Hmm, not sure if I understand why you wrote "this is not the case"
above? Of course DomU cannot directly change anything in PCI config
space of any device, because its kernel code executes in Ring 3 or 1,
and cannot do IO to 0xcf8/cfc. But I was under impression that once we
assign a PCI device to the DomU, and once we set permissive=1, then this
would effectively allow DomU to fully control the device config space.
Is this not correct?

> 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.
> 

What do you mean by a "backend-backend" lib?

joanna.

Attachment: signature.asc
Description: OpenPGP digital signature

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