[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] PCI BARs from dom0


  • To: "'Barak Fargoun'" <barak@xxxxxxxxxxxx>
  • From: "laurel" <laurel@xxxxxxx>
  • Date: Thu, 22 May 2008 13:30:07 -0400
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 22 May 2008 10:31:34 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Aci8HrAWMpLcHZ7xTb2KZiuST42D3AABYFsgAANFdLA=

I am trying to get pass-through to work with various devices.  The issue I am seeing is that QEMU sets the p2m mappings for domU using libpci:pci_dev.base_addr[] which originate from /sys/.../resource which are not always the actual values in the BARs. Some PCI device memory regions are inaccessible from domU due to the mis-mapping.  I modified QEMU:register_real_device()  to call pci_fill_info() which updates base_addr[] to the real BARs.  This allows all the PCI device memory regions to be mapped properly and accessed from domU.  However, the new 'correct' mappings break the NIC pass-through.  I have verified that the new p2m mappings correspond to the real BARs.
 
Can someone clearly walk me through the BAR handling and how it is supposed to work?  Why does sysfs report different values?  Does dom0 use guest physical addresses instead of machine addresses?  Why does libpci 'cache' config BARs in base_addr[]?
 
- steve
 


From: Barak Fargoun [mailto:barak@xxxxxxxxxxxx]
Sent: Thursday, May 22, 2008 11:56 AM
To: laurel; xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] PCI BARs from dom0

This might be related to the fact that ‘lspci –v’ the values which the OS has seen and configured, and ‘lspci –x’ shows the actual values which resides now in the values.

 

From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of laurel
Sent: Thursday, May 22, 2008 18:16 PM
To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] PCI BARs from dom0

 

Lspci -v and -x show different values for various PCI BARs in my system.  It appears that reading 'resource' and 'config' from sysfs in dom0 yields the differing data.  The 'config' data matches what is actually programmed into the BARs.  Why are these different?

 

- steve

 

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.