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


[Xen-devel] RE: PCI devices remap from dom0 to domU with pv-ops kernel

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: [Xen-devel] RE: PCI devices remap from dom0 to domU with pv-ops kernel
From: "Lin, Ray" <Ray.Lin@xxxxxxx>
Date: Thu, 14 Oct 2010 11:26:03 -0600
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "bruce.edge@xxxxxxxxx" <bruce.edge@xxxxxxxxx>
Delivery-date: Thu, 14 Oct 2010 10:27:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20101013185149.GA14056@xxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: ActrB9rVxSftWPH+TcO7NvfD0U07rAAun2JQ
Thread-topic: PCI devices remap from dom0 to domU with pv-ops kernel

  We choose "Virtual" and the dom0/domU show like this. It doesn't remap to 
what we want. You mentioned about "write your own plugin that would do 
remapping per your desire". Could you elaborate it a bit ? Thanks.

kaan-18:~# lspci -n | grep 11f8
07:00.0 0c04: 11f8:8032 (rev 08)
07:00.1 0c04: 11f8:8032 (rev 08)
07:00.2 0c04: 11f8:8032 (rev 08)
07:00.3 0c04: 11f8:8032 (rev 08)

kaan-18-dpm:~# lspci -n
00:00.0 0c04: 11f8:8032 (rev 08)
00:00.1 0c04: 11f8:8032 (rev 08)
00:00.2 0c04: 11f8:8032 (rev 08)
00:00.3 0c04: 11f8:8032 (rev 08)


-----Original Message-----
From: Konrad Rzeszutek Wilk [mailto:konrad.wilk@xxxxxxxxxx] 
Sent: Wednesday, October 13, 2010 11:52 AM
To: Lin, Ray
Cc: bruce.edge@xxxxxxxxx; xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: PCI devices remap from dom0 to domU with pv-ops kernel

On Wed, Oct 13, 2010 at 10:49:12AM -0600, Lin, Ray wrote:
> Konrad,
>     We try to remap the pci devices from dom0 to domU by assigning the 
> pci in the domU configuration file. Such as
>     pci="['01:00.0@11', '01:00.1@10', '04:00.0@13', '04:00.1@12']"
> In hvm kernel, the domU would see the pci devices remapped like this,
>     dom0 pci device 01:00.0   => domU pci device 00:11.0
>     dom0 pci device 01:00.1  =>  domU pci device 00:10.0
>     dom0 pci device 04:00.0  =>  domU pci device 00:13.0
>     dom0 pci device 04:00.1  =>  domU pci device 00:12.0
>  But pv-ops kernel seems ignore the remapping. Is there any way (kernel 
> configuration setting ??) to make it work ?

Not completly.

When you compile your Xen PCI backend, you should see an option whether you 
want Virtual PCI, Passthrough or some other type. By default it will pick the 
Virtual one so that it just enumerates from zero the PCI devices. You could 
write your own plugin that would do remaping per your desire.
> Thanks,
> Ray

Xen-devel mailing list