All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Dan Gora <dan.gora@gmail.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Re: PCI BAR register space written with garbage in HVM guest.
Date: Tue, 16 Mar 2010 22:46:11 -0400	[thread overview]
Message-ID: <20100317024611.GB2217@phenom.dumpdata.com> (raw)
In-Reply-To: <4779de451003161714x45dbca6dh80a9eed56e4fb0c2@mail.gmail.com>

> open("/sys/bus/pci/devices/0000:08:00.0/config", O_RDWR) = 6
> 5904  21:35:47 [    7f05d53fa3c8] pwrite(6, "\6\1", 2, 4) = 2
> 5904  21:35:47 [    7f05d3b6eb77] ioctl(16, EVIOCGKEYCODE, 0x7fffdde98890) = 0
> 5904  21:35:47 [    7f05d53f987b] read(4, 0x7fffdde98870, 16) = -1
> EAGAIN (Resource temporarily unavailable)
> 5904  21:35:47 [    7fffddf437dc] clock_gettime(CLOCK_MONOTONIC,
> {1724, 868201462}) = 0
> 5904  21:35:47 [    7fffddf437dc] clock_gettime(CLOCK_MONOTONIC,
> {1724, 868259075}) = 0

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));

> 
> <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.

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

> 
> Notice the length of 590 bytes!  The EIP also matches what the kernel
> thinks was the syscall which caused the write.
> 
> Anyone have any idea where this could be happening in qemu?  I'm

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?

  reply	other threads:[~2010-03-17  2:46 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 [this message]
2010-03-17  3:31     ` Dan Gora
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=20100317024611.GB2217@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=dan.gora@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.