Re: [Qemu-devel] [PATCH v5 2/2] enable multi-function hot-add

2015-10-27 Thread Cao jin
Hi Michael Thanks for your quick response On 10/27/2015 05:47 PM, Michael S. Tsirkin wrote: On Tue, Oct 27, 2015 at 05:39:01PM +0800, Cao jin wrote: static bool pcie_has_upstream_port(PCIDevice *dev) { PCIDevice *parent_dev = pci_bridge_get_device(pci_dev->bus); /* * Device

Re: [Qemu-devel] [PATCH v5 2/2] enable multi-function hot-add

2015-10-27 Thread Michael S. Tsirkin
On Tue, Oct 27, 2015 at 05:39:01PM +0800, Cao jin wrote: > >>>static > >>>bool pcie_has_upstream_port(PCIDevice *dev) > >>>{ > >>> PCIDevice *parent_dev = pci_bridge_get_device(pci_dev->bus); > >>> > >>> /* > >>> * Device associated with an upstream port. > >>> * As there are seve

Re: [Qemu-devel] [PATCH v5 2/2] enable multi-function hot-add

2015-10-27 Thread Cao jin
hello Michael, there is still a long story with many personal understanding below, hope to get directions. If all my understanding are right, I think maybe I could say: finally I understand your implementation:) On 10/26/2015 08:14 PM, Michael S. Tsirkin wrote: On Mon, Oct 26, 2015 at 07:

Re: [Qemu-devel] [PATCH v5 2/2] enable multi-function hot-add

2015-10-26 Thread Michael S. Tsirkin
On Mon, Oct 26, 2015 at 07:57:16PM +0800, Cao jin wrote: > Hi, > warning, there is a long story below O:-) > > On 10/26/2015 04:29 PM, Michael S. Tsirkin wrote: > >On Mon, Oct 26, 2015 at 11:29:18AM +0800, Cao jin wrote: > >>Enable pcie device multifunction hot, just ensure the function 0 > >>

Re: [Qemu-devel] [PATCH v5 2/2] enable multi-function hot-add

2015-10-26 Thread Cao jin
Hi, warning, there is a long story below O:-) On 10/26/2015 04:29 PM, Michael S. Tsirkin wrote: On Mon, Oct 26, 2015 at 11:29:18AM +0800, Cao jin wrote: Enable pcie device multifunction hot, just ensure the function 0 added last, then driver will got the notification to scan all the functio

Re: [Qemu-devel] [PATCH v5 2/2] enable multi-function hot-add

2015-10-26 Thread Michael S. Tsirkin
On Mon, Oct 26, 2015 at 11:29:18AM +0800, Cao jin wrote: > Enable pcie device multifunction hot, just ensure the function 0 > added last, then driver will got the notification to scan all the > function in the slot. > > Signed-off-by: Cao jin > --- > hw/pci/pci.c | 31 +++

[Qemu-devel] [PATCH v5 2/2] enable multi-function hot-add

2015-10-25 Thread Cao jin
Enable pcie device multifunction hot, just ensure the function 0 added last, then driver will got the notification to scan all the function in the slot. Signed-off-by: Cao jin --- hw/pci/pci.c | 31 ++- hw/pci/pci_host.c| 13 +++-- hw/pci/pcie.c