[PATCH 3/4] Drivers: hv: vmbus: protect vmbus_get_outgoing_channel() against channel removal

2015-02-03 Thread Vitaly Kuznetsov
vmbus_get_outgoing_channel() search holding primary->lock as child channels are not being freed unless they're removed from parent's list. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/channel_mgmt.c | 10 +++--- drivers/scsi/storvsc_drv.c | 2 ++ 2 files changed, 9 insertions(+)

[PATCH 2/4] Drivers: hv: vmbus: do not lose rescind offer on failure in vmbus_process_offer()

2015-02-03 Thread Vitaly Kuznetsov
list_del in vmbus_process_rescind_offer() hitting an uninitialized list. Reported-by: Dexuan Cui Signed-off-by: Vitaly Kuznetsov --- drivers/hv/channel_mgmt.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv

[PATCH 1/4] Drivers: hv: vmbus: implement get/put usage workflow for vmbus channels

2015-02-03 Thread Vitaly Kuznetsov
instead of free_channel(). Signed-off-by: Vitaly Kuznetsov --- drivers/hv/channel_mgmt.c | 45 ++--- drivers/hv/connection.c | 7 +-- drivers/hv/hyperv_vmbus.h | 4 include/linux/hyperv.h| 13 + 4 files changed, 60 insertions(+), 9

[PATCH 4/4] hyperv: netvsc: improve protection against rescind offer

2015-02-03 Thread Vitaly Kuznetsov
ause a crash. Reported-by: Jason Wang Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/netvsc.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 9f49c01..d9b13a1 100644 --- a/drivers/net/hyperv/

Re: [PATCH 2/3] hv: vmbus_post_msg: retry the hypercall on HV_STATUS_INVALID_CONNECTION_ID

2015-01-30 Thread Vitaly Kuznetsov
Dexuan Cui writes: >> -Original Message- >> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] >> Sent: Thursday, January 29, 2015 21:31 PM >> To: Dexuan Cui >> Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- >> de...@linux

Re: [PATCH 2/3] hv: vmbus_post_msg: retry the hypercall on HV_STATUS_INVALID_CONNECTION_ID

2015-01-29 Thread Vitaly Kuznetsov
Dexuan Cui writes: > I got the hypercall error code on Hyper-V 2008 R2 when keeping running > "rmmod hv_netvsc; modprobe hv_netvsc; rmmod hv_utils; modprobe hv_utils" > in a Linux guest. > > Without the patch, the driver can occasionally fail to load. > > CC: "K. Y. Srinivasan" > Signed-off-by:

Re: [PATCH 3/3] hv: vmbus_open(): reset the channel state on ENOMEM

2015-01-29 Thread Vitaly Kuznetsov
Dexuan Cui writes: > Without this patch, the state is put to CHANNEL_OPENING_STATE, and when > the driver is loaded next time, vmbus_open() will fail immediately due to > newchannel->state != CHANNEL_OPEN_STATE. The patch makes sense, but I have one small doubt. We call vmbus_open from probe fun

Re: [PATCH 1/3] hv: hv_util: move vmbus_open() to a later place

2015-01-29 Thread Vitaly Kuznetsov
Y. Srinivasan" > Signed-off-by: Dexuan Cui It is not said in the description but moving hv_set_drvdata() before vmbus_open() make sense in case probe and remove can collide (can they?). Reviewed-by: Vitaly Kuznetsov > --- > drivers/hv/hv_util.c | 11 ++- > 1 file cha

Re: [PATCH 2/3 v3] hyperv: hyperv_fb.c: match wait_for_completion_timeout return type

2015-01-29 Thread Vitaly Kuznetsov
Nicholas Mc Guire writes: > The return type of wait_for_completion_timeout is unsigned long not > int. This patch fixes up the declarations only. > > Signed-off-by: Nicholas Mc Guire I would be slightly better to remove ".c" from your subject like, anyway: Reviewe

Re: [PATCH v3 3/3] Drivers: hv: vmbus: serialize Offer and Rescind offer

2015-01-28 Thread Vitaly Kuznetsov
Dexuan Cui writes: >> -Original Message- >> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] >> Sent: Wednesday, January 28, 2015 20:09 PM >> To: Dexuan Cui >> Cc: KY Srinivasan; de...@linuxdriverproject.org; Haiyang Zhang; linux- >> ker...@vger.

Re: [PATCH v3 3/3] Drivers: hv: vmbus: serialize Offer and Rescind offer

2015-01-28 Thread Vitaly Kuznetsov
Dexuan Cui writes: >> -Original Message- >> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] >> Sent: Tuesday, January 20, 2015 23:45 PM >> To: KY Srinivasan; de...@linuxdriverproject.org >> Cc: Haiyang Zhang; linux-ker...@vger.kernel.org; Dexuan Cui; Ja

[PATCH v2 3/5] drivers: hv: Teardown synthetic interrupt controllers on module unload

2015-01-27 Thread Vitaly Kuznetsov
Signed-off-by: Vitaly Kuznetsov --- drivers/hv/hv.c| 9 +++-- drivers/hv/vmbus_drv.c | 4 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 50e51a5..39531dc 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -477,6

[PATCH v2 2/5] Drivers: hv: vmbus: teardown hv_vmbus_con workqueue and vmbus_connection pages on shutdown

2015-01-27 Thread Vitaly Kuznetsov
vmbus_onmessage_work(). Signed-off-by: Vitaly Kuznetsov --- drivers/hv/connection.c | 17 - drivers/hv/hyperv_vmbus.h | 1 + drivers/hv/vmbus_drv.c| 6 ++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c

[PATCH v2 4/5] clockevents: export clockevents_unbind_device instead of clockevents_unbind

2015-01-27 Thread Vitaly Kuznetsov
going to be used to teardown Hyper-V clockevent devices on module unload. Signed-off-by: Vitaly Kuznetsov --- kernel/time/clockevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 5544990..888ecc1 100644 --- a

[PATCH v2 5/5] Drivers: hv: vmbus: Teardown clockevent devices on module unload

2015-01-27 Thread Vitaly Kuznetsov
l on its own. I opted for a separate function. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/hv.c | 25 - drivers/hv/hyperv_vmbus.h | 2 ++ drivers/hv/vmbus_drv.c| 1 + 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/drivers/hv/hv.c b/drivers

[PATCH v2 0/5] Drivers: hv: vmbus: fix crashes on hv_vmbus load/unload path

2015-01-27 Thread Vitaly Kuznetsov
rom 0x8100 (relocation range: 0x8000-0x9fff) [ 204.846675] Rebooting in 30 seconds.. [ 204.846675] ACPI MEMORY or I/O RESET_REG. Vitaly Kuznetsov (5): Drivers: hv: vmbus: avoid double kfree for device_obj Drivers: hv: vmbus: teardown hv_vmbus_con workqueue and

[PATCH v2 1/5] Drivers: hv: vmbus: avoid double kfree for device_obj

2015-01-27 Thread Vitaly Kuznetsov
kfree from vmbus_free_channels() as freeing it from vmbus_device_release() seems right. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/channel_mgmt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 1d7df25..ac357b8 100644 --- a

Re: [PATCH 0/3] Drivers: hv: vmbus: fix crashes on hv_vmbus load/unload path

2015-01-26 Thread Vitaly Kuznetsov
Vitaly Kuznetsov writes: > It is possible (since 93e5bd06a953: "Drivers: hv: Make the vmbus driver > unloadable") to unload hv_vmbus driver if no other devices are connected. > 1aec169673d7: "x86: Hyperv: Cleanup the irq mess" fixed doulble interrupt > gate set

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

2015-01-26 Thread Vitaly Kuznetsov
Greg Kroah-Hartman writes: > On Mon, Jan 12, 2015 at 05:50:11PM +0100, Vitaly Kuznetsov wrote: >> When an SMP Hyper-V guest is running on top of 2012R2 Server and secondary >> cpus are sent offline (with echo 0 > /sys/devices/system/cpu/cpu$cpu/online) >> the system

Re: [PATCH RESEND 1/5] Tools: hv: add mising fcopyd to the Makefile

2015-01-26 Thread Vitaly Kuznetsov
Greg KH writes: > On Fri, Jan 09, 2015 at 10:18:51PM -0800, K. Y. Srinivasan wrote: >> From: Vitaly Kuznetsov >> >> fcopyd in missing in the Makefile, add it there. >> >> Signed-off-by: Vitaly Kuznetsov >> Signed-off-by: K. Y. Srinivasan >> ---

Re: [PATCH 2/3] Drivers: hv: vmbus: introduce vmbus_acpi_remove

2015-01-23 Thread Vitaly Kuznetsov
KY Srinivasan writes: >> -Original Message- >> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] >> Sent: Wednesday, January 21, 2015 11:02 AM >> To: KY Srinivasan; de...@linuxdriverproject.org >> Cc: Haiyang Zhang; linux-ker...@vger.kernel.org; Dex

Re: [PATCH 1/1] drivers:hv:vmbus Allow for more than one MMIO range for children.

2015-01-23 Thread Vitaly Kuznetsov
Jake Oshins writes: > Signed-off-by: Jake Oshins > --- > drivers/hv/vmbus_drv.c | 85 > + > drivers/video/fbdev/hyperv_fb.c | 2 +- > include/linux/hyperv.h | 2 +- > 3 files changed, 72 insertions(+), 17 deletions(-) > > diff --git a

[PATCH] Drivers: hv: vmbus: rename channel work queues

2015-01-22 Thread Vitaly Kuznetsov
Signed-off-by: Vitaly Kuznetsov --- drivers/hv/channel_mgmt.c | 5 - drivers/hv/vmbus_drv.c| 6 ++ include/linux/hyperv.h| 3 +++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 0141a3d..b7be96f 100644 ---

[PATCH 3/3] Drivers: hv: vmbus: teardown hv_vmbus_con workqueue and vmbus_connection pages on shutdown

2015-01-21 Thread Vitaly Kuznetsov
vmbus_onmessage_work(). Signed-off-by: Vitaly Kuznetsov --- drivers/hv/connection.c | 17 - drivers/hv/hyperv_vmbus.h | 1 + drivers/hv/vmbus_drv.c| 6 ++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c

[PATCH 0/3] Drivers: hv: vmbus: fix crashes on hv_vmbus load/unload path

2015-01-21 Thread Vitaly Kuznetsov
fff8000-0x9fff) [ 204.846675] Rebooting in 30 seconds.. [ 204.846675] ACPI MEMORY or I/O RESET_REG. Vitaly Kuznetsov (3): Drivers: hv: vmbus: avoid double kfree for device_obj Drivers: hv: vmbus: introduce vmbus_acpi_remove Drivers: hv: vmbus: teardown hv_vmbus_con workqueue and

[PATCH 1/3] Drivers: hv: vmbus: avoid double kfree for device_obj

2015-01-21 Thread Vitaly Kuznetsov
kfree from vmbus_free_channels() as freeing it from vmbus_device_release() seems right. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/channel_mgmt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 877a944..0141a3d 100644 --- a

[PATCH 2/3] Drivers: hv: vmbus: introduce vmbus_acpi_remove

2015-01-21 Thread Vitaly Kuznetsov
[ 38.166315] RSP: 0018:88003f60fb58 EFLAGS: 00010286 ... Signed-off-by: Vitaly Kuznetsov --- drivers/hv/vmbus_drv.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 4d6b269..b06cb87 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers

[PATCH v3 1/3] Drivers: hv: check vmbus_device_create() return value in vmbus_process_offer()

2015-01-20 Thread Vitaly Kuznetsov
vmbus_device_create() result is not being checked in vmbus_process_offer() and it can fail if kzalloc() fails. Add the check and do minor cleanup to avoid additional duplication of "free_channel(); return;" block. Reported-by: Jason Wang Signed-off-by: Vitaly Kuznetsov ---

[PATCH v3 0/3] Drivers: hv: vmbus: protect Offer/Rescind offer processing

2015-01-20 Thread Vitaly Kuznetsov
amed (in [PATCH v2 2/3]) spinlock to protect simulteneous test-and-set workflow for rescind and work fields. [K. Y. Srinivasan] Vitaly Kuznetsov (3): Drivers: hv: check vmbus_device_create() return value in vmbus_process_offer() Drivers: hv: rename sc_lock to the more generic lock

[PATCH v3 2/3] Drivers: hv: rename sc_lock to the more generic lock

2015-01-20 Thread Vitaly Kuznetsov
sc_lock spinlock in struct vmbus_channel is being used to not only protect the sc_list field, e.g. vmbus_open() function uses it to implement test-and-set access to the state field. Rename it to the more generic 'lock' and add the description. Signed-off-by: Vitaly Kuznetsov ---

[PATCH v3 3/3] Drivers: hv: vmbus: serialize Offer and Rescind offer

2015-01-20 Thread Vitaly Kuznetsov
is done we set rescind flag to true and we check it at the end of vmbus_process_offer() so such offer will not get lost. Suggested-by: Radim Krčmář Signed-off-by: Vitaly Kuznetsov --- drivers/hv/channel_mgmt.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-)

Re: [PATCH v2 1/3] Drivers: hv: check vmbus_device_create() return value in vmbus_process_offer()

2015-01-20 Thread Vitaly Kuznetsov
Dan Carpenter writes: > On Mon, Jan 19, 2015 at 05:56:11PM +0100, Vitaly Kuznetsov wrote: >> vmbus_device_create() result is not being checked in vmbus_process_offer() >> and >> it can fail if kzalloc() fails. Add the check and do minor cleanup to avoid >>

[PATCH v2 2/3] Drivers: hv: rename sc_lock to the more generic lock

2015-01-19 Thread Vitaly Kuznetsov
sc_lock spinlock in struct vmbus_channel is being used to not only protect the sc_list field, e.g. vmbus_open() function uses it to implement test-and-set access to the state field. Rename it to the more generic 'lock' and add the description. Signed-off-by: Vitaly Kuznetsov ---

[PATCH v2 3/3] Drivers: hv: vmbus: serialize Offer and Rescind offer

2015-01-19 Thread Vitaly Kuznetsov
is done we set rescind flag to true and we check it at the end of vmbus_process_offer() so such offer will not get lost. Suggested-by: Radim Krčmář Signed-off-by: Vitaly Kuznetsov --- drivers/hv/channel_mgmt.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --gi

[PATCH v2 1/3] Drivers: hv: check vmbus_device_create() return value in vmbus_process_offer()

2015-01-19 Thread Vitaly Kuznetsov
vmbus_device_create() result is not being checked in vmbus_process_offer() and it can fail if kzalloc() fails. Add the check and do minor cleanup to avoid additional duplication of "free_channel(); return;" block. Reported-by: Jason Wang Signed-off-by: Vitaly Kuznetsov ---

[PATCH v2 0/3] Drivers: hv: vmbus: protect Offer/Rescind offer processing

2015-01-19 Thread Vitaly Kuznetsov
ing offer processing. Use renamed (in [PATCH v2 2/3]) spinlock to protect simulteneous test-and-set workflow for rescind and work fields. [K. Y. Srinivasan] Vitaly Kuznetsov (3): Drivers: hv: check vmbus_device_create() return value in vmbus_process_offer() Drivers: hv: rename sc_lock to t

[PATCH] Drivers: hv: vmbus: serialize Offer and Rescind offer processing

2015-01-16 Thread Vitaly Kuznetsov
if kzalloc() fails. Reported-by: Jason Wang Suggested-by: Radim Krčmář Signed-off-by: Vitaly Kuznetsov --- drivers/hv/channel_mgmt.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 2

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

2015-01-13 Thread Vitaly Kuznetsov
is patch got lost and I don't see it in recent 'resend' series. K.Y., Dexuan, can you please take a look? > > Cc: Jason Wang > Cc: Vitaly Kuznetsov > Cc: K. Y. Srinivasan > Signed-off-by: Dexuan Cui > --- > > v2: I removed the "FCP" prefix as G

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

2015-01-12 Thread Vitaly Kuznetsov
on resume). Suspend still works. Tested with WS2008R2 and WS2012R2. Signed-off-by: Vitaly Kuznetsov --- Changes since v2: - repair the build when vmbus is builded as a module [Greg KH] by saving current cpu_disable pointer to previous_cpu_disable and restoring it on unload; - return -ENO

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

2015-01-08 Thread Vitaly Kuznetsov
KY Srinivasan writes: >> -Original Message- >> From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On >> Behalf Of gre...@linuxfoundation.org >> Sent: Wednesday, December 10, 2014 6:48 AM >> To: Vitaly Kuznetsov >> Cc: de...@linuxdri

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

2015-01-02 Thread Vitaly Kuznetsov
jects 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: Dexu

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

2014-12-10 Thread Vitaly Kuznetsov
Dexuan Cui writes: >> -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...@linux

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

2014-12-10 Thread Vitaly Kuznetsov
Dexuan Cui writes: >> -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; Dexu

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

2014-12-10 Thread Vitaly Kuznetsov
Dexuan Cui writes: > 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- &

[PATCH 4/5] Tools: hv: address compiler warnings for hv_fcopy_daemon.c

2014-12-09 Thread Vitaly Kuznetsov
This patch addresses two types of compiler warnings: ... warning: unused variable ‘fd’ [-Wunused-variable] and ... warning: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘__u16 *’ [-Wformat=] Signed-off-by: Vitaly Kuznetsov --- tools/hv/hv_fcopy_daemon.c | 4 ++-- 1

[PATCH 5/5] Tools: hv: do not add redundant '/' in hv_start_fcopy()

2014-12-09 Thread Vitaly Kuznetsov
We don't need to add additional '/' to smsg->path_name as snprintf("%s/%s") does the right thing. Without the patch we get doubled '//' in the log message. Signed-off-by: Vitaly Kuznetsov --- tools/hv/hv_fcopy_daemon.c | 6 -- 1 file changed,

[PATCH 3/5] Tools: hv: address compiler warnings for hv_kvp_daemon.c

2014-12-09 Thread Vitaly Kuznetsov
This patch addresses two types of compiler warnings: ... warning: comparison between signed and unsigned integer expressions [-Wsign-compare] and ... warning: pointer targets in passing argument N of ‘kvp_...’ differ in signedness [-Wpointer-sign] Signed-off-by: Vitaly Kuznetsov --- tools/hv

[PATCH 2/5] Tools: hv: remove unused bytes_written from kvp_update_file()

2014-12-09 Thread Vitaly Kuznetsov
’ set but not used [-Wunused-but-set-variable] Remove bytes_written completely. Signed-off-by: Vitaly Kuznetsov --- tools/hv/hv_kvp_daemon.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c index 6a6432a..5a274ca 100644

[PATCH 1/5] Tools: hv: add mising fcopyd to the Makefile

2014-12-09 Thread Vitaly Kuznetsov
fcopyd in missing in the Makefile, add it there. Signed-off-by: Vitaly Kuznetsov --- tools/hv/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/hv/Makefile b/tools/hv/Makefile index bd22f78..99ffe61 100644 --- a/tools/hv/Makefile +++ b/tools/hv/Makefile

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

2014-12-09 Thread Vitaly Kuznetsov
' in hv_start_fcopy()" Vitaly Kuznetsov (5): Tools: hv: add mising fcopyd to the Makefile Tools: hv: remove unused bytes_written from kvp_update_file() Tools: hv: address compiler warnings for hv_kvp_daemon.c Tools: hv: address compiler warnings for hv_fcopy_daemon.c Tools: h

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

2014-12-09 Thread Vitaly Kuznetsov
Dexuan Cui writes: > Currently IPv6-only-injection doesn't work because the daemon doesn't parse > any IPv6 information at all once it finds the dhcp_enabled flag is true. > > But according to the Hyper-v host team, the flag is only for IPv4. > In the case the host only injects 1 IPv6 address, th

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

2014-12-01 Thread Vitaly Kuznetsov
on resume). Suspend still works. Tested with WS2008R2 and WS2012R2. Signed-off-by: Vitaly Kuznetsov --- Changes since v1: - introduce hv_cpu_hotplug_quirk() function to not spread #ifdefs [Greg KH] - add pr_notice() message "hv_vmbus: CPU offlining is not supported by hypervisor" --

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

2014-12-01 Thread Vitaly Kuznetsov
vkuzn...@redhat.com; Haiyang Zhang >> >> >> Subject: Re: [PATCH v3] hv: hv_fcopy: drop the obsolete message >> >> on >> >> >> transfer >> >> >> failure >> >> >> On Thu, Nov 27, 2014 at 9:09 PM, D

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

2014-11-27 Thread Vitaly Kuznetsov
Dexuan Cui writes: >> -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...@linuxdriverproje

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

2014-11-26 Thread Vitaly Kuznetsov
on resume). Suspend still works. Tested with WS2008R2 and WS2012R2. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/vmbus_drv.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 4d6b269..9a82249 100644 --- a/drivers

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

2014-11-20 Thread Vitaly Kuznetsov
l KVP > user will re-try the R/W and hopefully 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

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

2014-11-19 Thread Vitaly Kuznetsov
Dexuan Cui writes: >> -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) >> &g

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

2014-11-19 Thread Vitaly Kuznetsov
Dexuan Cui writes: >> -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...@linux

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

2014-11-19 Thread Vitaly Kuznetsov
Dexuan Cui writes: >> -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...@aep

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

2014-11-19 Thread Vitaly Kuznetsov
Dexuan Cui writes: > Under high memory pressure and very high KVP R/W test pressure, the netlink > recvfrom() may transiently return ENOBUFS to the daemon -- we found this > during a 2-week stress test. > > We'd better not terminate the daemon on this failure, because a typical KVP > user can re-

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

2014-11-12 Thread Vitaly Kuznetsov
: K. Y. Srinivasan > Signed-off-by: Dexuan Cui Reviewed-by: Vitaly Kuznetsov > --- > drivers/hv/hv_fcopy.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c > index 23b2ce2..177122a 100644 > --- a/drivers/h

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

2014-11-10 Thread Vitaly Kuznetsov
during freezing of '/' as it usually results in SEGSEGV. Signed-off-by: Vitaly Kuznetsov --- tools/hv/hv_vss_daemon.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c index b720d8f..ee44f0d 100644 ---

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

2014-11-10 Thread Vitaly Kuznetsov
Instead of making a list of exceptions for readonly filesystems in addition to iso9660 we already have it is better to skip freeze operation for all readonly-mounted filesystems. Signed-off-by: Vitaly Kuznetsov --- tools/hv/hv_vss_daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

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

2014-11-10 Thread Vitaly Kuznetsov
hing in case of freeze" was thrown away as Dexuan's "Tools: hv: vssdaemon: ignore the EBUSY on multiple freezing the same partition" contains the same change; - "Tools: hv: vssdaemon: consult with errno in case of failure only" was replaced with "To

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

2014-11-10 Thread Vitaly Kuznetsov
Dexuan Cui writes: >> -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.ker

[PATCH 1/3] Tools: hv: vssdaemon: consult with errno in case of failure only

2014-11-07 Thread Vitaly Kuznetsov
Hyper-V VSS: VSS: freeze of /: Operation not supported We should also log errors with LOG_ERR instead of LOG_INFO. Signed-off-by: Vitaly Kuznetsov --- tools/hv/hv_vss_daemon.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv

[PATCH 3/3] Tools: hv: vssdaemon: thaw everything in case of freeze failure

2014-11-07 Thread Vitaly Kuznetsov
doing freeze/thaw requests at the same time they will collide with vss daemon. This issue can be addressed by introducing a freeze/thaw transaction and keeping track of what was actually frozen Signed-off-by: Vitaly Kuznetsov --- tools/hv/hv_vss_daemon.c | 6 ++ 1 file changed, 6 insertions(+)

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

2014-11-07 Thread Vitaly Kuznetsov
This patch series addresses the following issues: - Wrong error reporting for multiple filesystems case. - Skip all readonly-mounted filesystems instead of skipping iso9660. - Thaw all filesystems after an unsuccessful freeze attempt. Vitaly Kuznetsov (3): Tools: hv: vssdaemon: consult with

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

2014-11-07 Thread Vitaly Kuznetsov
Instead of making a list of exceptions for readonly filesystems in addition to iso9660 we already have it is better to skip freeze operation for all readonly-mounted filesystems. Signed-off-by: Vitaly Kuznetsov --- tools/hv/hv_vss_daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 1/2] Drivers: hv: vss: Introduce timeout for communication with userspace

2014-11-06 Thread Vitaly Kuznetsov
schedule_delayed_work(). Signed-off-by: Vitaly Kuznetsov --- drivers/hv/hv_snapshot.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/hv/hv_snapshot.c b/drivers/hv/hv_snapshot.c index 34f14fd..21e51be 100644 --- a/drivers/hv/hv_snapshot.c +++ b/drivers/hv

[PATCH 0/2] Drivers: hv: kvp, vss: improve kernel-userspace communication in failure case

2014-11-06 Thread Vitaly Kuznetsov
discussing. In theory freeze/thaw ioctls should be fast. In case someone thinks 10 seconds is not enough we can easily increase it as we cover the most common failure scenario (when the daemon was stopped) with the second patch of this series. Vitaly Kuznetsov (2): Drivers: hv: vss: Introduce

[PATCH 2/2] Drivers: hv: kvp, vss: Fast propagation of userspace communication failure

2014-11-06 Thread Vitaly Kuznetsov
case userspace daemon gets disconnected so we won't receive new requests. But I'm not sure it is possible. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/hv_kvp.c | 9 - drivers/hv/hv_snapshot.c | 8 +++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/driv

Re: [PATCH] tools: hv: introduce -n/--no-daemon option

2014-11-04 Thread Vitaly Kuznetsov
KY Srinivasan writes: >> -Original Message- >> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] >> Sent: Wednesday, October 22, 2014 9:07 AM >> To: KY Srinivasan; Haiyang Zhang; de...@linuxdriverproject.org >> Cc: linux-ker...@vger.kernel.org >> S

[PATCH] Drivers: hv: vmbus: Fix a race condition when unregistering a device

2014-11-04 Thread Vitaly Kuznetsov
sue by taking an additional reference to the device before proceeding to vmbus_device_unregister(). Signed-off-by: Vitaly Kuznetsov --- drivers/hv/channel_mgmt.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c

[PATCH] tools: hv: introduce -n/--no-daemon option

2014-10-22 Thread Vitaly Kuznetsov
foreground for that. Some distros already carry distro-specific patch for hv tools which switches off daemon(). Introduce -n/--no-daemon option for all 3 daemons in hv/tools. Parse options with getopt() to make this part easily expandable. Signed-off-by: Vitaly Kuznetsov --- tools/hv/hv_fcopy_daemon.c

<    5   6   7   8   9   10