All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Friesen <chris.friesen@windriver.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] call flow to hit get_pci_config_device() during live migration
Date: Fri, 9 Jun 2017 17:18:05 -0600	[thread overview]
Message-ID: <593B2CAD.2000200@windriver.com> (raw)
In-Reply-To: <593AFE69.7090206@windriver.com>

On 06/09/2017 02:00 PM, Chris Friesen wrote:

> I think what I end up with is that byte 0x20 (ie 32) of the PCI config for the
> virtio-blk device is 0 in the data coming over the wire, and 0xC in the local
> copy.  Since cmask is 0xff we need to check all the bits in the byte, and both
> wmask and w1cmask are 0 so the version on the wire and the local version should
> be the same.

I've confirmed that if I boot with a machine type of pc-i440fx-2.2 on the older 
version of qemu then I get different output in lspci -vv for the virtio-blk device.

One the older version I get:

         Region 0: I/O ports at c000 [size=64]
         Region 1: Memory at febd6000 (32-bit, non-prefetchable) [size=4K]
         Capabilities: [40] MSI-X: Enable+ Count=2 Masked-
                 Vector table: BAR=1 offset=00000000
                 PBA: BAR=1 offset=00000800


On the new version I get:

         Region 0: I/O ports at c000 [size=64]
         Region 1: Memory at febd2000 (32-bit, non-prefetchable) [size=4K]
         Region 4: Memory at fe004000 (64-bit, prefetchable) [size=16K]
         Capabilities: [98] MSI-X: Enable+ Count=2 Masked-
                 Vector table: BAR=1 offset=00000000
                 PBA: BAR=1 offset=00000800
         Capabilities: [84] Vendor Specific Information: Len=14 <?>
         Capabilities: [70] Vendor Specific Information: Len=14 <?>
         Capabilities: [60] Vendor Specific Information: Len=10 <?>
         Capabilities: [50] Vendor Specific Information: Len=10 <?>
         Capabilities: [40] Vendor Specific Information: Len=10 <?>

We had to patch the CentOS/RHEL versions of qemu-kvm-ev to enable support for 
the pc-i440fx-2.2 machine type, and it seems we missed something on the newer 
version.

Can someone point me to the code that sets up the PCI config space for the 
virtio-blk device?  I'd like to figure out what's adding Region 4 and the extra 
capabilities.

Chris

      reply	other threads:[~2017-06-10  3:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-09 15:42 [Qemu-devel] call flow to hit get_pci_config_device() during live migration Chris Friesen
2017-06-09 20:00 ` Chris Friesen
2017-06-09 23:18   ` Chris Friesen [this message]

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=593B2CAD.2000200@windriver.com \
    --to=chris.friesen@windriver.com \
    --cc=qemu-devel@nongnu.org \
    /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.