WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 2/3] ioemu: add libpci fixup to handle recent ch

To: Yu Zhao <yu.zhao@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2/3] ioemu: add libpci fixup to handle recent change in PCIUtils
From: Alexia Benington <alexbenington@xxxxxxxxx>
Date: Sat, 28 Feb 2009 06:12:38 -0500
Cc:
Delivery-date: Sat, 28 Feb 2009 03:13:22 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=aHoAnWKjclKaZmzi9XK/6qASpeZHzHOCYwMLa6TR72w=; b=gEqIq5BeClgsC4pMvwowSz7vLMLBmYY2bcE601WItqEMR5aOQxiU7BxFZQYCwytwxW 932Iy9KoKtduHS17TtKQPgZ1p2bkOELwycFOPMr1+PM2NGDvw50Z0Kv1mNiDPHJiUaLa wiektuGTqil4fDUjNa/BRjURhNUbw3Etzmsxo=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Lh/r56QaEPTdOJNfLGqC/q0bEh/HcQH0e5VSgJnGQeda+8U6pddKleHffi2E7yNaQ3 OZvglOWtOMDj24ppmwPIXGjSbve3jWjX68V/GJZAhTS2oCiqDfr3HJyFfG6f4NYOfkmd +KDLecalJvjOOHZvjjXtrsUk3BmIFyXvtA7NA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090227065834.GA18739@xxxxxxxxxxxxxxxxxxxxxx>
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>
References: <7969168f0902262103t2cc56ba4j8f7ef7d97ea29f75@xxxxxxxxxxxxxx> <20090227065834.GA18739@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

Apologies for the delay. I was trying to trace through the mappings
myself. It seems the incorrect mappings are not necessarily due to
this patch, but I'm still unable to figure out why there's a
misalignment in the port mapping.

I've attached the lspci outputs for the 2 devices I was tinkering
with, although it was mostly 01:00.0. There's also an lspci-like
output in the Windows guest for reference.

I also noticed that some of the registers are being emulated rather
than passed through. I'm wondering if this will affect the
functionality of the device in the guest.

By the way, is there any good way to step through qemu-dm instead of
looking at the log? The log helps experienced Xen developers
understand what's wrong with the system, but its quite challenging for
a beginner, like myself, in understanding Xen implementation. If
anyone prefers, I can start another thread on this.

Thanks. :)

-Alex

On Fri, Feb 27, 2009 at 1:58 AM, Yu Zhao <yu.zhao@xxxxxxxxx> wrote:
> 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
>

Attachment: 01_00_0
Description: Binary data

Attachment: 01_00_1
Description: Binary data

Attachment: lspci.dom0
Description: Binary data

Attachment: lspci.guest
Description: Binary data

Attachment: qemu-dm-wxp.log
Description: Binary data

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