From: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
To: Marcel Apfelbaum <marcel@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-pci: Set the QEMU_PCI_CAP_EXPRESS capability early in its DeviceClass realize method
Date: Wed, 2 Dec 2015 16:27:08 +0200 [thread overview]
Message-ID: <20151202162708.17d43a22@pixies> (raw)
In-Reply-To: <565EF989.9030300@redhat.com>
Hi,
On Wed, 2 Dec 2015 16:00:41 +0200, marcel@redhat.com wrote:
> > As I can't decide what's better, I'm following your initial suggestion
> > and submit for maintainers to review.
>
> Sure, and thanks for the patience to get to the bottom of it.
Sorry, your initial suggestion testing 'pci_bus_is_express() &&
!pci_bus_is_root()' within 'virtio_pci_dc_realize' will not do the job
as in that place pci_dev->bus is still NULL...
It's only assigned at pci_qdev_realize.
I think this is the main reason for separation.
The classes themselves describe the type of the device, which is either
pci or pcie, using k->is_express.
The class code can't tell whether the actual device instance gets
attached to a pci or pcie bus.
So yes, 'pci_is_express' really states whether device instance *can* be
an pcie device.
Thus, I'm going with my initial suggestion, plus minor naming changes.
Many thanks!
prev parent reply other threads:[~2015-12-02 14:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 16:23 [Qemu-devel] [PATCH] virtio-pci: Set the QEMU_PCI_CAP_EXPRESS capability early in its DeviceClass realize method Shmulik Ladkani
2015-12-01 16:36 ` Marcel Apfelbaum
2015-12-01 19:30 ` Shmulik Ladkani
2015-12-01 20:46 ` Marcel Apfelbaum
2015-12-02 8:01 ` Shmulik Ladkani
2015-12-02 9:51 ` Marcel Apfelbaum
2015-12-02 13:30 ` Shmulik Ladkani
2015-12-02 14:00 ` Marcel Apfelbaum
2015-12-02 14:27 ` Shmulik Ladkani [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=20151202162708.17d43a22@pixies \
--to=shmulik.ladkani@ravellosystems.com \
--cc=marcel@redhat.com \
--cc=mst@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.