From: Marcel Apfelbaum <marcel@redhat.com>
To: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Cc: kraxel@redhat.com, qemu-devel@nongnu.org, ehabkost@redhat.com,
mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH V5] hw/virtio: Add PCIe capability to virtio devices
Date: Tue, 1 Dec 2015 16:25:24 +0200 [thread overview]
Message-ID: <565DADD4.5010502@redhat.com> (raw)
In-Reply-To: <20151201161927.41e37652@pixies>
On 12/01/2015 04:19 PM, Shmulik Ladkani wrote:
> Hi,
>
> On Tue, 1 Dec 2015 16:01:00 +0200, marcel@redhat.com wrote:
>> On 12/01/2015 03:18 PM, Shmulik Ladkani wrote:
>>> On Tue, 1 Dec 2015 13:48:13 +0200, marcel@redhat.com wrote:
>>>>> May I suggest the following:
>>>>> - Expose 'pci_qdev_realize'
>>>>> - Have 'virtio_pci_class_init' arm it's own dc->realize,
>>>>> which will first set 'QEMU_PCI_CAP_EXPRESS' flag as needed,
>>>>> and then call 'pci_qdev_realize'
>>>>> - Now, in 'virtio_pci_realize' we may use 'pci_is_express' instead of
>>>>> directly checking the proxy->flags
>>>>>
>>>>> If this sounds ok, I'll submit a fix.
>>>>
>>>> Give it a try, sure, but you don't need to expose pci_qdev_realize,
>>>> you can 'hijack' parent's realize method before replacing it.
>>>
>>> Actually I caught this as I needed to do something very similar to
>>> vmxnet3.
>>>
>>> Since we need this in 2 places, I thought it would be better to expose
>>> pci_qdev_realize (maybe name it better) and not store parent's original
>>> realize before replacing it.
>>>
>>> WDYT?
>>
>> Personally I don't think pci_qdev_realize should be visible outside hw/pci/pci.c
>> because "realize" should be private to object...
>
> Thanks I'll follow that path and submit a patch shortly.
>
Thanks and please post the fix before our next rc.
If you don't have the time, please let me know and I'll submit a fix.
Thanks again!
Marcel
prev parent reply other threads:[~2015-12-01 14:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 11:41 [Qemu-devel] [PATCH V5] hw/virtio: Add PCIe capability to virtio devices Marcel Apfelbaum
2015-12-01 10:29 ` Shmulik Ladkani
2015-12-01 11:48 ` Marcel Apfelbaum
2015-12-01 13:18 ` Shmulik Ladkani
2015-12-01 14:01 ` Marcel Apfelbaum
2015-12-01 14:19 ` Shmulik Ladkani
2015-12-01 14:25 ` Marcel Apfelbaum [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=565DADD4.5010502@redhat.com \
--to=marcel@redhat.com \
--cc=ehabkost@redhat.com \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=shmulik.ladkani@ravellosystems.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.