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] Re: PCI BAR register space written with garbage in HVM

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: PCI BAR register space written with garbage in HVM guest.
From: Dan Gora <dan.gora@xxxxxxxxx>
Date: Wed, 17 Mar 2010 00:31:41 -0300
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 16 Mar 2010 20:32:44 -0700
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 :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=JYYeWE8LJJkvwssZ7YpcF8DCwdHBAh4mhejtJ0r/saU=; b=AULoeEtNTSFQkl94NmeVUefAm2WpILHo0IoGrTuq26BCUAYHTrw+ndoMxLTOdcvYZA cYx+syu1gZAS7Dth12X5vfc2qo8xWP3tO5L36c3hOarkn1b6TTzssWS3f9PAaBwszqUw +CSSWyDfEKhYVnvoixapwoxEqPv9evODvrW24=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=EJWgDUaxH/3pXSgT9RD8yORcLp7HQl7R/6HHmdP5M4D8asCxjFfAbfbApkQZ2fZzL5 uKDm1fWnctM7gVKEs8r37xBZ7FZzP5L0kjWzI/aj/Ndsxe2iXLS/mBIy0GcG9EuKE1Vt VpIVw4Fh/ALek4YPT/06zRveG/NimzVKKXfPY=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100317024611.GB2217@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>
References: <4779de451003151809n6cec813dp32d77fee34b1bda2@xxxxxxxxxxxxxx> <4779de451003161714x45dbca6dh80a9eed56e4fb0c2@xxxxxxxxxxxxxx> <20100317024611.GB2217@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, Mar 16, 2010 at 11:46 PM, Konrad Rzeszutek Wilk
<konrad.wilk@xxxxxxxxxx> wrote:
> There is a snippet of QEMU that has that (hw/pass-through.c),
> function pt_pci_write_config:
>
> .. snip ..
>      ret = pci_write_block(pci_dev, address, (uint8_t *)&val, len);
>
>        if (!ret)
>            PT_LOG("Error: pci_write_block failed. return value[%d].\n",
> ret);
>    }
>
>    if (pm_state != NULL && pm_state->flags & PT_FLAG_TRANSITING)
>        /* set QEMUTimer */
>        qemu_mod_timer(pm_state->pm_timer,
>            (qemu_get_clock(rt_clock) + pm_state->pm_delay));

I turned on all the debugging in there and I see messages, but none
when the bad writes occur, which made me think that they were not
coming from there...

>> <snip>
>>
>> 5904  21:35:48 [    7f05d53f987b] read(16, "o\0\0\0", 4) = 4
>> 5904  21:35:48 [    7f05d53f97fb] write(16, "o\0\0\0", 4) = 4
>> 5904  21:35:48 [    7f05d53f97fb] write(6,
>> "\377\377\377\377\377\377\0\26>2\325d\10\0E\0\2@\0\354\0\0@\21w\302\0\0\0\0\377\377"...,
>> 590) = 256
>
> I would turn on all of those debug options and see if anything is
> happening.

done.. nothing :(  At least not during the error.

> Actually I would instrument all of the 'pci_write_block' calls.

I'll try that tomorrow...

> Can you attach debug to it? Or maybe run 'objdump' on the qemu-dm and
> see if the address correspond to some code in it?

Yes I can debug it, but really the only thing that I have to hang my
hat on is write().  So I figure that it must be coming from pciutils
since it's messing with /sys/bus/pci, but I don't really know much
about pciutils so wasn't sure what to grep around for.

I'll try and trace the pci_write_block calls and put gdb on it
tomorrow and see if anything pops up.

thanks,
dan

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