[PATCH] x86/hyperv: suppress "PCI: Fatal: No config space access function found"

2018-09-18 Thread Dexuan Cui
A Generatin-2 Linux VM on Hyper-V doesn't have the legacy PCI bus, and users always see the scary warning, which is actually harmless. The patch is made to suppress the warning. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger --- arch/x86/h

RE: [PATCH 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-10-17 Thread Dexuan Cui
> From: devel On Behalf Of > KY Srinivasan > Sent: Tuesday, October 16, 2018 23:02 > > > --- a/drivers/hv/hv_kvp.c > > > +++ b/drivers/hv/hv_kvp.c > > > @@ -353,6 +353,9 @@ static void process_ib_ipinfo(void *in_msg, void > > *out_msg, int op) > > > > > > out->body.kvp_ip_val.dhcp_enable

RE: [PATCH 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-10-17 Thread Dexuan Cui
> From: devel On Behalf Of > Greg KH > Sent: Tuesday, October 16, 2018 22:07 > > ... > > + case KVP_OP_GET: > > + message->body.kvp_get.data.key_size = > > + utf16s_to_utf8s( > > + (wchar_t *)in_msg->body.kvp_get.data.key, > > + in_

RE: [PATCH 5/5] Tools: hv: kvp: Fix a warning of buffer overflow with gcc 8.0.1

2018-10-17 Thread Dexuan Cui
> From: devel On Behalf Of > Greg KH > Sent: Tuesday, October 16, 2018 22:07 > > On Wed, Oct 17, 2018 at 03:14:06AM +, k...@linuxonhyperv.com wrote: > > From: Dexuan Cui > > > > The patch fixes: > > > > hv_kvp_daemon.c: In function '

RE: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-10-31 Thread Dexuan Cui
> From: Michael Kelley > Sent: Wednesday, October 24, 2018 08:38 > From: k...@linuxonhyperv.com Sent: Wednesday, > October 17, 2018 10:10 PM > > From: Dexuan Cui > > > > In kvp_send_key(), we do need call process_ib_ipinfo() if > > message->kvp_hdr.oper

RE: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-11-01 Thread Dexuan Cui
> From: gre...@linuxfoundation.org > Sent: Thursday, November 1, 2018 11:57 > To: Dexuan Cui > > On Wed, Oct 31, 2018 at 11:23:54PM +0000, Dexuan Cui wrote: > > > From: Michael Kelley > > > Sent: Wednesday, October 24, 2018 08:38 > > > From:

RE: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-11-10 Thread Dexuan Cui
> From: gre...@linuxfoundation.org > Sent: Thursday, November 1, 2018 21:54 > To: Dexuan Cui > Cc: Michael Kelley ; KY Srinivasan > ; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com; > jasow...@redhat.com; Stephen Hemminger

RE: [PATCH 2/2] Drivers: hv: vmbus: offload the handling of channels to two workqueues

2018-11-26 Thread Dexuan Cui
> From: devel On Behalf Of > Greg KH > Sent: Monday, November 26, 2018 11:35 AM > As Sasha pointed out, this patch does not even apply :( Sorry, I'll rebase to char-misc's char-misc-testing branch, which has had one of the patches, i.e. 4d3c5c69191f ("Drivers: hv: vmbus: Remove the useless API

[PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-11-28 Thread Dexuan Cui
tch should be applied to all the existing kernels, not only the kernels that have 8195b1396ec8. Fixes: 8195b1396ec8 ("hv_netvsc: fix deadlock on hotplug") Cc: sta...@vger.kernel.org Cc: Stephen Hemminger Cc: K. Y. Srinivasan Cc: Haiyang Zhang Signed-off-by: Dexuan Cui Signed-off-by:

RE: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-11-29 Thread Dexuan Cui
> From: gre...@linuxfoundation.org > Sent: Wednesday, November 28, 2018 11:45 PM > > > > There is no change in this repost. I just rebased this patch to today's > > char-misc's char-misc-next branch. Previously KY posted the patch with his > > Signed-off-by (which is kept in this repost), but ther

RE: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-11-30 Thread Dexuan Cui
> From: KY Srinivasan > Sent: Friday, November 30, 2018 9:31 AM > > From: Dexuan Cui > > Sent: Thursday, November 29, 2018 12:17 AM > > To: gre...@linuxfoundation.org > > Cc: KY Srinivasan ; Haiyang Zhang > > ; Stephen Hemminger > &

RE: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-12-02 Thread Dexuan Cui
> From: gre...@linuxfoundation.org > Sent: Saturday, December 1, 2018 11:34 PM > To: Dexuan Cui > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger > ; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; a...@canonical.com; vkuznets > ; o...@aepfle

RE: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-12-02 Thread Dexuan Cui
> From: gre...@linuxfoundation.org > Sent: Sunday, December 2, 2018 7:33 AM > To: Dexuan Cui > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger > ; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; a...@canonical.com; vkuznets > ; o...@aepfle.de; jaso

[PATCH] [REPOST for the char-misc-linus branch] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-12-02 Thread Dexuan Cui
tch should be applied to all the existing kernels, not only the kernels that have 8195b1396ec8. Fixes: 8195b1396ec8 ("hv_netvsc: fix deadlock on hotplug") Cc: sta...@vger.kernel.org Cc: Stephen Hemminger Cc: K. Y. Srinivasan Cc: Haiyang Zhang Signed-off-by: Dexuan Cui Signed-off-by: K. Y.

RE: [PATCH] vmbus: fix subchannel removal

2018-12-09 Thread Dexuan Cui
> From: Stephen Hemminger > Sent: Friday, December 7, 2018 10:59 AM > To: KY Srinivasan ; Haiyang Zhang > ; Dexuan Cui ; > mga...@redhat.com > Cc: de...@linuxdriverproject.org; Stephen Hemminger > > Subject: [PATCH] vmbus: fix subchannel removal > > The changes

[PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-13 Thread Dexuan Cui
Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Signed-off-by: Dexuan Cui --- drivers/hv/vmbus_drv.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 283d184..d0ff656 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers

RE: [PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-17 Thread Dexuan Cui
> From: Stephen Hemminger > On Thu, 13 Dec 2018 16:35:43 +0000 > Dexuan Cui wrote: > > > Before 98f4c651762c, we returned zeros for unopened channels. > > With 98f4c651762c, we started to return random on-stack values. > > > > We'd better return -EINVAL

RE: [PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-17 Thread Dexuan Cui
> From: Stephen Hemminger > Sent: Monday, December 17, 2018 10:17 AM > To: Dexuan Cui > > On Mon, 17 Dec 2018 18:00:29 +0000 > Dexuan Cui wrote: > > > > From: Stephen Hemminger > > > On Thu, 13 Dec 2018 16:35:43 + > > > Dexuan Cui wrote

RE: [PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-17 Thread Dexuan Cui
> From: devel On Behalf Of > Dexuan Cui > Sent: Monday, December 17, 2018 10:31 AM > > From: Stephen Hemminger > > > > The old code was risky because it would silently return stack garbage. > > Having an error check in get_debuginfo would eliminate that. >

[PATCH] Drivers: hv: vmbus: Check for ring when getting debug info

2018-12-17 Thread Dexuan Cui
c: Haiyang Zhang Signed-off-by: Stephen Hemminger Signed-off-by: Dexuan Cui --- *NOTE*: the patch is based on char-misc's char-misc-linus branch. drivers/hv/ring_buffer.c | 31 - drivers/hv/vmbus_drv.c | 91 include/linux/hype

[PATCH][re-post] vmbus: fix subchannel removal

2019-01-09 Thread Dexuan Cui
scind is processed. Without the fix, we have a lot of "hang" issues in netvsc when we try to change the NIC's MTU, set the number of channels, etc. Fixes: ae6935ed7d42 ("vmbus: split ring buffer allocation from open") Cc: sta...@vger.kernel.org Signed-off-by: Stephen Hemmin

RE: [PATCH v2] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-09 Thread Dexuan Cui
> From: Kimberly Brown > Sent: Friday, January 4, 2019 8:35 PM ... > +What: > /sys/bus/vmbus/devices//channels//intr_in_full > +Date: January 2019 > +KernelVersion: 4.21 There is no 4.21 version: see https://lkml.org/lkml/2019/1/6/178 :-) Thanks! -- Dexuan __

RE: [PATCH v2] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-09 Thread Dexuan Cui
> From: Michael Kelley > Sent: Saturday, January 5, 2019 1:01 PM > > From: Kimberly Brown Sent: Friday, January 4, > > 2019 8:35 PM > > > > static inline void set_channel_pending_send_size(struct vmbus_channel *c, > > u32 size) > > { > > + if (si

RE: [PATCH v3] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-16 Thread Dexuan Cui
> From: Kimberly Brown > Sent: Wednesday, January 16, 2019 8:38 PM > To: Michael Kelley ; Long Li > ; Sasha Levin ; > Dexuan Cui > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger > ; de...@linuxdriverproject.org; > linux-ker...@vger.kernel.org > Subject:

RE: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-21 Thread Dexuan Cui
> From: Kimberly Brown > Sent: Monday, January 21, 2019 6:08 PM > Subject: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions > > The channel level "_show" functions are vulnerable to race conditions. > Add a mutex lock and unlock around the call to the channel level "_show" > f

RE: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-22 Thread Dexuan Cui
> From: Kimberly Brown > Sent: Monday, January 21, 2019 10:43 PM > > > @@ -1421,7 +1422,10 @@ static ssize_t vmbus_chan_attr_show(struct > > > kobject *kobj, > > > if (chan->state != CHANNEL_OPENED_STATE) > > > return -EINVAL; > > > > > > - return attribute->show(chan, buf); > > > + mu

[PATCH] nfit: add Hyper-V NVDIMM DSM command set to white list

2019-01-23 Thread Dexuan Cui
Add the Hyper-V _DSM command set to the white list of NVDIMM command sets. This command set is documented at http://www.uefi.org/RFIC_LIST (see the link to "Virtual NVDIMM 0x1901" on the page). Signed-off-by: Dexuan Cui --- I'm going to change the user-space utility "ndc

RE: [PATCH] nfit: add Hyper-V NVDIMM DSM command set to white list

2019-01-28 Thread Dexuan Cui
> From: Dan Williams > Sent: Monday, January 28, 2019 1:01 PM > > Hi Dexuan, > Looks good. Just one update request and a note below... > > On Wed, Jan 23, 2019 at 12:51 PM Dexuan Cui wrote: > > ... > > --- a/drivers/acpi/nfit/core.c > > +++ b/drivers/

RE: [PATCH] nfit: add Hyper-V NVDIMM DSM command set to white list

2019-01-28 Thread Dexuan Cui
> From: Dan Williams > Sent: Monday, January 28, 2019 1:55 PM > > On Mon, Jan 28, 2019 at 1:40 PM Dexuan Cui wrote: > > > I made the below simple change. Is this enough? Please suggest the proper > > wording/sentence, as I'm relatively new to NVDIMM, and I do

[PATCH v2] nfit: add Hyper-V NVDIMM DSM command set to white list

2019-01-28 Thread Dexuan Cui
Add the Hyper-V _DSM command set to the white list of NVDIMM command sets. This command set is documented at http://www.uefi.org/RFIC_LIST (see "Virtual NVDIMM 0x1901"). Thanks Dan Williams for writing the comment change. Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley --

RE: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-29 Thread Dexuan Cui
> From: Kimberly Brown > > ... > > But as you pointed, at least for sub-channels, channel->ringbuffer_page > > can indeed disappear in vmbus_close() -> ... -> vmbus_free_ring(), and > > the "attribute->show()" could crash when the race happens. > > Adding channel_mutex here seems to be able to fi

[PATCH] nfit: acpi_nfit_ctl(): check out_obj->type in the right place

2019-01-29 Thread Dexuan Cui
In the case of ND_CMD_CALL, we should also check out_obj->type. The patch uses out_obj->type, which is a short alias to out_obj->package.type. Fixes: 31eca76ba2fc ("nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism") Cc: Signed-off-by: Dexuan Cui ---

[PATCH] nfit: Collect shutdown status for NVDIMM_FAMILY_HYPERV

2019-01-30 Thread Dexuan Cui
See http://www.uefi.org/RFIC_LIST ("Virtual NVDIMM 0x1901"): "Get Unsafe Shutdown Count (Function Index 2)". Let's expose the info to the userspace (e.g. ntctl) via sysfs. Signed-off-by: Dexuan Cui --- drivers/acpi/nfit/core.c | 51

RE: [PATCH] nfit: Collect shutdown status for NVDIMM_FAMILY_HYPERV

2019-01-30 Thread Dexuan Cui
> From: Greg KH > Sent: Wednesday, January 30, 2019 11:38 AM > > On Wed, Jan 30, 2019 at 06:48:40PM +0000, Dexuan Cui wrote: > > > > Let's expose the info to the userspace (e.g. ntctl) via sysfs. > > If you add a new sysfs file, you need to add a new Documenta

RE: [PATCH] nfit: Collect shutdown status for NVDIMM_FAMILY_HYPERV

2019-01-30 Thread Dexuan Cui
> From: Linux-nvdimm On Behalf Of > Dexuan Cui > Sent: Wednesday, January 30, 2019 12:03 PM > To: Greg KH > Cc: Josh Poulson ; linux-nvd...@lists.01.org; > Haiyang Zhang ; > driverdev-devel@linuxdriverproject.org; Rafael J. Wysocki > ; linux-ker...@vger.kernel.org; Michae

[PATCH] nfit: Document sysfs interface dirty_shutdown

2019-01-30 Thread Dexuan Cui
The new sysfs node was added in Sep 2018 in: commit 0ead11181fe0 ("acpi, nfit: Collect shutdown status") Now let's document it. Signed-off-by: Dexuan Cui --- Documentation/ABI/testing/sysfs-bus-nfit | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/AB

RE: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-02-01 Thread Dexuan Cui
> From: Kimberly Brown > Sent: Thursday, January 31, 2019 9:47 AM > ... > 2) Prevent a deadlock that can occur between the proposed mutex_lock() > call in the vmbus_chan_attr_show() function and the sysfs/kernfs functions. Hi Kim, Can you please share more details about the deadlock? It's unclear

RE: [PATCH v2] nfit: add Hyper-V NVDIMM DSM command set to white list

2019-02-01 Thread Dexuan Cui
> From: Dan Williams > Sent: Friday, February 1, 2019 9:29 AM > > Hi Dan, > > Unluckily it looks this commit causes a regression ... > > With the patch, "ndctl list" shows nothing, and /dev/pmem0 can't appear. > > If I revert the patch, it will be back to normal. > > > > I attached the config/logs

RE: [PATCH v2] nfit: add Hyper-V NVDIMM DSM command set to white list

2019-02-01 Thread Dexuan Cui
> From: Dan Williams > Sent: Friday, February 1, 2019 3:47 PM > To: Dexuan Cui > > I believe it's the same reason. Without 11189c1089da the _LSR method > will fail, and otherwise it works and finds the label that it doesn't > like. Exactly. > I'm not se

RE: [PATCH v2] nfit: add Hyper-V NVDIMM DSM command set to white list

2019-02-01 Thread Dexuan Cui
> From: Linux-nvdimm On Behalf Of > Dexuan Cui > Sent: Friday, February 1, 2019 4:34 PM > > > > ... > > > > Those reads find a namespace index block > > > > and a label. Unfortunately the label has the LOCAL flag set and Linux > > > > e

RE: [PATCH v2] nfit: add Hyper-V NVDIMM DSM command set to white list

2019-02-01 Thread Dexuan Cui
> From: Dan Williams > Sent: Friday, February 1, 2019 5:29 PM > > ... > > The "size" and "mode" still don't look right, but the improvement is that > > now I can see a good descriptive "name", which I suppose is retrieved > > from Hyper-V. > > Mode is right, there is no way for Hyper-V to create

RE: [PATCH v2] nfit: add Hyper-V NVDIMM DSM command set to white list

2019-02-01 Thread Dexuan Cui
> From: Dan Williams > Sent: Friday, February 1, 2019 5:29 PM > ... > Honestly, the quickest path to something functional for Linux is to > simply delete the _LSR support and use raw mode defined namespaces. > Why have labels if they are read-only and the region is sufficient for > defining bound

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

2019-02-07 Thread Dexuan Cui
he patch adds the missing code, and in hv_eject_device_work() it also moves pci_destroy_slot() to an earlier place where we hold the pci lock. Fixes: a15f2c08c708 ("PCI: hv: support reporting serial number as slot information") Signed-off-by: Dexuan Cui Cc: sta...@vger.kernel.org

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

2019-02-12 Thread Dexuan Cui
> From: Lorenzo Pieralisi > Sent: Tuesday, February 12, 2019 4:13 AM > ... > This patch fixes three bugs: > > 1) set hpdev->pci_slot to NULL > 2) move code destroying the slot inside a locked region in >hv_eject_device_work() > 3) Add missing slots removal code in hv_pci_remove() > > We nee

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

2019-03-04 Thread Dexuan Cui
usly call hv_pci_eject_device() to poll the channel's ringbuffer to work around the "hangs in hv_compose_msi_msg()" issue: see commit de0aa7b2f97d ("PCI: hv: Fix 2 hang issues in hv_compose_msi_msg()") Fixes: a15f2c08c708 ("PCI: hv: support reporting serial number as slot i

[PATCH 2/3] PCI: hv: Add hv_pci_remove_slots() when we unload the driver

2019-03-04 Thread Dexuan Cui
r-x 2 root root 0 Feb 7 10:49 2-1 drwxr-xr-x 2 root root 0 Feb 7 10:51 2-2 The patch adds the missing code. Fixes: a15f2c08c708 ("PCI: hv: support reporting serial number as slot information") Signed-off-by: Dexuan Cui Acked-by: Stephen Hemminger Cc: sta...@vger.kernel.org ---

[PATCH 0/3] pci-hyperv: fix memory leak and add pci_destroy_slot()

2019-03-04 Thread Dexuan Cui
s more work is required to make this scenaro work correctly, and since removing the driver is not really a "usual" usage, we can address this scenario in the future. Please review the patchset. Dexuan Cui (3): PCI: hv: Fix a memory leak in hv_eject_device_work() PCI: hv: Add hv_pci_

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

2019-03-04 Thread Dexuan Cui
sent_work(). Fixes: 4daace0d8ce8 ("PCI: hv: Add paravirtual PCI front-end for Microsoft Hyper-V VMs") Signed-off-by: Dexuan Cui Cc: --- drivers/pci/controller/pci-hyperv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/

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

2019-03-20 Thread Dexuan Cui
> 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 the get_pcichild()). > > > > When we

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

2019-03-20 Thread Dexuan Cui
> From: Michael Kelley > Sent: Wednesday, March 20, 2019 2:44 PM > To: Dexuan Cui ; lorenzo.pieral...@arm.com; > bhelg...@google.com; linux-...@vger.kernel.org; KY Srinivasan > > ... > > diff --git a/drivers/pci/controller/pci-hyperv.c > > @@ -

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

2019-03-20 Thread Dexuan Cui
> From: linux-hyperv-ow...@vger.kernel.org > On Behalf Of Dexuan Cui > > ... > > Patch 2 in this series does set it to NULL, but this code does not. > In Patch2, i.e. in the code path hv_pci_remove() -> hv_pci_remove_slots(), > we must set hpdev->pci_slot to

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

2019-03-26 Thread Dexuan Cui
> From: Michael Kelley > Sent: Tuesday, March 26, 2019 10:47 AM > To: Lorenzo Pieralisi ; Dexuan Cui > > Cc: bhelg...@google.com; linux-...@vger.kernel.org; KY Srinivasan > ; Stephen Hemminger ; > Sasha Levin ; linux-hyp...@vger.kernel.org; > linux-ker...@vger.ker

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

2019-03-26 Thread Dexuan Cui
> From: Lorenzo Pieralisi > Sent: Tuesday, March 26, 2019 12:55 PM > On Mon, Mar 04, 2019 at 09:34:49PM +0000, 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_co

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

2019-08-01 Thread Dexuan Cui
: 15becc2b56c6 ("PCI: hv: Add hv_pci_remove_slots() when we unload the driver") Signed-off-by: Dexuan Cui Cc: sta...@vger.kernel.org --- When pci-hyperv is unloaded, this panic can happen: general protection fault: CPU: 2 PID: 1091 Comm: rmmod Not tainted 5.2.0+ RIP: 0010:pci_sl

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

2019-08-02 Thread Dexuan Cui
tter changelog in v2. :-) > On Fri, Aug 02, 2019 at 01:32:28AM +, Dexuan Cui wrote: > > > > When a slot is removed, the pci_dev must still exist. > > > > pci_remove_root_bus() removes and free all the pci_devs, so > > hv_pci_remove_slots() must be called

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

2019-08-02 Thread Dexuan Cui
The slot must be removed before the pci_dev is removed, otherwise a panic can happen due to use-after-free. Fixes: 15becc2b56c6 ("PCI: hv: Add hv_pci_remove_slots() when we unload the driver") Signed-off-by: Dexuan Cui Cc: sta...@vger.kernel.org --- Changes in v2: Improved the

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

2019-08-06 Thread Dexuan Cui
> 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 still a little too low-level. Maybe Lorenzo will f

[PATCH] PCI: PM: Also move to D0 before calling pci_legacy_resume_early()

2019-08-08 Thread Dexuan Cui
-by: Dexuan Cui --- drivers/pci/pci-driver.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 36dbe960306b..27dfc68db9e7 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -1074,15 +1074

RE: [PATCH] PCI: PM: Also move to D0 before calling pci_legacy_resume_early()

2019-08-08 Thread Dexuan Cui
> From: Bjorn Helgaas > Sent: Thursday, August 8, 2019 12:19 PM > To: Dexuan Cui > > On Thu, Aug 08, 2019 at 06:46:51PM +0000, Dexuan Cui wrote: > > > > In pci_legacy_suspend_late(), the device state is moved to PCI_UNKNOWN. > > In pci_pm_thaw_noirq(), the stat

[PATCH v2] PCI: PM: Move to D0 before calling pci_legacy_resume_early()

2019-08-13 Thread Dexuan Cui
i_power_up() moves the device states back to PCI_D0. This path is not broken and doesn't need my patch. Signed-off-by: Dexuan Cui --- changes in v2: Updated the changelog with more details. drivers/pci/pci-driver.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

RE: [PATCH v2] PCI: PM: Move to D0 before calling pci_legacy_resume_early()

2019-09-02 Thread Dexuan Cui
> From: Dexuan Cui > Sent: Tuesday, August 13, 2019 6:07 PM > To: lorenzo.pieral...@arm.com; bhelg...@google.com; > linux-...@vger.kernel.org > Cc: Michael Kelley ; linux-hyp...@vger.kernel.org; > linux-ker...@vger.kernel.org; driverdev-devel@linuxdriverproject.org; Sasha >

RE: [PATCH v2] PCI: PM: Move to D0 before calling pci_legacy_resume_early()

2019-09-25 Thread Dexuan Cui
> From: devel On Behalf Of > Dexuan Cui > Sent: Monday, September 2, 2019 5:35 PM > To: lorenzo.pieral...@arm.com; bhelg...@google.com; > linux-...@vger.kernel.org > [..snipped...] > > --- > > > > changes in v2: > > Updated the changelog with more

RE: [PATCH v2] PCI: PM: Move to D0 before calling pci_legacy_resume_early()

2019-10-07 Thread Dexuan Cui
> -Original Message- > From: Bjorn Helgaas > Sent: Monday, October 7, 2019 6:24 AM > To: Dexuan Cui > Cc: lorenzo.pieral...@arm.com; linux-...@vger.kernel.org; Michael Kelley > ; linux-hyp...@vger.kernel.org; > linux-ker...@vger.kernel.org; driverdev-devel@linuxdri

RE: [PATCH v2] PCI: PM: Move to D0 before calling pci_legacy_resume_early()

2019-10-08 Thread Dexuan Cui
> From: Bjorn Helgaas > Sent: Tuesday, October 8, 2019 12:56 PM > ... > Wordsmithing nit: what the patch does is not "fix the error message"; > what it does is fix the *problem*, i.e., the fact that we can't > operate the device because we can't enable MSI-X. The message is only > a symptom. I t

RE: [PATCH v3 0/7] PCI: PM: Move to D0 before calling pci_legacy_resume_early()

2019-10-15 Thread Dexuan Cui
> From: Bjorn Helgaas > Sent: Monday, October 14, 2019 4:00 PM > ... > > Dexuan, the important thing here is the first patch, which is your [1], > which I modified by doing pci_restore_state() as well as setting to D0: > > pci_set_power_state(pci_dev, PCI_D0); > pci_restore_state(pci_dev);

RE: [PATCH 0/3] Tools: hv: vssdaemon: freeze/thaw logic improvement for the failure case

2014-11-07 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Saturday, November 8, 2014 1:09 AM > To: KY Srinivasan; Haiyang Zhang; Greg Kroah-Hartman > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; Dexuan Cui > Subject: [PA

RE: [PATCH v2 1/2] Tools: hv: vssdaemon: report freeze errors

2014-11-10 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov > Sent: Tuesday, November 11, 2014 0:37 AM > To: KY Srinivasan; Haiyang Zhang; Greg Kroah-Hartman > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; Dexuan Cui > Subject: [PATCH v2 1/2] Tools: hv: vssdaemon: re

RE: [PATCH v2 2/2] Tools: hv: vssdaemon: skip all filesystems mounted readonly

2014-11-10 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov > Sent: Tuesday, November 11, 2014 0:37 AM > To: KY Srinivasan; Haiyang Zhang; Greg Kroah-Hartman > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; Dexuan Cui > Subject: [PATCH v2 2/2] Tools: hv: vssdaemon: sk

[PATCH] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-11-11 Thread Dexuan Cui
In the case the user-space daemon crashes, hangs or is killed, we need to down the semaphore, otherwise, after the daemon starts next time, the obsolete data in fcopy_transaction.message or fcopy_transaction.fcopy_msg will be used immediately. Cc: K. Y. Srinivasan Signed-off-by: Dexuan Cui

[PATCH] tools: hv: ignore ENOBUFS in the KVP daemon

2014-11-19 Thread Dexuan Cui
ly it will succeed next time. Cc: K. Y. Srinivasan Signed-off-by: Dexuan Cui --- tools/hv/hv_kvp_daemon.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c index 22b0764..9f4b303 100644 --- a/tools/hv/hv_kvp_daemon.c +++ b/too

RE: [PATCH] tools: hv: ignore ENOBUFS in the KVP daemon

2014-11-19 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov > Sent: Wednesday, November 19, 2014 18:50 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com; > jasow...@redh

RE: [PATCH] tools: hv: ignore ENOBUFS in the KVP daemon

2014-11-19 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Wednesday, November 19, 2014 20:41 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@cano

RE: [PATCH] tools: hv: ignore ENOBUFS in the KVP daemon

2014-11-19 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov > >> -- > >> Vitaly > > > > OK, I can add this new check: > > (I'll send out the v2 tomorrow in case people have new comments) > > > > Thanks! > > > --- a/tools/hv/hv_kvp_daemon.c > > +++ b/tools/hv/hv_kvp_daemon.c > > @@ -1770,8 +1770,15

[PATCH v2] tools: hv: ignore ENOBUFS and ENOMEM in the KVP daemon

2014-11-19 Thread Dexuan Cui
ly it will succeed next time. We can also ignore the errors on sending. Cc: Vitaly Kuznetsov Cc: K. Y. Srinivasan Signed-off-by: Dexuan Cui --- v2: I also ignore the errors on sending, as Vitaly suggested. tools/hv/hv_kvp_daemon.c | 14 ++ 1 file changed, 14 insertions(+) diff --

RE: [PATCH] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-11-19 Thread Dexuan Cui
> -Original Message- > From: KY Srinivasan > Sent: Thursday, November 20, 2014 6:59 AM > > diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c index > > 23b2ce2..177122a 100644 > > --- a/drivers/hv/hv_fcopy.c > > +++ b/drivers/hv/hv_fcopy.c > > @@ -86,6 +86,15 @@ static void fcopy_wo

RE: [PATCH] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-11-20 Thread Dexuan Cui
> -Original Message- > From: KY Srinivasan > Sent: Friday, November 21, 2014 1:58 AM > To: Dexuan Cui; gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; > driverdev-devel@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; jasow...@redhat.com > Cc: Ha

[PATCH] hv: hv_balloon: avoid memory leak on alloc_error of 2MB memory block

2014-11-23 Thread Dexuan Cui
If num_ballooned is not 0, we shouldn't neglect the already-allocated 2MB memory block(s). Cc: K. Y. Srinivasan Cc: Signed-off-by: Dexuan Cui --- drivers/hv/hv_balloon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_ball

RE: [PATCH] hv: hv_balloon: avoid memory leak on alloc_error of 2MB memory block

2014-11-23 Thread Dexuan Cui
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Monday, November 24, 2014 13:18 PM > To: Dexuan Cui; gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; > driverdev-devel@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com;

RE: [PATCH] hv: hv_balloon: avoid memory leak on alloc_error of 2MB memory block

2014-11-23 Thread Dexuan Cui
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Monday, November 24, 2014 15:28 PM > To: Dexuan Cui; gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; > driverdev-devel@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com;

RE: [PATCH] hv: hv_balloon: avoid memory leak on alloc_error of 2MB memory block

2014-11-24 Thread Dexuan Cui
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Monday, November 24, 2014 16:48 PM > To: Dexuan Cui; gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; > driverdev-devel@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com;

[PATCH v2] hv: hv_balloon: avoid memory leak on alloc_error of 2MB memory block

2014-11-24 Thread Dexuan Cui
If num_ballooned is not 0, we shouldn't neglect the already-partially-allocated 2MB memory block(s). Cc: Jason Wang Cc: K. Y. Srinivasan Signed-off-by: Dexuan Cui --- v2: I fixed the logic error in v1, pointed by Jason Wang: In v1: in the case of partially-allocated 2MB, alloc_

RE: [PATCH] Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors

2014-11-26 Thread Dexuan Cui
> -Original Message- > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On > Behalf Of Greg Kroah-Hartman > Sent: Thursday, November 27, 2014 11:03 AM > To: Vitaly Kuznetsov > Cc: de...@linuxdriverproject.org; Haiyang Zhang; linux- > ker...@vger.kernel.org > Subject: Re:

RE: [PATCH] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-11-26 Thread Dexuan Cui
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Thursday, November 27, 2014 7:54 AM > To: Dexuan Cui > Cc: linux-ker...@vger.kernel.org; driverdev-devel@linuxdriverproject.org; > o...@aepfle.de; a...@canonical.com; jasow...@redhat.

[PATCH v2] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-11-26 Thread Dexuan Cui
Signed-off-by: Dexuan Cui --- v2: I removed the "FCP" prefix as Greg asked. I also updated the output message a little: "FCP: failed to acquire the semaphore" --> "can not acquire the semaphore: it is benign" drivers/hv/hv_fcopy.c | 9 ++

RE: [PATCH v2] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-11-27 Thread Dexuan Cui
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Thursday, November 27, 2014 15:15 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.co

RE: [PATCH v2] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-11-27 Thread Dexuan Cui
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Thursday, November 27, 2014 17:01 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.co

[PATCH v3] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-11-27 Thread Dexuan Cui
. Srinivasan Signed-off-by: Dexuan Cui --- v2: I removed the "FCP" prefix as Greg asked. I also updated the output message a little: "FCP: failed to acquire the semaphore" --> "can not acquire the semaphore: it is benign" v3: I added the code in fcopy_

RE: [PATCH v3] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-11-28 Thread Dexuan Cui
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Friday, November 28, 2014 14:47 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.co

RE: [PATCH v3] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-11-28 Thread Dexuan Cui
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Friday, November 28, 2014 18:13 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.co

RE: [PATCH v3] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-12-01 Thread Dexuan Cui
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Monday, December 1, 2014 16:23 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.co

RE: [PATCH v3] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-12-01 Thread Dexuan Cui
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Monday, December 1, 2014 18:18 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.co

RE: [PATCH v2] Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors

2014-12-01 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Monday, December 1, 2014 18:53 PM > To: KY Srinivasan; Haiyang Zhang > Cc: de...@linuxdriverproject.org; Greg Kroah-Hartman; linux- > ker...@vger.kernel.org; Dexuan Cui > Subject: [

RE: [PATCH v3] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-12-01 Thread Dexuan Cui
> -Original Message- > From: KY Srinivasan > Sent: Monday, December 1, 2014 23:55 PM > To: Dexuan Cui; Jason Wang > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com; > vkuzn..

[PATCH] tools: hv: kvp_daemon: make IPv6-only-injection work

2014-12-09 Thread Dexuan Cui
ue, but we shouldn't ignore the IPv6 address and we should pass BOOTPROTO=none to the distro-specific script hv_set_ipconfig. Tested in Ubuntu 14.10 and RHEL7. Cc: K. Y. Srinivasan Signed-off-by: Dexuan Cui --- tools/hv/hv_kvp_daemon.c | 47 +++

RE: [PATCH 0/5] Tools: hv: fix compiler warnings and do minor cleanup

2014-12-09 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Tuesday, December 9, 2014 23:48 PM > To: KY Srinivasan > Cc: Haiyang Zhang; de...@linuxdriverproject.org; linux- > ker...@vger.kernel.org; Dexuan Cui > Subject: [PATCH 0/5] Tools: hv:

RE: [PATCH] tools: hv: kvp_daemon: make IPv6-only-injection work

2014-12-09 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Tuesday, December 9, 2014 21:06 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@cano

RE: [PATCH] tools: hv: kvp_daemon: make IPv6-only-injection work

2014-12-09 Thread Dexuan Cui
Thanks, -- Dexuan > -Original Message- > From: Dexuan Cui > Sent: Wednesday, December 10, 2014 15:34 PM > To: 'Vitaly Kuznetsov' > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de;

RE: [PATCH] tools: hv: kvp_daemon: make IPv6-only-injection work

2014-12-10 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Wednesday, December 10, 2014 17:08 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@cano

[PATCH v2] tools: hv: kvp_daemon: make IPv6-only-injection work

2014-12-10 Thread Dexuan Cui
In the case the host only injects an IPv6 address, the dhcp_enabled flag is true (it's only for IPv4 according to Hyper-V host team), but we still need to proceed to parse the IPv6 information. Cc: Vitaly Kuznetsov Cc: K. Y. Srinivasan Signed-off-by: Dexuan Cui --- v2: removed the d

RE: [PATCH v2] tools: hv: kvp_daemon: make IPv6-only-injection work

2014-12-16 Thread Dexuan Cui
> -Original Message- > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On > Behalf Of Dexuan Cui > Sent: Wednesday, December 10, 2014 19:33 PM > To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; v

  1   2   3   4   5   6   >