RE: [PATCH 2/2] pci-hyperv: Fix an atomic bug

2017-03-27 Thread Long Li
Srinivasan > > The memory allocation here needs to be non-blocking. > Fix the issue. > > Signed-off-by: K. Y. Srinivasan > Cc: Reviewed-by: Long Li > --- > drivers/pci/host/pci-hyperv.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > di

RE: [PATCH 1/2] pci-hyperv: Fix a bug in specifying CPU affinity

2017-03-27 Thread Long Li
in specifying CPU affinity > > From: K. Y. Srinivasan <k...@microsoft.com> > > When we have 32 or more CPUs in the affinity mask, we should use a special > constant to specify that to the host. Fix this issue. > > Signed-off-by: K. Y. Srinivasan <k...@mic

RE: [PATCH 1/2] pci-hyperv: Fix a bug in specifying CPU affinity

2017-03-27 Thread Long Li
inity > > From: K. Y. Srinivasan > > When we have 32 or more CPUs in the affinity mask, we should use a special > constant to specify that to the host. Fix this issue. > > Signed-off-by: K. Y. Srinivasan > Cc: Reviewed-by: Long Li > --- > drivers/pci/host/pci-hyp

[PATCH v3] HV: properly delay KVP packets when negotiation is in progress

2017-03-24 Thread Long Li
From: Long Li <lon...@microsoft.com> The host may send multiple negotiation packets (due to timeout) before the KVP user-mode daemon is connected. We need to defer processing those packets until the daemon is negotiated and connected. It's okay for guest to respond to all negotiation p

[PATCH v3] HV: properly delay KVP packets when negotiation is in progress

2017-03-24 Thread Long Li
From: Long Li The host may send multiple negotiation packets (due to timeout) before the KVP user-mode daemon is connected. We need to defer processing those packets until the daemon is negotiated and connected. It's okay for guest to respond to all negotiation packets. In addition, the host

[PATCH v3] HV: properly delay KVP packets when negotiation is in progress

2017-03-24 Thread Long Li
From: Long Li <lon...@microsoft.com> The host may send multiple negotiation packets (due to timeout) before the KVP user-mode daemon is connected. We need to defer processing those packets until the daemon is negotiated and connected. It's okay for guest to respond to all negotiation p

[PATCH v3] HV: properly delay KVP packets when negotiation is in progress

2017-03-24 Thread Long Li
From: Long Li The host may send multiple negotiation packets (due to timeout) before the KVP user-mode daemon is connected. We need to defer processing those packets until the daemon is negotiated and connected. It's okay for guest to respond to all negotiation packets. In addition, the host

[PATCH 1/2 v5] pci-hyperv: properly handle pci bus remove

2017-03-23 Thread Long Li
From: Long Li <lon...@microsoft.com> hv_pci_devices_present is called in hv_pci_remove when we remove a PCI device from host (e.g. by disabling SRIOV on a device). In hv_pci_remove, the bus is already removed before the call, so we don't need to rescan the bus in the workqueue schedule

[PATCH 2/2 v5] pci-hyperv: lock pci bus on device eject

2017-03-23 Thread Long Li
From: Long Li <lon...@microsoft.com> A PCI_EJECT message can arrive at the same time we are calling pci_scan_child_bus in the workqueue for the previous PCI_BUS_RELATIONS message or in create_root_hv_pci_bus(), in this case we could potentially modify the bus from multiple places. Properl

[PATCH 1/2 v5] pci-hyperv: properly handle pci bus remove

2017-03-23 Thread Long Li
From: Long Li hv_pci_devices_present is called in hv_pci_remove when we remove a PCI device from host (e.g. by disabling SRIOV on a device). In hv_pci_remove, the bus is already removed before the call, so we don't need to rescan the bus in the workqueue scheduled from hv_pci_devices_present

[PATCH 2/2 v5] pci-hyperv: lock pci bus on device eject

2017-03-23 Thread Long Li
From: Long Li A PCI_EJECT message can arrive at the same time we are calling pci_scan_child_bus in the workqueue for the previous PCI_BUS_RELATIONS message or in create_root_hv_pci_bus(), in this case we could potentially modify the bus from multiple places. Properly lock the bus access

RE: [PATCH v2] HV: properly delay KVP packets when negotiation is in progress

2017-03-23 Thread Long Li
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, March 23, 2017 9:04 AM > To: Long Li <lon...@microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; Stephen Hemm

RE: [PATCH v2] HV: properly delay KVP packets when negotiation is in progress

2017-03-23 Thread Long Li
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, March 23, 2017 9:04 AM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger > ; de...@linuxdriverproject.org; linux- > ker...@vger.kernel.org; sta...@v

RE: [PATCH 1/2 v4] pci-hyperv: properly handle pci bus remove

2017-03-22 Thread Long Li
> -Original Message- > From: Bjorn Helgaas [mailto:helg...@kernel.org] > Sent: Thursday, March 16, 2017 1:07 PM > To: Long Li <lon...@microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; Bjorn

RE: [PATCH 1/2 v4] pci-hyperv: properly handle pci bus remove

2017-03-22 Thread Long Li
> -Original Message- > From: Bjorn Helgaas [mailto:helg...@kernel.org] > Sent: Thursday, March 16, 2017 1:07 PM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; Bjorn Helgaas ; > de...@linuxdriverproject.org; linux-...@vger.kernel.org; linux- > ker...@vger.

[PATCH v2] HV: properly delay KVP packets when negotiation is in progress

2017-03-22 Thread Long Li
<vkuzn...@redhat.com>. Signed-off-by: Long Li <lon...@microsoft.com> --- drivers/hv/hv_kvp.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c index de26371..845b70b 100644 --- a/drivers/hv/hv_kvp.c +++ b/d

[PATCH v2] HV: properly delay KVP packets when negotiation is in progress

2017-03-22 Thread Long Li
multiple staged KVP requests as soon as negotiation is done. We need to properly process those packets using one tasklet for exclusive access to ring buffer. This patch is based on the work of Nick Meier The patch v2 has incorporated suggestion from Vitaly Kuznetsov . Signed-off-by: Long Li

RE: [PATCH] HV: properly delay KVP packets when negotiation is in progress

2017-03-20 Thread Long Li
> -Original Message- > From: Long Li > Sent: Sunday, March 19, 2017 7:49 PM > To: 'Vitaly Kuznetsov' <vkuzn...@redhat.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; Stephen Hemminger > <sthem...@microsoft

RE: [PATCH] HV: properly delay KVP packets when negotiation is in progress

2017-03-20 Thread Long Li
> -Original Message- > From: Long Li > Sent: Sunday, March 19, 2017 7:49 PM > To: 'Vitaly Kuznetsov' > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger > ; de...@linuxdriverproject.org; linux- > ker...@vger.kernel.org > Subject: RE: [PATCH] HV: prop

RE: [PATCH] HV: properly delay KVP packets when negotiation is in progress

2017-03-19 Thread Long Li
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Friday, March 17, 2017 9:16 AM > To: Long Li <lon...@microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; Stephen Hemm

RE: [PATCH] HV: properly delay KVP packets when negotiation is in progress

2017-03-19 Thread Long Li
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Friday, March 17, 2017 9:16 AM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger > ; de...@linuxdriverproject.org; linux- > ker...@vger.kernel.org > Subjec

RE: [PATCH 1/2 v4] pci-hyperv: properly handle pci bus remove

2017-03-16 Thread Long Li
> -Original Message- > From: Bjorn Helgaas [mailto:helg...@kernel.org] > Sent: Thursday, March 16, 2017 1:07 PM > To: Long Li <lon...@microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; Bjorn

RE: [PATCH 1/2 v4] pci-hyperv: properly handle pci bus remove

2017-03-16 Thread Long Li
> -Original Message- > From: Bjorn Helgaas [mailto:helg...@kernel.org] > Sent: Thursday, March 16, 2017 1:07 PM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; Bjorn Helgaas ; > de...@linuxdriverproject.org; linux-...@vger.kernel.org; linux- > ker...@vger.

[PATCH] HV: properly delay KVP packets when negotiation is in progress

2017-03-16 Thread Long Li
The host may send multiple KVP packets before the negotiation with daemon is finished. We need to keep those packets in ring buffer until the daemon is negotiated and connected. This patch is based on the work of Nick Meier <nick.me...@microsoft.com> Signed-off-by: Long Li <lon...@micr

[PATCH] HV: properly delay KVP packets when negotiation is in progress

2017-03-16 Thread Long Li
The host may send multiple KVP packets before the negotiation with daemon is finished. We need to keep those packets in ring buffer until the daemon is negotiated and connected. This patch is based on the work of Nick Meier Signed-off-by: Long Li --- drivers/hv/hv_kvp.c | 9 + 1 file

[PATCH 1/2 v4] pci-hyperv: properly handle pci bus remove

2017-02-27 Thread Long Li
status hv_pcibus_removed, we can avoid this situation. Signed-off-by: Long Li <lon...@microsoft.com> Reported-by: Xiaofeng Wang <xiaof...@redhat.com> Acked-by: K. Y. Srinivasan <k...@microsoft.com> --- drivers/pci/host/pci-hyperv.c | 20 +--- 1 file changed, 1

[PATCH 2/2 v4] pci-hyperv: lock pci bus on device eject

2017-02-27 Thread Long Li
<de...@microsoft.com> for pointing out the race condition in create_root_hv_pci_bus(). Signed-off-by: Long Li <lon...@microsoft.com> Reported-by: Xiaofeng Wang <xiaof...@redhat.com> Acked-by: K. Y. Srinivasan <k...@microsoft.com> --- drivers/pci/host/pci-hyperv.c | 4

[PATCH 1/2 v4] pci-hyperv: properly handle pci bus remove

2017-02-27 Thread Long Li
status hv_pcibus_removed, we can avoid this situation. Signed-off-by: Long Li Reported-by: Xiaofeng Wang Acked-by: K. Y. Srinivasan --- drivers/pci/host/pci-hyperv.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pci-hyperv.c b/drivers

[PATCH 2/2 v4] pci-hyperv: lock pci bus on device eject

2017-02-27 Thread Long Li
for pointing out the race condition in create_root_hv_pci_bus(). Signed-off-by: Long Li Reported-by: Xiaofeng Wang Acked-by: K. Y. Srinivasan --- drivers/pci/host/pci-hyperv.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci

RE: [Resend PATCH 2/2 v3] pci-hyperv: lock pci bus on device eject

2017-02-27 Thread Long Li
Ok, I will resend. > -Original Message- > From: Greg KH [mailto:g...@kroah.com] > Sent: Saturday, February 25, 2017 12:02 AM > To: Long Li <lon...@microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; Bjorn

RE: [Resend PATCH 2/2 v3] pci-hyperv: lock pci bus on device eject

2017-02-27 Thread Long Li
Ok, I will resend. > -Original Message- > From: Greg KH [mailto:g...@kroah.com] > Sent: Saturday, February 25, 2017 12:02 AM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; Bjorn Helgaas ; > de...@linuxdriverproject.org; linux-kernel@vger.kernel.org; linux- &

[Resend PATCH 2/2 v3] pci-hyperv: lock pci bus on device eject

2017-02-24 Thread Long Li
<de...@microsoft.com> for pointing out the race condition in create_root_hv_pci_bus(). Signed-off-by: Long Li <lon...@microsoft.com> Reported-by: Xiaofeng Wang <xiaof...@redhat.com> Acked-by: K. Y. Srinivasan <k...@microsoft.com> --- drivers/pci/host/pci-hyperv.c | 4

[Resend PATCH 2/2 v3] pci-hyperv: lock pci bus on device eject

2017-02-24 Thread Long Li
for pointing out the race condition in create_root_hv_pci_bus(). Signed-off-by: Long Li Reported-by: Xiaofeng Wang Acked-by: K. Y. Srinivasan --- drivers/pci/host/pci-hyperv.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c

[Resend PATCH 1/2 v3] pci-hyperv: properly handle pci bus remove

2017-02-24 Thread Long Li
status hv_pcibus_removed, we can avoid this situation. Signed-off-by: Long Li <lon...@microsoft.com> Reported-by: Xiaofeng Wang <xiaof...@redhat.com> Acked-by: K. Y. Srinivasan <k...@microsoft.com> --- drivers/pci/host/pci-hyperv.c | 20 +--- 1 file changed, 1

[Resend PATCH 1/2 v3] pci-hyperv: properly handle pci bus remove

2017-02-24 Thread Long Li
status hv_pcibus_removed, we can avoid this situation. Signed-off-by: Long Li Reported-by: Xiaofeng Wang Acked-by: K. Y. Srinivasan --- drivers/pci/host/pci-hyperv.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pci-hyperv.c b

RE: [Resend PATCH 1/2 v3] pci-hyperv: properly handle pci bus remove

2017-02-13 Thread Long Li
> -Original Message- > From: Bjorn Helgaas [mailto:bhelg...@google.com] > Sent: Saturday, February 11, 2017 9:35 AM > To: Long Li <lon...@microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; de..

RE: [Resend PATCH 1/2 v3] pci-hyperv: properly handle pci bus remove

2017-02-13 Thread Long Li
> -Original Message- > From: Bjorn Helgaas [mailto:bhelg...@google.com] > Sent: Saturday, February 11, 2017 9:35 AM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; de...@linuxdriverproject.org; linux- > p...@vger.kernel.org; linux-kernel@vger.kernel.org > Su

RE: [Resend PATCH 1/2 v3] pci-hyperv: properly handle pci bus remove

2017-02-10 Thread Long Li
> Sent: Friday, January 27, 2017 10:42 AM > To: Long Li <lon...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; Bjorn Helgaas <bhelg...@google.com> > Cc: de...@linuxdriverproject.org; linux-...@vger.kernel.org; linux- > ker...@vger.kernel.org; Long Li <lo

RE: [Resend PATCH 1/2 v3] pci-hyperv: properly handle pci bus remove

2017-02-10 Thread Long Li
> Sent: Friday, January 27, 2017 10:42 AM > To: Long Li ; Haiyang Zhang > ; Bjorn Helgaas > Cc: de...@linuxdriverproject.org; linux-...@vger.kernel.org; linux- > ker...@vger.kernel.org; Long Li > Subject: RE: [Resend PATCH 1/2 v3] pci-hyperv: properly handle pci bus > remove

RE: [PATCH] hv: use substraction to update ring buffer index

2017-01-20 Thread Long Li
> -Original Message- > From: Dexuan Cui > Sent: Sunday, January 15, 2017 7:12 PM > To: Long Li <lon...@microsoft.com>; KY Srinivasan <k...@microsoft.com>; > Haiyang Zhang <haiya...@microsoft.com> > Cc: de...@linuxdriverproject.org; linux-kernel@vger.

RE: [PATCH] hv: use substraction to update ring buffer index

2017-01-20 Thread Long Li
> -Original Message- > From: Dexuan Cui > Sent: Sunday, January 15, 2017 7:12 PM > To: Long Li ; KY Srinivasan ; > Haiyang Zhang > Cc: de...@linuxdriverproject.org; linux-kernel@vger.kernel.org > Subject: RE: [PATCH] hv: use substraction to update ring buffer ind

RE: [PATCH 2/2 v3] pci-hyperv: lock pci bus on device eject

2017-01-09 Thread Long Li
Hi Bjorn, The patch is still pending (along with 1/2 v3). Please let me know if you want me to resend the two patches. Thanks Long > -Original Message- > From: KY Srinivasan > Sent: Tuesday, October 4, 2016 1:49 PM > To: Long Li <lon...@microsoft.com>; Haiy

RE: [PATCH 2/2 v3] pci-hyperv: lock pci bus on device eject

2017-01-09 Thread Long Li
Hi Bjorn, The patch is still pending (along with 1/2 v3). Please let me know if you want me to resend the two patches. Thanks Long > -Original Message- > From: KY Srinivasan > Sent: Tuesday, October 4, 2016 1:49 PM > To: Long Li ; Haiyang Zhang > ; Bjorn He

RE: [PATCH 1/2 v3] pci-hyperv: properly handle pci bus remove

2017-01-09 Thread Long Li
Hi Bjorn This patch is still pending. The patch has been ack'ed. Do you want me to resend this patch? Thanks Long > -Original Message- > From: KY Srinivasan > Sent: Friday, November 11, 2016 2:21 PM > To: Bjorn Helgaas <helg...@kernel.org>; Long Li <lon...@microso

RE: [PATCH 1/2 v3] pci-hyperv: properly handle pci bus remove

2017-01-09 Thread Long Li
Hi Bjorn This patch is still pending. The patch has been ack'ed. Do you want me to resend this patch? Thanks Long > -Original Message- > From: KY Srinivasan > Sent: Friday, November 11, 2016 2:21 PM > To: Bjorn Helgaas ; Long Li > Cc: Haiyang Zhang ; Bjorn

RE: [PATCH v2] hv: retry infinitely on hypercall transient failures

2017-01-07 Thread Long Li
> -Original Message- > From: Greg KH [mailto:g...@kroah.com] > Sent: Friday, January 06, 2017 11:43 PM > To: Long Li <lon...@microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; de...@linuxdriverproject.

RE: [PATCH v2] hv: retry infinitely on hypercall transient failures

2017-01-07 Thread Long Li
> -Original Message- > From: Greg KH [mailto:g...@kroah.com] > Sent: Friday, January 06, 2017 11:43 PM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; de...@linuxdriverproject.org; linux- > ker...@vger.kernel.org > Subject: Re: [PATCH v2] hv: retry

RE: [PATCH v2] hv: retry infinitely on hypercall transient failures

2017-01-06 Thread Long Li
> -Original Message- > From: Greg KH [mailto:g...@kroah.com] > Sent: Wednesday, January 04, 2017 11:48 PM > To: Long Li <lon...@microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; de...@linuxdriverproject.

RE: [PATCH v2] hv: retry infinitely on hypercall transient failures

2017-01-06 Thread Long Li
> -Original Message- > From: Greg KH [mailto:g...@kroah.com] > Sent: Wednesday, January 04, 2017 11:48 PM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; de...@linuxdriverproject.org; linux- > ker...@vger.kernel.org > Subject: Re: [PATCH v2] hv: retry

RE: [PATCH] hv: use substraction to update ring buffer index

2017-01-06 Thread Long Li
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Thursday, January 05, 2017 3:40 AM > To: Long Li <lon...@microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; de...@

RE: [PATCH] hv: use substraction to update ring buffer index

2017-01-06 Thread Long Li
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Thursday, January 05, 2017 3:40 AM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; de...@linuxdriverproject.org; linux- > ker...@vger.kernel.org > Subject: Re: [PAT

[PATCH] hv: use substraction to update ring buffer index

2017-01-04 Thread Long Li
From: Long Li <lon...@microsoft.com> The ring buffer code uses %= to calculate index. For x86/64, %= compiles to div, more than 10 times slower than sub. Replace div with sub for this data heavy code path. Signed-off-by: Long Li <lon...@microsoft.com> --- drivers/hv/ring_

[PATCH] hv: use substraction to update ring buffer index

2017-01-04 Thread Long Li
From: Long Li The ring buffer code uses %= to calculate index. For x86/64, %= compiles to div, more than 10 times slower than sub. Replace div with sub for this data heavy code path. Signed-off-by: Long Li --- drivers/hv/ring_buffer.c | 9 ++--- 1 file changed, 6 insertions(+), 3

[PATCH v2] hv: retry infinitely on hypercall transient failures

2017-01-04 Thread Long Li
From: Long Li <lon...@microsoft.com> Hyper-v host guarantees that a hypercall will finish in reasonable time. Retry infinitely on transient failures to avoid returning error to upper layer. Signed-off-by: Long Li <lon...@microsoft.com> --- drivers/hv/conne

[PATCH v2] hv: retry infinitely on hypercall transient failures

2017-01-04 Thread Long Li
From: Long Li Hyper-v host guarantees that a hypercall will finish in reasonable time. Retry infinitely on transient failures to avoid returning error to upper layer. Signed-off-by: Long Li --- drivers/hv/connection.c | 30 ++ 1 file changed, 14 insertions(+), 16

RE: [PATCH] Retry infinitely for hypercall

2017-01-04 Thread Long Li
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Wednesday, January 4, 2017 1:48 PM > To: Long Li <lon...@microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; de...@

RE: [PATCH] Retry infinitely for hypercall

2017-01-04 Thread Long Li
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Wednesday, January 4, 2017 1:48 PM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; de...@linuxdriverproject.org; linux- > ker...@vger.kernel.org > Subject: Re:

RE: [PATCH] Retry infinitely for hypercall

2017-01-04 Thread Long Li
> -Original Message- > From: Greg KH [mailto:g...@kroah.com] > Sent: Wednesday, January 4, 2017 12:51 PM > To: Long Li <lon...@microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; de...@linuxdriverproject.

RE: [PATCH] Retry infinitely for hypercall

2017-01-04 Thread Long Li
> -Original Message- > From: Greg KH [mailto:g...@kroah.com] > Sent: Wednesday, January 4, 2017 12:51 PM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; de...@linuxdriverproject.org; linux- > ker...@vger.kernel.org > Subject: Re: [PATCH] Retry infinitely f

[PATCH] Retry infinitely for hypercall

2017-01-04 Thread Long Li
From: Long Li <lon...@microsoft.com> Hyper-v host guarantees that a hypercall will succeed. Retry infinitely to avoid returning transient failures to upper layer. Signed-off-by: Long Li <lon...@microsoft.com> --- drivers/hv/connection.c | 17 - 1 file changed,

[PATCH] Retry infinitely for hypercall

2017-01-04 Thread Long Li
From: Long Li Hyper-v host guarantees that a hypercall will succeed. Retry infinitely to avoid returning transient failures to upper layer. Signed-off-by: Long Li --- drivers/hv/connection.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/hv

RE: [PATCH] pci-hyperv: use kmalloc to allocate hypercall params buffer

2016-12-05 Thread Long Li
> -Original Message- > From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Monday, December 5, 2016 8:53 AM > To: Long Li <lon...@microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; Bjorn

RE: [PATCH] pci-hyperv: use kmalloc to allocate hypercall params buffer

2016-12-05 Thread Long Li
> -Original Message- > From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Monday, December 5, 2016 8:53 AM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; Bjorn Helgaas ; > de...@linuxdriverproject.org; linux-kernel@vger.kernel.org; linux- &

RE: [Resend] [PATCH] pci-hyperv: use kmalloc to allocate hypercall params buffer

2016-11-08 Thread Long Li
> -Original Message- > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On > Behalf Of Long Li > Sent: Tuesday, November 8, 2016 8:57 AM > To: Greg KH <gre...@linuxfoundation.org> > Cc: linux-...@vger.kernel.org; Haiyang Zhang <haiya...@mic

RE: [Resend] [PATCH] pci-hyperv: use kmalloc to allocate hypercall params buffer

2016-11-08 Thread Long Li
> -Original Message- > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On > Behalf Of Long Li > Sent: Tuesday, November 8, 2016 8:57 AM > To: Greg KH > Cc: linux-...@vger.kernel.org; Haiyang Zhang ; > linux-kernel@vger.kernel.org;

[PATCH] pci-hyperv: use kmalloc to allocate hypercall params buffer

2016-11-08 Thread Long Li
From: Long Li <lon...@microsoft.com> hv_do_hypercall assumes that we pass a segment from a physically continuous buffer. Buffer allocated on the stack may not work if CONFIG_VMAP_STACK=y is set. Change to use kmalloc to allocate this buffer. The v2 patch adds locking to access the pre-all

[PATCH] pci-hyperv: use kmalloc to allocate hypercall params buffer

2016-11-08 Thread Long Li
From: Long Li hv_do_hypercall assumes that we pass a segment from a physically continuous buffer. Buffer allocated on the stack may not work if CONFIG_VMAP_STACK=y is set. Change to use kmalloc to allocate this buffer. The v2 patch adds locking to access the pre-allocated buffer. Signed-off

RE: [Resend] [PATCH] pci-hyperv: use kmalloc to allocate hypercall params buffer

2016-11-08 Thread Long Li
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Monday, November 7, 2016 11:00 PM > To: Long Li <lon...@microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; Bjorn

RE: [Resend] [PATCH] pci-hyperv: use kmalloc to allocate hypercall params buffer

2016-11-08 Thread Long Li
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Monday, November 7, 2016 11:00 PM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; Bjorn Helgaas ; > de...@linuxdriverproject.org; linux-kernel@vger.kernel.org; linux- > p...@v

[Resend] [PATCH] pci-hyperv: use kmalloc to allocate hypercall params buffer

2016-11-07 Thread Long Li
From: Long Li <lon...@microsoft.com> hv_do_hypercall assumes that we pass a segment from a physically continuous buffer. Buffer allocated on the stack may not work if CONFIG_VMAP_STACK=y is set. Use kmalloc to allocate this buffer. Signed-off-by: Long Li <lon...@microsoft.com&

[Resend] [PATCH] pci-hyperv: use kmalloc to allocate hypercall params buffer

2016-11-07 Thread Long Li
From: Long Li hv_do_hypercall assumes that we pass a segment from a physically continuous buffer. Buffer allocated on the stack may not work if CONFIG_VMAP_STACK=y is set. Use kmalloc to allocate this buffer. Signed-off-by: Long Li Reported-by: Haiyang Zhang --- drivers/pci/host/pci

[PATCH] pci-hyperv: move hypercall buffer from stack to heap

2016-11-01 Thread Long Li
From: Long Li <lon...@microsoft.com> We need to pass a segment from a physically continuous buffer to hv_do_hypercall. Buffer allocated on the stack may not work if CONFIG_VMAP_STACK=y is set. Moving the params buffer from stack to buffer returned by kmalloc. Signed-off-by: Long L

[PATCH] pci-hyperv: move hypercall buffer from stack to heap

2016-11-01 Thread Long Li
From: Long Li We need to pass a segment from a physically continuous buffer to hv_do_hypercall. Buffer allocated on the stack may not work if CONFIG_VMAP_STACK=y is set. Moving the params buffer from stack to buffer returned by kmalloc. Signed-off-by: Long Li Reported-by: Haiyang Zhang

[PATCH 1/2 v3] pci-hyperv: properly handle pci bus remove

2016-10-03 Thread Long Li
From: Long Li <lon...@microsoft.com> hv_pci_devices_present is called in hv_pci_remove when we remove a PCI device from host (e.g. by disabling SRIOV on a device). In hv_pci_remove, the bus is already removed before the call, so we don't need to rescan the bus in the workqueue schedule

[PATCH 1/2 v3] pci-hyperv: properly handle pci bus remove

2016-10-03 Thread Long Li
From: Long Li hv_pci_devices_present is called in hv_pci_remove when we remove a PCI device from host (e.g. by disabling SRIOV on a device). In hv_pci_remove, the bus is already removed before the call, so we don't need to rescan the bus in the workqueue scheduled from hv_pci_devices_present

[PATCH 2/2 v3] pci-hyperv: lock pci bus on device eject

2016-10-03 Thread Long Li
From: Long Li <lon...@microsoft.com> A PCI_EJECT message can arrive at the same time we are calling pci_scan_child_bus in the workqueue for the previous PCI_BUS_RELATIONS message or in create_root_hv_pci_bus(), in this case we could potentailly modify the bus from multiple places. Pr

[PATCH 2/2 v3] pci-hyperv: lock pci bus on device eject

2016-10-03 Thread Long Li
From: Long Li A PCI_EJECT message can arrive at the same time we are calling pci_scan_child_bus in the workqueue for the previous PCI_BUS_RELATIONS message or in create_root_hv_pci_bus(), in this case we could potentailly modify the bus from multiple places. Properly lock the bus access

RE: [PATCH] hv: do not lose pending heartbeat vmbus packets

2016-09-30 Thread Long Li
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, September 29, 2016 2:22 AM > To: KY Srinivasan <k...@microsoft.com>; Long Li <lon...@microsoft.com> > Cc: Haiyang Zhang <haiya...@microsoft.com>; > de...@

RE: [PATCH] hv: do not lose pending heartbeat vmbus packets

2016-09-30 Thread Long Li
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, September 29, 2016 2:22 AM > To: KY Srinivasan ; Long Li > Cc: Haiyang Zhang ; > de...@linuxdriverproject.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH] hv

RE: [PATCH 1/2 v2] pci-hyperv: properly handle pci bus remove

2016-09-27 Thread Long Li
> -Original Message- > From: Bjorn Helgaas [mailto:helg...@kernel.org] > Sent: Tuesday, September 27, 2016 12:30 PM > To: Long Li <lon...@microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsoft.com>; Bjorn

RE: [PATCH 1/2 v2] pci-hyperv: properly handle pci bus remove

2016-09-27 Thread Long Li
> -Original Message- > From: Bjorn Helgaas [mailto:helg...@kernel.org] > Sent: Tuesday, September 27, 2016 12:30 PM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; Bjorn Helgaas ; > de...@linuxdriverproject.org; linux-...@vger.kernel.org; linux- > ker...@

[PATCH 2/2 v2] pci-hyperv: lock pci bus on device eject

2016-09-14 Thread Long Li
From: Long Li <lon...@microsoft.com> A PCI_EJECT message can arrive at the same time we are calling pci_scan_child_bus in the workqueue for the previous PCI_BUS_RELATIONS message or in create_root_hv_pci_bus(), in this case we could potentailly modify the bus from multiple places. Pr

[PATCH 1/2 v2] pci-hyperv: properly handle pci bus remove

2016-09-14 Thread Long Li
From: Long Li <lon...@microsoft.com> hv_pci_devices_present is called in hv_pci_remove when we remove a PCI device from host (e.g. by disabling SRIOV on a device). In hv_pci_remove, the bus is already removed before the call, so we don't need to rescan the bus in the workqueue schedule

[PATCH 2/2 v2] pci-hyperv: lock pci bus on device eject

2016-09-14 Thread Long Li
From: Long Li A PCI_EJECT message can arrive at the same time we are calling pci_scan_child_bus in the workqueue for the previous PCI_BUS_RELATIONS message or in create_root_hv_pci_bus(), in this case we could potentailly modify the bus from multiple places. Properly lock the bus access

[PATCH 1/2 v2] pci-hyperv: properly handle pci bus remove

2016-09-14 Thread Long Li
From: Long Li hv_pci_devices_present is called in hv_pci_remove when we remove a PCI device from host (e.g. by disabling SRIOV on a device). In hv_pci_remove, the bus is already removed before the call, so we don't need to rescan the bus in the workqueue scheduled from hv_pci_devices_present

RE: [PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-14 Thread Long Li
> -Original Message- > From: Dexuan Cui > Sent: Tuesday, September 13, 2016 10:45 PM > To: Long Li <lon...@microsoft.com>; KY Srinivasan <k...@microsoft.com>; > Haiyang Zhang <haiya...@microsoft.com>; Bjorn Helgaas > <bhelg...@google.com> > C

RE: [PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-14 Thread Long Li
> -Original Message- > From: Dexuan Cui > Sent: Tuesday, September 13, 2016 10:45 PM > To: Long Li ; KY Srinivasan ; > Haiyang Zhang ; Bjorn Helgaas > > Cc: de...@linuxdriverproject.org; linux-kernel@vger.kernel.org; linux- > p...@vger.kernel.org > Subject:

RE: [PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-13 Thread Long Li
> -Original Message- > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On > Behalf Of Long Li > Sent: Tuesday, September 13, 2016 10:33 AM > To: Dexuan Cui <de...@microsoft.com>; KY Srinivasan > <k...@microsoft.com>; Haiyang Zhang &

RE: [PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-13 Thread Long Li
> -Original Message- > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On > Behalf Of Long Li > Sent: Tuesday, September 13, 2016 10:33 AM > To: Dexuan Cui ; KY Srinivasan > ; Haiyang Zhang ; Bjorn > Helgaas > Cc: de...@linuxdriverp

RE: [PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-13 Thread Long Li
> -Original Message- > From: Dexuan Cui > Sent: Tuesday, September 13, 2016 2:51 AM > To: Long Li <lon...@microsoft.com>; KY Srinivasan <k...@microsoft.com>; > Haiyang Zhang <haiya...@microsoft.com>; Bjorn Helgaas > <bhelg...@google.com> > C

RE: [PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-13 Thread Long Li
> -Original Message- > From: Dexuan Cui > Sent: Tuesday, September 13, 2016 2:51 AM > To: Long Li ; KY Srinivasan ; > Haiyang Zhang ; Bjorn Helgaas > > Cc: de...@linuxdriverproject.org; linux-kernel@vger.kernel.org; linux- > p...@vger.kernel.org > Subject:

[PATCH] hv: do not lose pending heartbeat vmbus packets

2016-09-12 Thread Long Li
From: Long Li <lon...@microsoft.com> The host keeps sending heartbeat packets independent of guest responding to them. In some situations, there might be multiple heartbeat packets pending in the ring buffer. Don't lose them, read them all. Signed-off-by: Long Li <lon...@micr

[PATCH] hv: do not lose pending heartbeat vmbus packets

2016-09-12 Thread Long Li
From: Long Li The host keeps sending heartbeat packets independent of guest responding to them. In some situations, there might be multiple heartbeat packets pending in the ring buffer. Don't lose them, read them all. Signed-off-by: Long Li --- drivers/hv/hv_util.c | 10 +++--- 1 file

[PATCH 1/2] pci-hyperv: properly handle pci bus remove

2016-09-12 Thread Long Li
From: Long Li <lon...@microsoft.com> hv_pci_devices_present is called in hv_pci_remove when we remove a PCI device from host (e.g. by disabling SRIOV on a device). In hv_pci_remove, the bus is already removed before the call, so we don't need to rescan the bus in the workqueue schedule

[PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-12 Thread Long Li
From: Long Li <lon...@microsoft.com> A PCI_EJECT message can arrive at the same time we are calling pci_scan_child_bus in the workqueue for the previous PCI_BUS_RELATIONS message, in this case we could potentailly modify the bus from two places. Properly lock the bus access. Sign

[PATCH 1/2] pci-hyperv: properly handle pci bus remove

2016-09-12 Thread Long Li
From: Long Li hv_pci_devices_present is called in hv_pci_remove when we remove a PCI device from host (e.g. by disabling SRIOV on a device). In hv_pci_remove, the bus is already removed before the call, so we don't need to rescan the bus in the workqueue scheduled from hv_pci_devices_present

[PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-12 Thread Long Li
From: Long Li A PCI_EJECT message can arrive at the same time we are calling pci_scan_child_bus in the workqueue for the previous PCI_BUS_RELATIONS message, in this case we could potentailly modify the bus from two places. Properly lock the bus access. Signed-off-by: Long Li --- drivers

RE: [PATCH 1/3] storvsc: use tagged SRB requests if supported by the device

2016-09-07 Thread Long Li
> -Original Message- > From: Johannes Thumshirn [mailto:jthumsh...@suse.de] > Sent: Wednesday, September 7, 2016 12:47 AM > To: Long Li <lon...@exchange.microsoft.com> > Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang > <haiya...@microsof

RE: [PATCH 1/3] storvsc: use tagged SRB requests if supported by the device

2016-09-07 Thread Long Li
> -Original Message- > From: Johannes Thumshirn [mailto:jthumsh...@suse.de] > Sent: Wednesday, September 7, 2016 12:47 AM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; James E.J. Bottomley > ; Martin K. Petersen > ; de...@linuxdriverproject.org; linux

[PATCH 2/3] storvsc: properly handle SRB_ERROR when sense message is present

2016-09-06 Thread Long Li
From: Long Li <lon...@microsoft.com> When sense message is present on error, we should pass along to the upper layer to decide how to deal with the error. This patch fixes connectivity issues with Fiber Channel devices. --- drivers/scsi/storvsc_drv.c | 3 +++ 1 file changed, 3 inse

<    5   6   7   8   9   10   11   >