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@neocleus.com]
Sent: Thursday, May 22, 2008 11:56 AM
To: laurel; xen-devel@lists.xensource.com
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@lists.xensource.com
[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of laurel
Sent: Thursday, May 22, 2008 18:16 PM
To: xen-devel@lists.xensource.com
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@lists.xensource.com
http://lists.xensource.com/xen-devel