All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: qemu-devel qemu-devel <qemu-devel@nongnu.org>
Cc: Marcel Apfelbaum <marcel@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>
Subject: [Qemu-devel] "x-disable-pcie" virtio-pci property in compat_props (HW_COMPAT_2_4)
Date: Tue, 9 Feb 2016 18:38:18 +0100	[thread overview]
Message-ID: <56BA240A.6060409@redhat.com> (raw)

Hi,

I'm playing with a qemu-2.5.0 and pc-i440fx-2.4 machine type, and
perhaps I don't understand correctly the compat_props machinery but
there is something strange for me:

in qemu-2.5.0, hw/virtio/virtio-pci.c:

   1880     DEFINE_PROP_BIT("x-disable-pcie", VirtIOPCIProxy, flags,
   1881                     VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, false),

So I guess a new default machine (pc-i440fx-2.5) will be defined by
default with "x-disable-pcie" set to "false".

and in qemu-2.5, include/hw/compat.h:

      3
      4 #define HW_COMPAT_2_4 \
      5         {\
..
     14             .driver   = "virtio-pci",\
     15             .property = "x-disable-pcie",\
     16             .value    = "on",\
     17         },{\

So I guess a new machine pc-i440fx-2.4 created with qemu-2.5.0 will have
"x-disable-pcie" set to true (as with qemu-2.4.0 this feature is not
available).

But in this case "x-disable-pcie" is always set to "false".

So the questions are:
- do I understand correctly?
- I check "x-disable-pcie" for "virtio-*-pci" devices (virtio-net-pci,
virtio-balloon-pci, ..."), should they inherit the behavior from their
parent "virtio-pci"? (they should, as virtio-pci is an abstract device type)

My test:

- take qemu-2.5.0 (a8c40fa Update version for v2.5.0 release)
- start it with "-M pc-i440fx-2.5 -device virtio-balloon-pci -S",
  "info qtree":

    bus: pci.0
      type PCI
      dev: virtio-balloon-pci, id ""
...
        x-disable-pcie = false

- start it with "-M pc-i440fx-2.4 -device virtio-balloon-pci -S",
  "info qtree":

    bus: pci.0
      type PCI
      dev: virtio-balloon-pci, id ""
...
        x-disable-pcie = false

Any explanation is very welcome.

Thanks,
Laurent

             reply	other threads:[~2016-02-09 17:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 17:38 Laurent Vivier [this message]
2016-02-10  9:52 ` [Qemu-devel] "x-disable-pcie" virtio-pci property in compat_props (HW_COMPAT_2_4) Marcel Apfelbaum
2016-02-10 10:09   ` Laurent Vivier

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=56BA240A.6060409@redhat.com \
    --to=lvivier@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=marcel@redhat.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.