Re: [PATCH v11 00/11] PCI: brcmstb: enable PCIe for STB chips

2020-09-08 Thread Lorenzo Pieralisi
On Mon, Sep 07, 2020 at 11:29:06AM -0700, Florian Fainelli wrote: > > > On 9/7/2020 10:43 AM, Jim Quinlan wrote: > > On Mon, Sep 7, 2020 at 5:16 AM Lorenzo Pieralisi > > wrote: > > > > > > On Thu, Aug 27, 2020 at 09:29:59AM -0400, Jim Quinlan wrote:

Re: [PATCH v11 00/11] PCI: brcmstb: enable PCIe for STB chips

2020-09-07 Thread Lorenzo Pieralisi
On Thu, Aug 27, 2020 at 09:29:59AM -0400, Jim Quinlan wrote: > On Thu, Aug 27, 2020 at 2:35 AM Christoph Hellwig wrote: > > > > On Tue, Aug 25, 2020 at 10:40:27AM -0700, Florian Fainelli wrote: > > > Hi, > > > > > > On 8/24/2020 12:30 PM, Jim Quinlan wrote: > > >> > > >> Patchset Summary: > > >>

Re: [PATCH v2] PCI: hv: Fix panic by calling hv_pci_remove_slots() earlier

2019-08-12 Thread Lorenzo Pieralisi
On Tue, Aug 06, 2019 at 08:41:17PM +, Dexuan Cui wrote: > > From: linux-hyperv-ow...@vger.kernel.org > > On Behalf Of Bjorn Helgaas > > Sent: Tuesday, August 6, 2019 1:16 PM > > To: Dexuan Cui > > > > Thanks for updating this. But you didn't update the subject line, > > which is really

Re: [PATCH v2] PCI: hv: Fix a use-after-free bug in hv_eject_device_work()

2019-07-05 Thread Lorenzo Pieralisi
On Fri, Jun 21, 2019 at 11:45:23PM +, Dexuan Cui wrote: > > The commit 05f151a73ec2 itself is correct, but it exposes this > use-after-free bug, which is caught by some memory debug options. > > Add a Fixes tag to indicate the dependency. > > Fixes: 05f151a73ec2 ("PCI: hv: Fix a memory leak

Re: [PATCH 3/3] PCI: hv: Add pci_destroy_slot() in pci_devices_present_work(), if necessary

2019-03-26 Thread Lorenzo Pieralisi
On Mon, Mar 04, 2019 at 09:34:49PM +, Dexuan Cui wrote: > When we hot-remove a device, usually the host sends us a PCI_EJECT message, > and a PCI_BUS_RELATIONS message with bus_rel->device_count == 0. But when > we do the quick hot-add/hot-remove test, the host may not send us the > PCI_EJECT

Re: [PATCH 1/3] PCI: hv: Fix a memory leak in hv_eject_device_work()

2019-03-26 Thread Lorenzo Pieralisi
On Tue, Mar 26, 2019 at 06:01:32PM +, Dexuan Cui wrote: [...] > > > Have we reached a conclusion on this ? I would like to merge this series > > > given that it is fixing bugs and it has hung in the balance for quite > > > a while but it looks like Michael is not too happy about these

Re: [PATCH 1/3] PCI: hv: Fix a memory leak in hv_eject_device_work()

2019-03-26 Thread Lorenzo Pieralisi
On Thu, Mar 21, 2019 at 12:12:03AM +, Dexuan Cui wrote: > > From: Michael Kelley > > Sent: Wednesday, March 20, 2019 2:38 PM > > > > From: Dexuan Cui > > > > > > After a device is just created in new_pcichild_device(), hpdev->refs is > > > set > > > to 2 (i.e. the initial value of 1 plus

Re: [PATCH v3 1/2] PCI: hv: Replace hv_vp_set with hv_vpset

2019-02-27 Thread Lorenzo Pieralisi
On Wed, Feb 27, 2019 at 04:53:37PM +0100, Vitaly Kuznetsov wrote: > Maya Nakamura writes: > > > Remove a duplicate definition of VP set (hv_vp_set) and use the common > > definition (hv_vpset) that is used in other places. > > > > Change the order of the members in struct hv_pcibus_device so

Re: [PATCH v3 2/2] PCI: hv: Refactor hv_irq_unmask() to use cpumask_to_vpset()

2019-02-27 Thread Lorenzo Pieralisi
On Wed, Feb 27, 2019 at 01:34:44PM +0100, Vitaly Kuznetsov wrote: > Maya Nakamura writes: > > > Remove the duplicate implementation of cpumask_to_vpset() and use the > > shared implementation. Export hv_max_vp_index, which is required by > > cpumask_to_vpset(). > > > > Apply changes to

Re: [PATCH v3 0/2] PCI: hv: Refactor hv_irq_unmask() to use hv_vpset and cpumask_to_vpset()

2019-02-15 Thread Lorenzo Pieralisi
On Mon, Jan 28, 2019 at 11:15:37PM -0800, Maya Nakamura wrote: > This patchset removes a duplicate definition of VP set (hv_vp_set) and > uses the common definition (hv_vpset) that is used in other places. It > changes the order of the members in struct hv_pcibus_device due to > flexible array in

Re: [PATCH v2 1/2] PCI: hv: Replace hv_vp_set with hv_vpset

2019-02-15 Thread Lorenzo Pieralisi
On Mon, Jan 28, 2019 at 09:49:32PM -0800, Maya Nakamura wrote: > On Sun, Jan 27, 2019 at 05:11:48AM +, Michael Kelley wrote: > > From: Maya Nakamura Sent: Saturday, January > > 26, 2019 12:52 AM > > > > > > Remove a duplicate definition of VP set (hv_vp_set) and use the common > > >

Re: [PATCH v3 0/2] PCI: hv: Refactor hv_irq_unmask() to use hv_vpset and cpumask_to_vpset()

2019-02-13 Thread Lorenzo Pieralisi
On Mon, Jan 28, 2019 at 11:15:37PM -0800, Maya Nakamura wrote: > This patchset removes a duplicate definition of VP set (hv_vp_set) and > uses the common definition (hv_vpset) that is used in other places. It > changes the order of the members in struct hv_pcibus_device due to > flexible array in

Re: [PATCH v2 1/2] PCI: hv: Replace hv_vp_set with hv_vpset

2019-02-13 Thread Lorenzo Pieralisi
On Wed, Feb 13, 2019 at 02:20:29AM +, Michael Kelley wrote: > From: Lorenzo Pieralisi Sent: Tuesday, February > 12, 2019 8:35 AM > > > > On Mon, Jan 28, 2019 at 09:49:32PM -0800, Maya Nakamura wrote: > > > On Sun, Jan 27, 2019 at 05:11:48AM +, Michael Kelle

Re: [PATCH v2 1/2] PCI: hv: Replace hv_vp_set with hv_vpset

2019-02-12 Thread Lorenzo Pieralisi
On Mon, Jan 28, 2019 at 09:49:32PM -0800, Maya Nakamura wrote: > On Sun, Jan 27, 2019 at 05:11:48AM +, Michael Kelley wrote: > > From: Maya Nakamura Sent: Saturday, January > > 26, 2019 12:52 AM > > > > > > Remove a duplicate definition of VP set (hv_vp_set) and use the common > > >

Re: [PATCH] PCI: hv: Add hv_pci_remove_slots() when we unload the driver

2019-02-12 Thread Lorenzo Pieralisi
On Thu, Feb 07, 2019 at 08:36:32PM +, Dexuan Cui wrote: > > When we unload pci-hyperv, the host doesn't send us a PCI_EJECT message. > In this case we also need to make sure the sysfs pci slot directory > is removed, otherwise "cat /sys/bus/pci/slots/2/address" will trigger > "BUG: unable to

Re: [PATCH] PCI: hv: Fix return value check in hv_pci_assign_slots()

2018-09-20 Thread Lorenzo Pieralisi
[+DaveM, netdev] On Thu, Sep 20, 2018 at 06:40:31AM +, Wei Yongjun wrote: > In case of error, the function pci_create_slot() returns ERR_PTR() and > never returns NULL. The NULL test in the return value check should be > replaced with IS_ERR(). > > Fixes: a15f2c08c708 ("PCI: hv: support

Re: [PATCH] PCI: hv: Fix return value check in hv_pci_assign_slots()

2018-09-20 Thread Lorenzo Pieralisi
[+DaveM, netdev] Removed erroneously added disclaimer, apologies. On Thu, Sep 20, 2018 at 06:40:31AM +, Wei Yongjun wrote: > In case of error, the function pci_create_slot() returns ERR_PTR() and > never returns NULL. The NULL test in the return value check should be > replaced with

Re: [PATCH v2 0/2] hv_netvsc: associate VF and PV device by serial number

2018-09-20 Thread Lorenzo Pieralisi
On Fri, Sep 14, 2018 at 12:54:55PM -0700, Stephen Hemminger wrote: > The Hyper-V implementation of PCI controller has concept of 32 bit serial > number > (not to be confused with PCI-E serial number). This value is sent in the > protocol > from the host to indicate SR-IOV VF device is attached

Re: [PATCH v2 2/2] hv_netvsc: pair VF based on serial number

2018-09-20 Thread Lorenzo Pieralisi
On Fri, Sep 14, 2018 at 12:54:57PM -0700, Stephen Hemminger wrote: > Matching network device based on MAC address is problematic > since a non VF network device can be creted with a duplicate MAC > address causing confusion and problems. The VMBus API does provide > a serial number that is a

Re: [PATCH v2] PCI: hv: Disable/enable irq rather than bh in hv_compose_msi_msg()

2018-07-04 Thread Lorenzo Pieralisi
On Sun, Jul 01, 2018 at 06:22:23PM +, Dexuan Cui wrote: > > Commit de0aa7b2f97d ("PCI: hv: Fix 2 hang issues in hv_compose_msi_msg()") > uses local_bh_disable()/enable(), because hv_pci_onchannelcallback() can > also run in tasklet context as the channel event callback, and here we > want to

Re: [PATCH 2/2] pci: host: pci-hyperv: Replace GFP_ATOMIC with GFP_KERNEL in new_pcichild_device

2018-06-29 Thread Lorenzo Pieralisi
On Sun, Mar 18, 2018 at 10:53:28PM +0800, Jia-Ju Bai wrote: > new_pcichild_device() is not called in atomic context. > > The call chain ending up at new_pcichild_device() is: > [1] new_pcichild_device() <- pci_devices_present_work() > pci_devices_present_work() is only set in INIT_WORK(). > >

Re: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in hv_compose_msi_msg()

2018-06-29 Thread Lorenzo Pieralisi
On Wed, Jun 13, 2018 at 10:50:05PM +, Dexuan Cui wrote: > > From: Bjorn Helgaas > > Sent: Wednesday, June 13, 2018 15:15 > > > ... > > > It looks Lorenzo's pci.git tree has not been updated for 3+ weeks. > > > I guess Lorenzo may be on vacation. > > > > > > @Bjorn, can this patch go through

Re: [PATCH] PCI: hv: fix spelling mistake: "reqquest" -> "request"

2018-06-28 Thread Lorenzo Pieralisi
On Tue, May 08, 2018 at 10:49:46PM +0100, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in dev_err error message > > Signed-off-by: Colin Ian King > --- > drivers/pci/host/pci-hyperv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Hi Colin, patch

Re: [PATCH] PCI: hv: Do not wait forever on a device that has disappeared

2018-05-25 Thread Lorenzo Pieralisi
On Wed, May 23, 2018 at 09:12:01PM +, Dexuan Cui wrote: > > Before the guest finishes the device initialization, the device can be > removed anytime by the host, and after that the host won't respond to > the guest's request, so the guest should be prepared to handle this > case. > >

Re: [PATCH] PCI: hv: Do not wait forever on a device that has disappeared

2018-05-25 Thread Lorenzo Pieralisi
On Thu, May 24, 2018 at 11:55:35PM +, Dexuan Cui wrote: > > From: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > > Sent: Thursday, May 24, 2018 05:41 > > On Wed, May 23, 2018 at 09:12:01PM +, Dexuan Cui wrote: > > > > > > Before the guest finishes

Re: [PATCH 0/3] PCI: hv: cleanup patches

2018-05-24 Thread Lorenzo Pieralisi
On Wed, May 23, 2018 at 10:11:11AM -0700, Stephen Hemminger wrote: > These are minor code cleanups found while reviewing and implementing > other things in Hyper-V PCI host driver. > > Stephen Hemminger (3): > PCI: hv: remove unused reason for refcount handler > PCI: hv: convert remove_lock

Re: [PATCH] PCI: hv: Do not wait forever on a device that has disappeared

2018-05-24 Thread Lorenzo Pieralisi
On Wed, May 23, 2018 at 09:12:01PM +, Dexuan Cui wrote: > > Before the guest finishes the device initialization, the device can be > removed anytime by the host, and after that the host won't respond to > the guest's request, so the guest should be prepared to handle this > case. > >

Re: [PATCH v8] PCI: hv: Make sure the bus domain is really unique

2018-05-03 Thread Lorenzo Pieralisi
I removed this last paragraph, the information is in the stable tag below. > Fixes: 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI domain") > Signed-off-by: Sridhar Pitchai <sridhar.pitc...@microsoft.com> > Cc: sta...@vger.kernel.org # v4.14+ > Reviewed-by: Bjorn

Re: [PATCH v7] Revert "PCI: hv: Use device serial number as PCI domain"

2018-04-12 Thread Lorenzo Pieralisi
On Thu, Apr 12, 2018 at 03:56:42PM +, Sridhar Pitchai wrote: > > > > >> I am still not happy with this patch. > > >> > > >> - You do not explain at all the dependency on commit > 0c195567a8f6 and > > >>you should because that's fundamental, if that

Re: [PATCH v7] Revert "PCI: hv: Use device serial number as PCI domain"

2018-04-12 Thread Lorenzo Pieralisi
On Thu, Apr 12, 2018 at 02:44:42AM +, Sridhar Pitchai wrote: > When Linux runs as a guest VM in Hyper-V and Hyper-V adds the virtual PCI > bus to the guest, Hyper-V always provides unique PCI domain. > > commit 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI domain") > overrode unique

Re: [PATCH v3]PCI: hv: fix PCI-BUS domainID corruption

2018-03-21 Thread Lorenzo Pieralisi
s, that's why I asked and I will ask again, are you sure you won't trigger a regression by sending this fix to stable ? I assume the bond driver mechanism is now done and dusted. Thanks, Lorenzo > Thanks, > Sridhar > > On 3/20/18, 11:32 AM, "Lorenzo Pieralisi" <lorenzo.pie

Re: [PATCH v3]PCI: hv: fix PCI-BUS domainID corruption

2018-03-20 Thread Lorenzo Pieralisi
On Tue, Mar 20, 2018 at 05:56:15PM +, Sridhar Pitchai wrote: > Hi Lorenzo, > Are we good with the explanation? Can I send the patch with the > updated commit comments? Almost. [...] > Since we have the transparent SRIOV mode now, the short VF device name > is no longer needed. Can

Re: [PATCH v4 3/4] PCI: hv: Remove hbus->enum_sem

2018-03-16 Thread Lorenzo Pieralisi
On Fri, Mar 16, 2018 at 05:41:27PM +, Dexuan Cui wrote: > > From: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > > Sent: Friday, March 16, 2018 03:54 > > ... > > Dexuan, > > while applying/updating these patches I notice this one may be squashed > >

Re: [PATCH v4 3/4] PCI: hv: Remove hbus->enum_sem

2018-03-16 Thread Lorenzo Pieralisi
On Thu, Mar 15, 2018 at 02:21:51PM +, Dexuan Cui wrote: > Since we serialize the present/eject work items now, we don't need the > semaphore any more. > > Signed-off-by: Dexuan Cui > Reviewed-by: Michael Kelley > Acked-by: Haiyang Zhang

Re: [PATCH v4 1/2] PCI: hv: Serialize the present and eject work items

2018-03-15 Thread Lorenzo Pieralisi
On Thu, Mar 15, 2018 at 02:20:53PM +, Dexuan Cui wrote: > When we hot-remove the device, we first receive a PCI_EJECT message and > then receive a PCI_BUS_RELATIONS message with bus_rel->device_count == 0. > > The first message is offloaded to hv_eject_device_work(), and the second > is

Re: [PATCH v3]PCI: hv: fix PCI-BUS domainID corruption

2018-03-15 Thread Lorenzo Pieralisi
On Thu, Mar 15, 2018 at 12:03:07AM +, Sridhar Pitchai wrote: > Whenever PCI bus is added, HyperV guarantees the BUS id is unique. Even "Whenever a PCI bus is added" > with that when a first device is added to the bus, it overrides bus domain > ID with the device serial number. Sometime this

Re: [PATCH v3 6/6] PCI: hv: fix 2 hang issues in hv_compose_msi_msg()

2018-03-14 Thread Lorenzo Pieralisi
On Tue, Mar 13, 2018 at 06:23:39PM +, Dexuan Cui wrote: [...] > Hi Lorenzo, Bjorn, and all, > Do you need more ACKs? Currently Michael and Haiyang reviewed and ack'd > the patchset. > > Should I send a v4 that just removes the "CC: sta...@vger.kernel.org" tag > for patches 1, 2, 4 and 5? I

Re: [PATCH v3 6/6] PCI: hv: fix 2 hang issues in hv_compose_msi_msg()

2018-03-13 Thread Lorenzo Pieralisi
On Tue, Mar 13, 2018 at 06:23:39PM +, Dexuan Cui wrote: > > From: Dexuan Cui > > Sent: Wednesday, March 7, 2018 13:40 > > To: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > > Cc: bhelg...@google.com; linux-...@vger.kernel.org; KY Srinivasan > > <k...@m

Re: [PATCH] PCI: hv: fix bus domain ID corruption

2018-03-09 Thread Lorenzo Pieralisi
On Fri, Mar 09, 2018 at 05:02:34AM +, Sridhar Pitchai wrote: > When PCI BUS is added, PCI_BUS domain ID is set. When PCI_BUS and a device > added to the bus is racing against each other, the first device tends to > overwrite the domain ID. In order to avoid the race, this patch make sure >

Re: [PATCH v3 6/6] PCI: hv: fix 2 hang issues in hv_compose_msi_msg()

2018-03-07 Thread Lorenzo Pieralisi
On Tue, Mar 06, 2018 at 06:21:56PM +, Dexuan Cui wrote: > 1. With the patch "x86/vector/msi: Switch to global reservation mode" > (4900be8360), the recent v4.15 and newer kernels always hang for 1-vCPU > Hyper-V VM with SR-IOV. This is because when we reach hv_compose_msi_msg() > by