[PATCH 1/3] Drivers: hv: vmbus: do cleanup on all vmbus_open() failure paths

2015-04-21 Thread Vitaly Kuznetsov
In case there was an error reported in the response to the CHANNELMSG_OPENCHANNEL call we need to do the cleanup as a vmbus_open() user won't be doing it after receiving an error. The cleanup should be done on all failure paths. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv

[PATCH 5/6] Drivers: hv: vmbus: distribute subchannels among all vcpus

2015-04-21 Thread Vitaly Kuznetsov
. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/channel_mgmt.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 8f2761f..daa6417 100644 --- a/drivers/hv/channel_mgmt.c

[PATCH 4/6] Drivers: hv: vmbus: move init_vp_index() call to vmbus_process_offer()

2015-04-21 Thread Vitaly Kuznetsov
. This is a small refactoring without a functional change. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/channel_mgmt.c | 142 +++--- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv

[PATCH 6/6] Drivers: hv: vmbus: do a fair round robin when selecting an outgoing channel

2015-04-21 Thread Vitaly Kuznetsov
creates additional complexity. Simplify the vmbus_get_outgoing_channel() function, make it do what the comment before it says. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/channel_mgmt.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff

[PATCH 0/6] Drivers: hv: vmbus: fair round robin algorithm for vmbus_get_outgoing_channel()

2015-04-21 Thread Vitaly Kuznetsov
for the current vcpu). Please let me know if you think it is preferable. Vitaly Kuznetsov (6): Drivers: hv: vmbus: unify calls to percpu_channel_enq() Drivers: hv: vmbus: briefly comment num_sc and next_oc Drivers: hv: vmbus: decrease num_sc on subchannel removal Drivers: hv: vmbus: move init_vp_index

[PATCH 3/6] Drivers: hv: vmbus: decrease num_sc on subchannel removal

2015-04-21 Thread Vitaly Kuznetsov
It is unlikely that that host will ask us to close only one subchannel for a device but let's be consistent. Do both num_sc++ and num_sc-- with channel-lock to be on the safe side. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/channel_mgmt.c | 3 ++- 1 file changed, 2

[PATCH 1/6] Drivers: hv: vmbus: unify calls to percpu_channel_enq()

2015-04-21 Thread Vitaly Kuznetsov
Remove some code duplication, no functional change intended. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/channel_mgmt.c | 51 +-- 1 file changed, 18 insertions(+), 33 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers

[PATCH 2/6] Drivers: hv: vmbus: briefly comment num_sc and next_oc

2015-04-21 Thread Vitaly Kuznetsov
next_oc and num_sc fields of struct vmbus_channel deserve a description. Move them closer to sc_list as these fields are related to it. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- include/linux/hyperv.h | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git

Re: [PATCH 1/3] Drivers: hv: vmbus: do cleanup on all vmbus_open() failure paths

2015-04-21 Thread Vitaly Kuznetsov
Dan Carpenter dan.carpen...@oracle.com writes: On Tue, Apr 21, 2015 at 10:17:52AM +0200, Vitaly Kuznetsov wrote: diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 54da66d..836386f 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -186,11 +186,12 @@ int vmbus_open

Re: [PATCH 5/6] Drivers: hv: vmbus: distribute subchannels among all vcpus

2015-04-24 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Tuesday, April 21, 2015 22:28 To: KY Srinivasan Cc: Haiyang Zhang; de...@linuxdriverproject.org; linux- ker...@vger.kernel.org; Dexuan Cui Subject: [PATCH 5/6

Re: [PATCH 3/6] Drivers: hv: vmbus: decrease num_sc on subchannel removal

2015-04-24 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Tuesday, April 21, 2015 22:28 To: KY Srinivasan Cc: Haiyang Zhang; de...@linuxdriverproject.org; linux- ker...@vger.kernel.org; Dexuan Cui Subject: [PATCH 3/6

Re: [PATCH 4/6] Drivers: hv: vmbus: move init_vp_index() call to vmbus_process_offer()

2015-04-24 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Tuesday, April 21, 2015 22:28 To: KY Srinivasan Cc: Haiyang Zhang; de...@linuxdriverproject.org; linux- ker...@vger.kernel.org; Dexuan Cui Subject: [PATCH 4/6

Re: [PATCH 6/6] Drivers: hv: vmbus: do a fair round robin when selecting an outgoing channel

2015-04-24 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Tuesday, April 21, 2015 22:28 To: KY Srinivasan Cc: Haiyang Zhang; de...@linuxdriverproject.org; linux- ker...@vger.kernel.org; Dexuan Cui Subject: [PATCH 6/6

Re: [PATCH v2 0/3] Drivers: hv: vmbus: additional fixes for the setup/teardown path

2015-04-24 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Wednesday, April 22, 2015 0:22 To: KY Srinivasan Cc: Haiyang Zhang; de...@linuxdriverproject.org; linux- ker...@vger.kernel.org; Dexuan Cui; Dan Carpenter Subject

Re: [PATCH net-next, 1/1] hv_netvsc: call dump_rndis_message() only in netvsc debug mode

2015-04-22 Thread Vitaly Kuznetsov
six...@microsoft.com writes: From: Simon Xiao six...@microsoft.com Signed-off-by: Simon Xiao six...@microsoft.com Reviewed-by: K. Y. Srinivasan k...@microsoft.com Reviewed-by: Haiyang Zhang haiya...@microsoft.com I don't quite understand what problem is being solved here (and empty commit

[PATCH v2 1/3] Drivers: hv: vmbus: do cleanup on all vmbus_open() failure paths

2015-04-21 Thread Vitaly Kuznetsov
-response.open_result.status as the return value as all other errors we return from vmbus_open() are -EXXX and vmbus_open() callers are not supposed to analyze host error codes. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/channel.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions

[PATCH v2 3/3] Drivers: hv: vmbus: setup irq after synic is initialized

2015-04-21 Thread Vitaly Kuznetsov
vmbus_isr() uses synic pages which are being setup in hv_synic_alloc(), we need to register this irq handler only after we allocate all the required pages. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/vmbus_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions

[PATCH v2 0/3] Drivers: hv: vmbus: additional fixes for the setup/teardown path

2015-04-21 Thread Vitaly Kuznetsov
(with the fix I suggested). I tested the whole set on Gen2 Win2012R2 guest, load/unload path seems being stable. Can you please take a look? Thanks, Vitaly Kuznetsov (3): Drivers: hv: vmbus: do cleanup on all vmbus_open() failure paths Drivers: hv: vmbus: kill tasklets on module unload

[PATCH v2 2/3] Drivers: hv: vmbus: kill tasklets on module unload

2015-04-21 Thread Vitaly Kuznetsov
Explicitly kill tasklets we create on module unload. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/vmbus_drv.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 2b56260..cf20400 100644 --- a/drivers

Re: [PATCH 5/6] Drivers: hv: vmbus: distribute subchannels among all vcpus

2015-04-27 Thread Vitaly Kuznetsov
KY Srinivasan k...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Friday, April 24, 2015 2:05 AM To: Dexuan Cui Cc: KY Srinivasan; Haiyang Zhang; de...@linuxdriverproject.org; linux- ker...@vger.kernel.org Subject: Re: [PATCH 5/6

[PATCH v2 2/6] Drivers: hv: vmbus: briefly comment num_sc and next_oc

2015-04-27 Thread Vitaly Kuznetsov
next_oc and num_sc fields of struct vmbus_channel deserve a description. Move them closer to sc_list as these fields are related to it. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- include/linux/hyperv.h | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git

[PATCH v2 0/6] Drivers: hv: vmbus: fair round robin algorithm for vmbus_get_outgoing_channel()

2015-04-27 Thread Vitaly Kuznetsov
anymore, see 'Changes'). Patches 01 - 04 are cleanup/refactoring. Vitaly Kuznetsov (6): Drivers: hv: vmbus: unify calls to percpu_channel_enq() Drivers: hv: vmbus: briefly comment num_sc and next_oc Drivers: hv: vmbus: decrease num_sc on subchannel removal Drivers: hv: vmbus: move

[PATCH v2 6/6] Drivers: hv: vmbus: improve selection of an outgoing channel

2015-04-27 Thread Vitaly Kuznetsov
. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/channel_mgmt.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 1f1417d..cdc3914 100644 --- a/drivers/hv

[PATCH v2 5/6] Drivers: hv: vmbus: distribute subchannels among all vcpus

2015-04-27 Thread Vitaly Kuznetsov
. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/channel_mgmt.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 655c0a0..1f1417d 100644 --- a/drivers/hv/channel_mgmt.c

[PATCH v2 1/6] Drivers: hv: vmbus: unify calls to percpu_channel_enq()

2015-04-27 Thread Vitaly Kuznetsov
Remove some code duplication, no functional change intended. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/channel_mgmt.c | 51 +-- 1 file changed, 18 insertions(+), 33 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers

[PATCH v2 3/6] Drivers: hv: vmbus: decrease num_sc on subchannel removal

2015-04-27 Thread Vitaly Kuznetsov
It is unlikely that that host will ask us to close only one subchannel for a device but let's be consistent. Do both num_sc++ and num_sc-- with channel-lock to be on the safe side. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/channel_mgmt.c | 3 ++- 1 file changed, 2

[PATCH v2 4/6] Drivers: hv: vmbus: move init_vp_index() call to vmbus_process_offer()

2015-04-27 Thread Vitaly Kuznetsov
. This is a small refactoring without a functional change. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/channel_mgmt.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index c53a171..655c0a0 100644

Re: [PATCH v2 3/3] Drivers: hv: vmbus: setup irq after synic is initialized

2015-05-12 Thread Vitaly Kuznetsov
KY Srinivasan k...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Tuesday, April 21, 2015 9:22 AM To: KY Srinivasan Cc: Haiyang Zhang; de...@linuxdriverproject.org; linux- ker...@vger.kernel.org; Dexuan Cui; Dan Carpenter Subject

[PATCH] Drivers: hv: balloon: check if ha_region_mutex was acquired in MEM_CANCEL_ONLINE case

2015-05-19 Thread Vitaly Kuznetsov
after the hv_memory_notifier() in the notification chain failed so we need to add the mutex_is_locked() check. In case of MEM_ONLINE we are always supposed to have the mutex locked. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_balloon.c | 4 +++- 1 file changed, 3

Re: [PATCH v3 03/21] Drivers: hv: kvp: move poll_channel() to hyperv_vmbus.h

2015-04-13 Thread Vitaly Kuznetsov
Dan Carpenter dan.carpen...@oracle.com writes: On Thu, Apr 09, 2015 at 10:38:32AM +0200, Vitaly Kuznetsov wrote: ..., make it inline and rename it to hv_poll_channel() so it can be reused in other hv_util modules. The ..., is fine in the git log but I noticed recently that if you're

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

2015-04-13 Thread Vitaly Kuznetsov
] [8107dc5f] __request_resource+0x2f/0x50 [ 38.166315] RSP: 0018:88003f60fb58 EFLAGS: 00010286 ... Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- 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

[PATCH 0/2] Drivers: hv: vmbus: fix hv_vmbus load/unload path (again)

2015-04-13 Thread Vitaly Kuznetsov
patch prevents a crash on module unload/load back path brought by recently introduced VMbus crash notifier. With these two patches I was able to successfuly load/unload/load back hv_vmbus module under Win2012R2. Vitaly Kuznetsov (2): Drivers: hv: vmbus: introduce vmbus_acpi_remove Drivers: hv

[PATCH 2/2] Drivers: hv: vmbus: unregister panic notifier on module unload

2015-04-13 Thread Vitaly Kuznetsov
[8109d63f] notifier_call_chain+0x3f/0x80 Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/vmbus_drv.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 0d8d1d7..7870a90 100644 --- a/drivers/hv/vmbus_drv.c +++ b

Re: [PATCH RFCv2 00/21] Drivers: hv: utils: re-implement the kernel/userspace communication layer

2015-04-08 Thread Vitaly Kuznetsov
KY Srinivasan k...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Wednesday, March 11, 2015 6:29 AM To: KY Srinivasan; de...@linuxdriverproject.org Cc: Haiyang Zhang; linux-kernel@vger.kernel.org; Dexuan Cui; Radim Krcmar; Greg

[PATCH 0/2] hv_netvsc: linearize SKBs bigger than MAX_PAGE_BUFFER_COUNT-2 pages

2015-04-08 Thread Vitaly Kuznetsov
as all retries fail as well. It should also be possible to trigger the issue from userspace, I expect e.g. NFS under heavy load to get stuck sometimes. Vitaly Kuznetsov (2): hv_netvsc: use single existing drop path in netvsc_start_xmit hv_netvsc: try linearizing big SKBs before dropping them

[PATCH 2/2] hv_netvsc: try linearizing big SKBs before dropping them

2015-04-08 Thread Vitaly Kuznetsov
sender to try resending it but in most cases it will try resending the same packet which will also get dropped, this will cause the particular connection to stick. To solve the issue we can try linearizing skb. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/net/hyperv/netvsc_drv.c

[PATCH 1/2] hv_netvsc: use single existing drop path in netvsc_start_xmit

2015-04-08 Thread Vitaly Kuznetsov
... which validly uses dev_kfree_skb_any() instead of dev_kfree_skb(). Setting ret to -EFAULT and -ENOMEM have no real meaning here (we need to set it to anything but -EAGAIN) as we drop the packet and return NETDEV_TX_OK anyway. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers

Re: [PATCH 0/2] hv_netvsc: linearize SKBs bigger than MAX_PAGE_BUFFER_COUNT-2 pages

2015-04-08 Thread Vitaly Kuznetsov
David Miller da...@davemloft.net writes: From: Vitaly Kuznetsov vkuzn...@redhat.com Date: Wed, 8 Apr 2015 17:54:04 +0200 This patch series fixes the same issue which was fixed in Xen with commit 97a6d1bb2b658ac85ed88205ccd1ab809899884d (xen-netfront: Fix handling packets on compound

[PATCH v3 19/21] Drivers: hv: vss: full handshake support

2015-04-09 Thread Vitaly Kuznetsov
Introduce VSS_OP_REGISTER1 to support kernel replying to the negotiation message with its own version. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_snapshot.c| 49 ++--- include/uapi/linux/hyperv.h | 5 + tools/hv

[PATCH v3 00/21] Drivers: hv: utils: re-implement the kernel/userspace communication layer

2015-04-09 Thread Vitaly Kuznetsov
host side. Racy daemon startup is also a problem. - When the userspace daemon restarts/dies kernel part doesn't receive a notification. - Netlink communication is not stable under heavy load. - ... Vitaly Kuznetsov (21): Drivers: hv: util: move kvp/vss function declarations to hyperv_vmbus.h

[PATCH v3 21/21] Drivers: hv: utils: unify driver registration reporting

2015-04-09 Thread Vitaly Kuznetsov
... and move it to debug level as normally daemons write to syslog themselves and these kernel messages are useless. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_fcopy.c| 3 +-- drivers/hv/hv_kvp.c | 3 ++- drivers/hv/hv_snapshot.c | 2 +- 3 files changed, 4

[PATCH v3 07/21] Drivers: hv: fcopy: rename fcopy_work - fcopy_timeout_work

2015-04-09 Thread Vitaly Kuznetsov
'fcopy_work' (and fcopy_work_func) is a misnomer as it sounds like we expect this useful work to happen and in reality it is just an emergency escape when timeout happens. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_fcopy.c | 14 +++--- 1 file changed, 7

[PATCH v3 06/21] Drivers: hv: kvp: rename kvp_work - kvp_timeout_work

2015-04-09 Thread Vitaly Kuznetsov
'kvp_work' (and kvp_work_func) is a misnomer as it sounds like we expect this useful work to happen and in reality it is just an emergency escape when timeout happens. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_kvp.c | 16 1 file changed, 8 insertions

[PATCH v3 08/21] Drivers: hv: util: introduce state machine for util drivers

2015-04-09 Thread Vitaly Kuznetsov
drivers. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hyperv_vmbus.h | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 2f30456..138d663 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h

[PATCH v3 05/21] Drivers: hv: vss: process deferred messages when we complete the transaction

2015-04-09 Thread Vitaly Kuznetsov
support only the former. Add support for the later, use hv_poll_channel() to do the job. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_snapshot.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/hv/hv_snapshot.c b/drivers/hv

[PATCH v3 10/21] Drivers: hv: vss: switch to using the hvutil_device_state state machine

2015-04-09 Thread Vitaly Kuznetsov
being in the middle of a transaction (HVUTIL_USERSPACE_REQ or HVUTIL_USERSPACE_RECV state). Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_snapshot.c | 87 1 file changed, 58 insertions(+), 29 deletions(-) diff --git a/drivers/hv

[PATCH v3 03/21] Drivers: hv: kvp: move poll_channel() to hyperv_vmbus.h

2015-04-09 Thread Vitaly Kuznetsov
..., make it inline and rename it to hv_poll_channel() so it can be reused in other hv_util modules. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_kvp.c | 17 +++-- drivers/hv/hyperv_vmbus.h | 12 2 files changed, 15 insertions(+), 14

[PATCH v3 12/21] Drivers: hv: fcopy: set .owner reference for file operations

2015-04-09 Thread Vitaly Kuznetsov
... otherwise a crash is observed when hv_utils module is being unloaded while fcopy daemon is still running. .owner gives us an additional reference when someone holds a descriptor for the device. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_fcopy.c | 6 ++ 1 file

[PATCH v3 11/21] Drivers: hv: fcopy: switch to using the hvutil_device_state state machine

2015-04-09 Thread Vitaly Kuznetsov
the userspace daemon is disconnected, otherwise we can make the host think we don't support FCOPY and disable the service completely. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_fcopy.c | 70 ++- 1 file changed, 30 insertions

[PATCH v3 13/21] Drivers: hv: util: introduce hv_utils_transport abstraction

2015-04-09 Thread Vitaly Kuznetsov
the switch from netlink to chardev operational mode is supported. Every hv_util daemon is supposed to register 2 callbacks: 1) on_msg() to get notified when the userspace daemon sent a message; 2) on_reset() to get notified when the userspace daemon drops the connection. Signed-off-by: Vitaly Kuznetsov

[PATCH v3 01/21] Drivers: hv: util: move kvp/vss function declarations to hyperv_vmbus.h

2015-04-09 Thread Vitaly Kuznetsov
These declarations are internal to hv_util module and hv_fcopy_* declarations already reside there. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_kvp.c | 1 + drivers/hv/hv_snapshot.c | 2 ++ drivers/hv/hyperv_vmbus.h | 8 include/linux/hyperv.h| 7

[PATCH v3 20/21] Drivers: hv: fcopy: full handshake support

2015-04-09 Thread Vitaly Kuznetsov
Introduce FCOPY_VERSION_1 to support kernel replying to the negotiation message with its own version. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_fcopy.c | 16 +++- include/uapi/linux/hyperv.h | 3 ++- tools/hv/hv_fcopy_daemon.c | 15

[PATCH v3 17/21] Tools: hv: kvp: use misc char device to communicate with kernel

2015-04-09 Thread Vitaly Kuznetsov
Use /dev/vmbus/hv_kvp instead of netlink. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- tools/hv/hv_kvp_daemon.c | 166 +-- 1 file changed, 31 insertions(+), 135 deletions(-) diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c

[PATCH v3 15/21] Drivers: hv: fcopy: convert to hv_utils_transport

2015-04-09 Thread Vitaly Kuznetsov
Unify the code with the recently introduced hv_utils_transport. Netlink communication is disabled for fcopy. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_fcopy.c | 194 -- 1 file changed, 46 insertions(+), 148 deletions

[PATCH v3 18/21] Tools: hv: vss: use misc char device to communicate with kernel

2015-04-09 Thread Vitaly Kuznetsov
Use /dev/vmbus/hv_vss instead of netlink. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- tools/hv/hv_vss_daemon.c | 139 +-- 1 file changed, 25 insertions(+), 114 deletions(-) diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c

[PATCH v3 09/21] Drivers: hv: kvp: switch to using the hvutil_device_state state machine

2015-04-09 Thread Vitaly Kuznetsov
we skip the negotiation procedure (so the daemon is supposed to has the same version). This behavior is unchanged from in_handshake approach. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_kvp.c | 87 ++--- 1 file changed, 49

[PATCH v3 02/21] Drivers: hv: kvp: reset kvp_context

2015-04-09 Thread Vitaly Kuznetsov
issues as: 1) Host is supposed to serialize transactions as well 2) If no message is pending vmbus_recvpacket() will return 0 recvlen. This is just a cleanup. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_kvp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hv

[PATCH v3 16/21] Drivers: hv: kvp: convert to hv_utils_transport

2015-04-09 Thread Vitaly Kuznetsov
... to support both netlink and /dev/vmbus/hv_kvp communication methods. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_kvp.c | 91 + 1 file changed, 42 insertions(+), 49 deletions(-) diff --git a/drivers/hv/hv_kvp.c b

[PATCH v3 14/21] Drivers: hv: vss: convert to hv_utils_transport

2015-04-09 Thread Vitaly Kuznetsov
... to support both netlink and /dev/vmbus/hv_vss communication methods. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_snapshot.c | 52 +--- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/drivers/hv

[PATCH v3 04/21] Drivers: hv: fcopy: process deferred messages when we complete the transaction

2015-04-09 Thread Vitaly Kuznetsov
support only the former. Add support for the later, use hv_poll_channel() to do the job. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_fcopy.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c index

[PATCH 1/2] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-05-19 Thread Vitaly Kuznetsov
Loaded Hyper-V module will use these functions to disable CPU hotplug under certain circumstances. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- kernel/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index 94bbe46..dc005e7 100644

Re: [PATCH 1/2] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-05-19 Thread Vitaly Kuznetsov
Peter Zijlstra pet...@infradead.org writes: On Tue, May 19, 2015 at 02:15:41PM +0200, Vitaly Kuznetsov wrote: Loaded Hyper-V module will use these functions to disable CPU hotplug under certain circumstances. What's wrong with get_online_cpus() ? We need to disable cpu offlining permanently

[PATCH 0/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable for CPU offlining prevention

2015-05-19 Thread Vitaly Kuznetsov
Export cpu_hotplug_enable/cpu_hotplug_disable functions from cpu.c and use them instead of altering the smp_ops.cpu_disable in Hyper-V vmbus module. Vitaly Kuznetsov (2): cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable Drivers: hv: vmbus: use cpu_hotplug_enable/disable drivers/hv

[PATCH 2/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable

2015-05-19 Thread Vitaly Kuznetsov
-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/vmbus_drv.c | 38 -- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index c85235e..e916ba2 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv

[PATCH 0/3] Drivers: hv: add kexec support

2015-05-20 Thread Vitaly Kuznetsov
: Cleanup the vmbus unload path Vitaly Kuznetsov (3): Drivers: hv: vmbus: remove hv_synic_free_cpu() call from hv_synic_cleanup() Drivers: hv: vmbus: add special kexec handler Drivers: hv: don't do hypercalls when hypercall_page is NULL arch/x86/include/asm/mshyperv.h | 2 ++ arch/x86

[PATCH 3/3] Drivers: hv: don't do hypercalls when hypercall_page is NULL

2015-05-20 Thread Vitaly Kuznetsov
of the do_hypercall() function. Unfortunately we have to write the !hypercall_page check twice to not mix declarations and code. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/hv/hv.c b/drivers/hv

[PATCH 2/3] Drivers: hv: vmbus: add special kexec handler

2015-05-20 Thread Vitaly Kuznetsov
consists of cleaning up clockevents, synic MSRs, guest os id MSR, and hypercall MSR. Kdump doesn't require all this stuff as it lives in a separate memory space. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- arch/x86/include/asm/mshyperv.h | 2 ++ arch/x86/kernel/cpu/mshyperv.c | 30

[PATCH 1/3] Drivers: hv: vmbus: remove hv_synic_free_cpu() call from hv_synic_cleanup()

2015-05-20 Thread Vitaly Kuznetsov
We already have hv_synic_free() which frees all per-cpu pages for all CPUs, let's remove the hv_synic_free_cpu() call from hv_synic_cleanup() so it will be possible to do separate cleanup (writing to MSRs) and final freeing. This is going to be used to assist kexec. Signed-off-by: Vitaly

[PATCH v2 1/3] Drivers: hv: vmbus: remove hv_synic_free_cpu() call from hv_synic_cleanup()

2015-06-03 Thread Vitaly Kuznetsov
We already have hv_synic_free() which frees all per-cpu pages for all CPUs, let's remove the hv_synic_free_cpu() call from hv_synic_cleanup() so it will be possible to do separate cleanup (writing to MSRs) and final freeing. This is going to be used to assist kexec. Signed-off-by: Vitaly

[PATCH v2 3/3] Drivers: hv: don't do hypercalls when hypercall_page is NULL

2015-06-03 Thread Vitaly Kuznetsov
of the do_hypercall() function. Unfortunately we have to write the !hypercall_page check twice to not mix declarations and code. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/hv/hv.c b/drivers/hv

[PATCH v2 0/3] Drivers: hv: add kexec support

2015-06-03 Thread Vitaly Kuznetsov
with balloned out memory is not possible as the newly loaded kernel doesn't know about this memory and there is no way to ask the host to bring all the memory back on cleanup (or at least I'm not aware of such a way). Kexec with hotplugged memory leads to reboot (not exactly sure why). Vitaly Kuznetsov

[PATCH v2 2/3] Drivers: hv: vmbus: add special kexec handler

2015-06-03 Thread Vitaly Kuznetsov
consists of cleaning up clockevents, synic MSRs, guest os id MSR, and hypercall MSR. Kdump doesn't require all this stuff as it lives in a separate memory space. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- arch/x86/include/asm/mshyperv.h | 2 ++ arch/x86/kernel/cpu/mshyperv.c | 30

Re: [PATCH V2 04/10] Drivers: hv: vmbus: add special kexec handler

2015-06-23 Thread Vitaly Kuznetsov
Olaf Hering o...@aepfle.de writes: On Thu, Jun 04, K. Y. Srinivasan wrote: +++ b/arch/x86/kernel/cpu/mshyperv.c @@ -18,6 +18,9 @@ #include linux/efi.h #include linux/interrupt.h #include linux/irq.h +#ifdef CONFIG_KEXEC +#include linux/kexec.h +#endif Is this #ifdef required? No,

Re: [PATCH V2 06/10] Drivers: hv: vmbus: use 'die' notification chain instead of 'panic'

2015-06-25 Thread Vitaly Kuznetsov
K. Y. Srinivasan k...@microsoft.com writes: From: Vitaly Kuznetsov vkuzn...@redhat.com current_pt_regs() returns regs of the userspace process and in case of kernel crash this is not what we need to report. E.g. when we trigger crash with sysrq we see the following: ... RIP: 0010

[PATCH v5 1/2] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-25 Thread Vitaly Kuznetsov
Loaded Hyper-V module will use these functions to disable CPU hotplug under certain circumstances. Convert cpu_hotplug_disabled to a counter (protected by cpu_add_remove_lock) to support e.g. disable - disable - enable call sequences. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com

[PATCH v5 2/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable

2015-06-25 Thread Vitaly Kuznetsov
-by: Vitaly Kuznetsov vkuzn...@redhat.com Signed-off-by: K. Y. Srinivasan k...@microsoft.com --- drivers/hv/vmbus_drv.c | 38 -- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index cf20400..6de65fb 100644

[PATCH v2] Drivers: hv: vmbus: prefer 'die' notification chain to 'panic'

2015-06-25 Thread Vitaly Kuznetsov
get 'die' notification so keep the 'panic' notification reporter as well but guard against double reporting. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- The patch was previously named Drivers: hv: vmbus: use 'die' notification chain instead of 'panic'. In v2 I keep 'panic' notifier

[PATCH v5 0/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable for CPU offlining prevention

2015-06-25 Thread Vitaly Kuznetsov
char-misc-next tree [K. Y. Srinivasan] Changes since v1: - Make cpu_hotplug_disabled a counter [Radim Krčmář] Export cpu_hotplug_enable/cpu_hotplug_disable functions from cpu.c and use them instead of altering smp_ops.cpu_disable in Hyper-V vmbus module. Vitaly Kuznetsov (2): cpu-hotplug

[PATCH v3 1/5] Drivers: hv: vmbus: remove hv_synic_free_cpu() call from hv_synic_cleanup()

2015-06-25 Thread Vitaly Kuznetsov
We already have hv_synic_free() which frees all per-cpu pages for all CPUs, let's remove the hv_synic_free_cpu() call from hv_synic_cleanup() so it will be possible to do separate cleanup (writing to MSRs) and final freeing. This is going to be used to assist kexec. Signed-off-by: Vitaly

[PATCH v3 4/5] Drivers: hv: don't do hypercalls when hypercall_page is NULL

2015-06-25 Thread Vitaly Kuznetsov
of the do_hypercall() function. Unfortunately we have to write the !hypercall_page check twice to not mix declarations and code. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/hv/hv.c b/drivers/hv

[PATCH v3 5/5] Drivers: hv: vmbus: add special crash handler

2015-06-25 Thread Vitaly Kuznetsov
to perform some mandatory minimalistic cleanup before we start new kernel. Reported-by: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- arch/x86/include/asm/mshyperv.h | 2 ++ arch/x86/kernel/cpu/mshyperv.c | 22 ++ drivers/hv

[PATCH v3 0/5] Drivers: hv: add kexec support (and fix kdump)

2015-06-25 Thread Vitaly Kuznetsov
kernel doesn't know about this memory and there is no way to ask the host to bring all the memory back on cleanup (or at least I'm not aware of such a way). Kexec with hotplugged memory leads to reboot (not exactly sure why). Vitaly Kuznetsov (5): Drivers: hv: vmbus: remove hv_synic_free_cpu() call

[PATCH v3 3/5] Drivers: hv: vmbus: add special kexec handler

2015-06-25 Thread Vitaly Kuznetsov
consists of cleaning up clockevents, synic MSRs, guest os id MSR, and hypercall MSR. Kdump doesn't require all this stuff as it lives in a separate memory space. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- arch/x86/include/asm/mshyperv.h | 2 ++ arch/x86/kernel/cpu/mshyperv.c | 24

[PATCH v3 2/5] kexec: define kexec_in_progress in !CONFIG_KEXEC case

2015-06-25 Thread Vitaly Kuznetsov
If some piece of code wants to check kexec_in_progress it has to be put in #ifdef CONFIG_KEXEC block to not break the build in !CONFIG_KEXEC case. Overcome this limitation by defining kexec_in_progress to false. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- include/linux/kexec.h | 1

Re: [PATCH v4 1/2] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-25 Thread Vitaly Kuznetsov
Vitaly Kuznetsov vkuzn...@redhat.com writes: Loaded Hyper-V module will use these functions to disable CPU hotplug under certain circumstances. Convert cpu_hotplug_disabled to a counter (protected by cpu_add_remove_lock) to support e.g. disable - disable - enable call sequences. Signed-off

[PATCH] Drivers: hv: balloon: fix hv_hotadd_state description

2015-06-25 Thread Vitaly Kuznetsov
Commit 5a75d733 (Drivers: hv: hv_balloon: don't lose memory when onlining order is not natural) made hv_hotadd_state description a bit ambiguous. Fix this and a typo. Reported-by: Jason Wang jasow...@redhat.com Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_balloon.c

[PATCH] scsi: storvsc: be more picky about scmnd-sc_data_direction

2015-06-25 Thread Vitaly Kuznetsov
an overkill. Reported-by: Radim Krčmář rkrc...@redhat.com Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/scsi/storvsc_drv.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 3c6584f..61f4855

Re: [PATCH 1/1] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-24 Thread Vitaly Kuznetsov
Peter Zijlstra pet...@infradead.org writes: On Wed, Jun 24, 2015 at 11:43:33AM +0200, Vitaly Kuznetsov wrote: Peter Zijlstra pet...@infradead.org writes: On Tue, Jun 23, 2015 at 04:57:05PM +, KY Srinivasan wrote: diff --git a/kernel/cpu.c b/kernel/cpu.c index 94bbe46..8f35ee6

Re: [PATCH 1/1] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-24 Thread Vitaly Kuznetsov
Thomas Gleixner t...@linutronix.de writes: On Wed, 24 Jun 2015, Vitaly Kuznetsov wrote: Peter Zijlstra pet...@infradead.org writes: On Tue, Jun 23, 2015 at 04:57:05PM +, KY Srinivasan wrote: diff --git a/kernel/cpu.c b/kernel/cpu.c index 94bbe46..8f35ee6 100644 --- a/kernel

Re: [PATCH 1/1] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-24 Thread Vitaly Kuznetsov
Peter Zijlstra pet...@infradead.org writes: On Tue, Jun 23, 2015 at 04:57:05PM +, KY Srinivasan wrote: diff --git a/kernel/cpu.c b/kernel/cpu.c index 94bbe46..8f35ee6 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -190,17 +190,19 @@ void cpu_hotplug_done(void) void

[PATCH v4 2/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable

2015-06-24 Thread Vitaly Kuznetsov
-by: Vitaly Kuznetsov vkuzn...@redhat.com Signed-off-by: K. Y. Srinivasan k...@microsoft.com --- drivers/hv/vmbus_drv.c | 38 -- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index cf20400..6de65fb 100644

[PATCH v4 0/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable for CPU offlining prevention

2015-06-24 Thread Vitaly Kuznetsov
functions from cpu.c and use them instead of altering smp_ops.cpu_disable in Hyper-V vmbus module. Vitaly Kuznetsov (2): cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable Drivers: hv: vmbus: use cpu_hotplug_enable/disable Documentation/power/suspend-and-cpuhotplug.txt | 6

[PATCH v4 1/2] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-24 Thread Vitaly Kuznetsov
Loaded Hyper-V module will use these functions to disable CPU hotplug under certain circumstances. Convert cpu_hotplug_disabled to a counter (protected by cpu_add_remove_lock) to support e.g. disable - disable - enable call sequences. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com

[PATCH] PM / hibernate: re-enable nonboot cpus on disable_nonboot_cpus() failure

2015-06-24 Thread Vitaly Kuznetsov
() functions handle disable_nonboot_cpus() faults correctly, hibernation_platform_enter() is the only one which is doing it wrong. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- kernel/power/hibernate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/power

Re: [PATCH v3 1/6] hv: Modify vmbus to search for all MMIO ranges available

2015-06-17 Thread Vitaly Kuznetsov
ja...@microsoft.com writes: From: Jake Oshins ja...@microsoft.com Before this patch, hv_vmbus would search the ACPI namespace above its device looking for a _CRS (current resources) object, and hunt through the list of resources in there looking for one that described memory- mapped I/O

Re: [PATCH v2 0/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable for CPU offlining prevention

2015-05-27 Thread Vitaly Kuznetsov
KY Srinivasan k...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Thursday, May 21, 2015 9:22 AM To: de...@linuxdriverproject.org Cc: KY Srinivasan; Haiyang Zhang; linux-kernel@vger.kernel.org; Dexuan Cui; Ingo Molnar; Paul E

[PATCH] Drivers: hv: vmbus: use 'die' notification chain instead of 'panic'

2015-05-28 Thread Vitaly Kuznetsov
implication: when panic() is called manually from some other part of kernel we won't be reporting crash to the hypervisor (but we have no valuable information to report anyway). Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/vmbus_drv.c | 23 ++- 1 file changed, 10

[PATCH v3 2/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable

2015-06-02 Thread Vitaly Kuznetsov
-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/vmbus_drv.c | 38 -- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index cf20400..6de65fb 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv

[PATCH v3 1/2] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-02 Thread Vitaly Kuznetsov
Loaded Hyper-V module will use these functions to disable CPU hotplug under certain circumstances. Convert cpu_hotplug_disabled to a counter (protected by cpu_add_remove_lock) to support e.g. disable - disable - enable call sequences. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com

[PATCH v3 0/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable for CPU offlining prevention

2015-06-02 Thread Vitaly Kuznetsov
vmbus module. Vitaly Kuznetsov (2): cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable Drivers: hv: vmbus: use cpu_hotplug_enable/disable Documentation/power/suspend-and-cpuhotplug.txt | 6 ++-- drivers/hv/vmbus_drv.c | 38 +++--- kernel/cpu.c

<    1   2   3   4   5   6   7   8   9   10   >