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: Shmulik Ladkani
Subject: Re: [Qemu-devel] [PATCH V5] hw/virtio: Add PCIe capability to virtio devices
Date: Tue, 1 Dec 2015 16:19:27 +0200

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.



reply via email to

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