From: Yu Zhao Subject: Re: [PATCH 2/3] ioemu: add libpci fixup to handle recent change in PCIUtils Date: Fri, 27 Feb 2009 14:58:34 +0800 Message-ID: <20090227065834.GA18739@yzhao-otc.sh.intel.com> References: <7969168f0902262103t2cc56ba4j8f7ef7d97ea29f75@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <7969168f0902262103t2cc56ba4j8f7ef7d97ea29f75@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Alexia Benington Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Fri, Feb 27, 2009 at 01:03:44PM +0800, Alexia Benington wrote: > Hi Yu, > > What were the changes in libutils that triggered this patch? > > I've been trying to get a domu guest to correctly use a passed through > VGA card, and noticed that some IO mappings are not as what the driver > in the guest expects to see. For example, one of the I/O range starts > from C000h. After the fixup, it was changed to C200h. I'm suspecting > this causes the guest driver not to work correctly, although there may > be other reasons. What do you think? The old libpci doesn't provide BAR flags in `pci_dev->base_addr' when using sysfs method. This is inconsistent with what it does when using proc or direct I/O access method. The fix of libpci makes the BAR flags combined into `base_addr', which impacts applications (like Xen Qemu) using `base_addr' without masking the flags. That's why the fix triggered the patch you mentioned. Can you please grab some logs? cat /sys/bus/pci/devices/xx:xx.x/resource lspci -s xx:xx.x -vvv Qemu log under /var/log/xen/qemu-dm-xxx I'll try to figure out what happened to your I/O mapping. Thanks, Yu