Re: [Qemu-devel] [PATCH v2 5/6] vmw_pvscsi: The pvscsi device is a PCIE endpoint

2015-12-14 Thread Shmulik Ladkani
Hi, On Mon, 14 Dec 2015 23:10:20 +0200 "Michael S. Tsirkin" wrote: > > In order to set QEMU_PCI_CAP_EXPRESS conditionally per instance > > (for example, according to the given x-pcie-disable property), the > > 'parent_dc_realize' trick was suggested. > > > > Reasoning is documented in: > > 056

Re: [Qemu-devel] [PATCH v2 5/6] vmw_pvscsi: The pvscsi device is a PCIE endpoint

2015-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2015 at 11:01:05PM +0200, Shmulik Ladkani wrote: > Hi Michael, > > On Mon, 14 Dec 2015 19:37:29 +0200 "Michael S. Tsirkin" > wrote: > > On Mon, Dec 14, 2015 at 06:14:37PM +0100, Paolo Bonzini wrote: > > > > > > On 13/12/2015 09:08, Shmulik Ladkani wrote: > > > > +pvs_k->pare

Re: [Qemu-devel] [PATCH v2 5/6] vmw_pvscsi: The pvscsi device is a PCIE endpoint

2015-12-14 Thread Shmulik Ladkani
Hi Michael, On Mon, 14 Dec 2015 19:37:29 +0200 "Michael S. Tsirkin" wrote: > On Mon, Dec 14, 2015 at 06:14:37PM +0100, Paolo Bonzini wrote: > > > > On 13/12/2015 09:08, Shmulik Ladkani wrote: > > > +pvs_k->parent_dc_realize = dc->realize; > > > > Marcel, Michael, > > > > this creates a rea

Re: [Qemu-devel] [PATCH v2 5/6] vmw_pvscsi: The pvscsi device is a PCIE endpoint

2015-12-14 Thread Marcel Apfelbaum
On 12/14/2015 07:14 PM, Paolo Bonzini wrote: On 13/12/2015 09:08, Shmulik Ladkani wrote: +pvs_k->parent_dc_realize = dc->realize; Marcel, Michael, this creates a really nasty dependency on the contents of pci_qdev_realize. Hi Paolo, In this case is exactly want we want to do. We don'

Re: [Qemu-devel] [PATCH v2 5/6] vmw_pvscsi: The pvscsi device is a PCIE endpoint

2015-12-14 Thread Paolo Bonzini
On 14/12/2015 18:37, Michael S. Tsirkin wrote: > > Can you instead change PCIDeviceClass's pc->is_express to a function > > pointer, and provide a sample implementation pci_is_express_true for the > > devices that set is_express to true? > > I'm not very familiar with vmw code, and I dislike ove

Re: [Qemu-devel] [PATCH v2 5/6] vmw_pvscsi: The pvscsi device is a PCIE endpoint

2015-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2015 at 06:14:37PM +0100, Paolo Bonzini wrote: > > > On 13/12/2015 09:08, Shmulik Ladkani wrote: > > +pvs_k->parent_dc_realize = dc->realize; > > Marcel, Michael, > > this creates a really nasty dependency on the contents of pci_qdev_realize. > > Can you instead change PCID

Re: [Qemu-devel] [PATCH v2 5/6] vmw_pvscsi: The pvscsi device is a PCIE endpoint

2015-12-14 Thread Shmulik Ladkani
Hi, On Mon, 14 Dec 2015 18:14:37 +0100 Paolo Bonzini wrote: > On 13/12/2015 09:08, Shmulik Ladkani wrote: > > +pvs_k->parent_dc_realize = dc->realize; > > Marcel, Michael, > > this creates a really nasty dependency on the contents of pci_qdev_realize. > > Can you instead change PCIDeviceCl

Re: [Qemu-devel] [PATCH v2 5/6] vmw_pvscsi: The pvscsi device is a PCIE endpoint

2015-12-14 Thread Paolo Bonzini
On 13/12/2015 09:08, Shmulik Ladkani wrote: > +pvs_k->parent_dc_realize = dc->realize; Marcel, Michael, this creates a really nasty dependency on the contents of pci_qdev_realize. Can you instead change PCIDeviceClass's pc->is_express to a function pointer, and provide a sample implementat

[Qemu-devel] [PATCH v2 5/6] vmw_pvscsi: The pvscsi device is a PCIE endpoint

2015-12-13 Thread Shmulik Ladkani
Report the 'express endpoint' capability if on a PCIE bus. Signed-off-by: Shmulik Ladkani --- hw/scsi/vmw_pvscsi.c | 54 +++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index 00d6900..f