xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dan Gora <dan.gora@gmail.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Re: PCI BAR register space written with garbage in HVM guest.
Date: Wed, 17 Mar 2010 00:31:41 -0300	[thread overview]
Message-ID: <4779de451003162031r6fce99bbv60cc069a432f47ae@mail.gmail.com> (raw)
In-Reply-To: <20100317024611.GB2217@phenom.dumpdata.com>

On Tue, Mar 16, 2010 at 11:46 PM, Konrad Rzeszutek Wilk
<konrad.wilk@oracle.com> 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

  reply	other threads:[~2010-03-17  3:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-16  1:09 PCI BAR register space written with garbage in HVM guest Dan Gora
2010-03-16  1:48 ` Konrad Rzeszutek Wilk
2010-03-16  2:55   ` Dan Gora
2010-03-16 10:27     ` Jan Beulich
2010-03-16 15:20     ` Konrad Rzeszutek Wilk
2010-03-16 15:54       ` Jan Beulich
2010-03-16 10:24 ` Jan Beulich
2010-03-17  0:14 ` Dan Gora
2010-03-17  2:46   ` Konrad Rzeszutek Wilk
2010-03-17  3:31     ` Dan Gora [this message]
2010-03-18  2:14   ` Dan Gora
     [not found]     ` <20100318143207.GF14445@phenom.dumpdata.com>
2010-03-18 18:27       ` Dan Gora
2010-03-18 18:10         ` Konrad Rzeszutek Wilk
2010-03-18 19:56           ` Dan Gora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4779de451003162031r6fce99bbv60cc069a432f47ae@mail.gmail.com \
    --to=dan.gora@gmail.com \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).