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/
Home Products Support Community News


Re: [Xen-devel] sharing PCI devices ....

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] sharing PCI devices ....
From: Daniel Hulme <dh286@xxxxxxxxx>
Date: Wed, 7 Sep 2005 14:55:26 +0100
Delivery-date: Wed, 07 Sep 2005 13:53:23 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20050907134214.GF25239@xxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20050907134214.GF25239@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> A question about PCI devices. If we leave security problems aside, is
> it possible to provide access of a PCI device to 2 domains (may
> include dom 0), i.e. would current xen implementation suffice or a PCI
> device can only be used exclusively by a domain.
No, not without writing a backend driver to mediate device accesses. If
two domains can both access the raw device, who gets the interrupts
raised by the device? What if one domain gets context-switched away in
the middle of what it thinks is an atomic operation, and the other
domain uses the device in the meantime? What if the domains each want
the device in a different 'mode' (like promiscuous mode for NICs) - how
do you change the mode back and forth as each domain is scheduled?

If you have a particular device that you want two or more domains to
use, you need to write a backend and a frontend device driver, and then
export the virtual device to your domUs just like the virtual NIC and
the virtual block device.

If you do this, consider sharing the source with everyone: someone else
will probably want to do the same thing eventually and it would make
their lives easier. Also, other people may spot unnoticed bugs in your
driver, before they bite you on the bum.

"And  what if  I assign  a  hundred  programmers  to  it?"   The  master
programmer shrugged. "Then the design will never be completed," he said.
http://www.google.com/search?q=%22pgp+singing%22  <-- childish but funny
http://surreal.istic.org/ <-- It's like a DEATH CIRCUS! | keyid 885b170d

Attachment: pgpaR7gr1FoNL.pgp
Description: PGP signature

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>