qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V5] hw/virtio: Add PCIe capability to virtio dev


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH V5] hw/virtio: Add PCIe capability to virtio devices
Date: Tue, 1 Dec 2015 16:25:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 12/01/2015 04:19 PM, Shmulik Ladkani wrote:
Hi,

On Tue, 1 Dec 2015 16:01:00 +0200, address@hidden wrote:
On 12/01/2015 03:18 PM, Shmulik Ladkani wrote:
On Tue, 1 Dec 2015 13:48:13 +0200, address@hidden 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]