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] patch to assign PCI device on VM without address translation

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] patch to assign PCI device on VM without address translation
From: leonard michelet <leonard.michelet@xxxxxxxxx>
Date: Fri, 20 Mar 2009 16:55:20 +0100
Delivery-date: Fri, 20 Mar 2009 08:55:50 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=U33HopqX5XzRGw3ENWiuip+l2198uRUAw8BZilAPHYg=; b=vKB9gptqjXRniFUVrq/sqpK0g1jkPynx9QxeuQnJ1Uy0Qryrm0IoF4vHnk/AOy54Ex IA+8avBa9FUIh3EvfX9csOPrCzO7dWax8FxfO/o1/4Bd+Tf3r3psqnhjsTGaROSeRe4Q +1pbcD/a/fC52pyYfiA9+kKH35W9hZyCENCL8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=TB5QZTgpwSnsfzEqc+OJ0XQYZn17G4bOHmFhwed12nqhlZ0XyFNDi+UlibMoX/+bn4 g+oJLztXj23EJfGpWg+tEzcqzxFryM2pT05nOJ07ZOCv4U2/Kqq+ZD3CkrtM7+DlYjcC x4Gqil+ZcZSjhDTbcdfMeuSRrlsOtVcJ7VA34=
Envelope-to: www-data@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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi everybody,
we are two french students working for EADS to assign PCI device to VM with Xen.
We had a problem to use some National Instruments PCI Card. These cards have 2 Base Address Register of 4K each, and their driver write in the BAR1's address in a register of BAR0. But since the driver can't know physical addresses, it write the wrong address, and the card can't initialize her BAR.
We worked on it several days, and come up with a solution : force physical and virtual BAR addresses to match.
We are currently doing that thanks to a small change in the function "pt_pci_write_config" in the file tools/ioemu-remote/hw/pass-through.c from the xen unstable tree.
We add a "if" which check what BAR address the function has be given as argument. If this address is the usual address where Xen map the BAR of our card, we change it's value for the physical one.
We made tests with this patch, and our cards worked fine.
So we would like to make a patch for Xen to add a mode "1:1 mapping" for assigned device, using a configuration file (something like the xend-pci-quirks.sxp file in etc/xen) where each users could add their own card.

Since we set our background, and if you're still reading, we assume that you think this patch could be useful.
Now, it's question time :
    Do you think we should move virtual addresses to match physical addresses (changes in QEmu) or move physical addresses to match virtual adresses (change in Dom0)?
    Do you have any idea how addresses are choosen, in a VM or in the Dom0, or in which order?

Thanks to you for reading,
We'll be glad to hear your comment about our idea. Feel free to send us a private e-mail just to share your point of view, or answer on the mailing list.
Best regards,
Léonard & Guillaume

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] patch to assign PCI device on VM without address translation, leonard michelet <=