[PATCH V2 12/14] Drivers: hv: vmbus: Base host signaling strictly on the ring state

2016-11-01 Thread kys
the performance otherwise. +* +* KYS: Oct. 30, 2016: +* It looks like Windows hosts have logic to deal with DOS attacks that +* can be triggered if it receives interrupts when it is not expecting +* the interrupt. The host expects interrupts only when the ring +

[PATCH V2 11/14] tools: hv: remove unnecessary header files and netlink related code

2016-11-01 Thread kys
From: Weibing Zhang Remove unnecessary header files and netlink related code as the daemons do not use netlink to communicate with the kernel now. Signed-off-by: Weibing Zhang Signed-off-by: K. Y. Srinivasan --- tools/hv/hv_fcopy_daemon.c |7 --- tools/hv/hv_kvp_daemon.c |7

[PATCH V2 13/14] Drivers: hv: vmbus: On write cleanup the logic to interrupt the host

2016-11-01 Thread kys
his is a rare -* enough condition that it should not matter. -* NOTE: in this case, the hvsock channel is an exception, because -* it looks the host side's hvsock implementation has a throttling -* mechanism which can hurt the performance otherwise. -

[PATCH V2 10/14] tools: hv: fix a compile warning in snprintf

2016-11-01 Thread kys
From: Weibing Zhang hv_kvp_daemon.c: In function .kvp_mac_to_if_name.: hv_kvp_daemon.c:705:2: warning: format not a string literal and no format arguments [-Wformat-security] snprintf(dev_id, sizeof(dev_id), kvp_net_dir); ^ hv_kvp_daemon.c:705:2: warning: format not a string literal and no f

[PATCH V2 01/14] Drivers: hv: ring_buffer: count on wrap around mappings in get_next_pkt_raw() (v2)

2016-11-01 Thread kys
From: Vitaly Kuznetsov With wrap around mappings in place we can always provide drivers with direct links to packets on the ring buffer, even when they wrap around. Do the required updates to get_next_pkt_raw()/put_pkt_raw() The first version of this commit was reverted (65a532f3d50a) to deal wi

[PATCH V2 14/14] Drivers: hv: vmbus: On the read path cleanup the logic to interrupt the host

2016-11-01 Thread kys
From: K. Y. Srinivasan Signal the host when we determine the host is to be signaled - on th read path. The currrent code determines the need to signal in the ringbuffer code and actually issues the signal elsewhere. This can result in the host viewing this interrupt as spurious since the host may

[PATCH V2 02/14] Drivers: hv: utils: reduce HV_UTIL_NEGO_TIMEOUT timeout

2016-11-01 Thread kys
From: Vitaly Kuznetsov I discovered that at least WS2016TP5 host has 60 seconds timeout for the ICMSGTYPE_NEGOTIATE message so we need to lower guest's timeout a little bit to make sure we always respond in time. Let's make it 55 seconds. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Sri

[PATCH V2 03/14] Drivers: hv: utils: Fix the mapping between host version and protocol to use

2016-11-01 Thread kys
From: Alex Ng We should intentionally declare the protocols to use for every known host and default to using the latest protocol if the host is unknown or new. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_util.c |9 ++--- 1 files changed, 6 insertions(+), 3

[PATCH V2 09/14] tools: hv: remove unnecessary link flag

2016-11-01 Thread kys
From: Weibing Zhang The link flag pthread is not needed. Signed-off-by: Weibing Zhang Signed-off-by: K. Y. Srinivasan --- tools/hv/Makefile |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/tools/hv/Makefile b/tools/hv/Makefile index a8c4644..0d1e61b 100644 --- a/tool

[PATCH V2 05/14] Drivers: hv: balloon: Add logging for dynamic memory operations

2016-11-01 Thread kys
From: Alex Ng Added logging to help troubleshoot common ballooning, hot add, and versioning issues. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_balloon.c | 31 --- 1 files changed, 28 insertions(+), 3 deletions(-) diff --git a/driver

[PATCH 0/4] Drivers: hv: Fix some rescind handling issues

2016-12-22 Thread kys
From: K. Y. Srinivasan Fix some rescind handling issues. K. Y. Srinivasan (4): Drivers: hv: vmbus: Fix a rescind handling bug Drivers: hv: util: kvp: Fix a rescind processing issue Drivers: hv: util: Fcopy: Fix a rescind processing issue Drivers: hv: util: Backup: Fix a rescind processin

[PATCH 3/4] Drivers: hv: util: Fcopy: Fix a rescind processing issue

2016-12-22 Thread kys
From: K. Y. Srinivasan Fcopy may use a char device to support the communication between the user level daemon and the driver. When the Fcopy channel is rescinded we need to make sure that the char device is fully cleaned up before we can process a new Fcopy offer from the host. Implement this log

[PATCH 2/4] Drivers: hv: util: kvp: Fix a rescind processing issue

2016-12-22 Thread kys
From: K. Y. Srinivasan KVP may use a char device to support the communication between the user level daemon and the driver. When the KVP channel is rescinded we need to make sure that the char device is fully cleaned up before we can process a new KVP offer from the host. Implement this logic. S

[PATCH 1/4] Drivers: hv: vmbus: Fix a rescind handling bug

2016-12-22 Thread kys
From: K. Y. Srinivasan The host can rescind a channel that has been offered to the guest and once the channel is rescinded, the host does not respond to any requests on that channel. Deal with the case where the guest may be blocked waiting for a response from the host. Signed-off-by: K. Y. Srin

[PATCH 4/4] Drivers: hv: util: Backup: Fix a rescind processing issue

2016-12-22 Thread kys
From: K. Y. Srinivasan VSS may use a char device to support the communication between the user level daemon and the driver. When the VSS channel is rescinded we need to make sure that the char device is fully cleaned up before we can process a new VSS offer from the host. Implement this logic. S

[PATCH 0/6] storvsc: Miscellaneous fixes and enhancements

2016-12-14 Thread kys
From: K. Y. Srinivasan Miscellaneous fixes and enhancements. K. Y. Srinivasan (3): storvsc: Enable tracking of queue depth storvsc: Remove the restriction on max segment size storvsc: Enable multi-queue support Long Li (3): storvsc: use tagged SRB requests if supported by the device s

[PATCH 3/6] storvsc: Enable multi-queue support

2016-12-14 Thread kys
From: K. Y. Srinivasan Enable multi-q support. We will allocate the outgoing channel using the following policy: 1. We will make every effort to pick a channel that is in the same NUMA node that is initiating the I/O 2. The mapping between the guest CPU and the outgoin

[PATCH 1/6] storvsc: Enable tracking of queue depth

2016-12-14 Thread kys
From: K. Y. Srinivasan Enable tracking of queue depth. Signed-off-by: K. Y. Srinivasan Reviewed-by: Long Li --- drivers/scsi/storvsc_drv.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 05526b7..ccb2101 10

[PATCH 2/6] storvsc: Remove the restriction on max segment size

2016-12-14 Thread kys
From: K. Y. Srinivasan Remove the artificially imposed restriction on max segment size. Signed-off-by: K. Y. Srinivasan Reviewed-by: Long Li --- drivers/scsi/storvsc_drv.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storv

[PATCH 5/6] storvsc: properly handle SRB_ERROR when sense message is present

2016-12-14 Thread kys
From: Long Li When sense message is present on error, we should pass along to the upper layer to decide how to deal with the error. This patch fixes connectivity issues with Fiber Channel devices. Signed-off-by: Long Li Reviewed-by: K. Y. Srinivasan Signed-off-by: K. Y. Srinivasan Cc: --- d

[PATCH 6/6] storvsc: properly set residual data length on errors

2016-12-14 Thread kys
From: Long Li On I/O errors, the Windows driver doesn't set data_transfer_length on error conditions other than SRB_STATUS_DATA_OVERRUN. In these cases we need to set data_transfer_length to 0, indicating there is no data transferred. On SRB_STATUS_DATA_OVERRUN, data_transfer_length is set by the

[PATCH 4/6] storvsc: use tagged SRB requests if supported by the device

2016-12-14 Thread kys
From: Long Li Properly set SRB flags when hosting device supports tagged queuing. This patch improves the performance on Fiber Channel disks. Signed-off-by: Long Li Reviewed-by: K. Y. Srinivasan Signed-off-by: K. Y. Srinivasan Cc: --- drivers/scsi/storvsc_drv.c |9 + 1 files cha

[PATCH 00/18] Drivers: hv: vmbus: Restructure architecture specific code

2016-12-30 Thread kys
From: K. Y. Srinivasan The current Hyper-V code under drivers/hv has bunch of X86 specific code. Restructure the code and move al architecture specific code to the appropriate files. As I was working on this restructuring, Roman Kagan has submitted patches to restructure the Hyper-V header file

[PATCH 03/18] Drivers: hv vmbus: Move Hypercall page setup out of common code

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of the effort to separate out architecture specific code, move the hypercall page setup to an architecture specific file. Signed-off-by: K. Y. Srinivasan --- arch/x86/Kbuild |3 ++ arch/x86/hyperv/Makefile|1 + arch/x86/hyperv/hv_i

[PATCH 15/18] Drivers: hv: vmbus: Define APIs to manipulate the synthetic interrupt controller

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of cleaning up architecture specific code, define APIs to manipulate the interrupt controller state. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h |3 +++ drivers/hv/hv.c |8 2 files changed, 7 insertions(+),

[PATCH 02/18] Drivers: hv: vmbus: Move the definition of generate_guest_id()

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of the effort to separate out architecture specific code, move the definition of generate_guest_id() to x86 specific header file. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h | 43 +++ drivers/hv/hyperv

[PATCH 16/18] Drivers: hv: vmbus: Define an API to retrieve virtual processor index

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of cleaning up architecture specific code, define an API to retrieve the virtual procesor index. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h |2 ++ drivers/hv/hv.c |2 +- 2 files changed, 3 insertions(+), 1 deletion

[PATCH 06/18] Drivers: hv: vmbus: Move the extracting of Hypervisor version information

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of the effort to separate out architecture specific code, extract hypervisor version information in an architecture specific file. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h | 19 +++ arch/x86/kernel/cpu/mshyperv.c | 20 +

[PATCH 11/18] Drivers: hv: util: Use hv_get_current_tick() to get current tick

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of the effort to interact with Hyper-V in an instruction set architecture independent way, use the new API to get the current tick. Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_util.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a

[PATCH 17/18] Drivers: hv: vmbus: Define an APIs to manage interrupt state

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of cleaning up architecture specific code, define APIs to manage interrupt state. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h |3 +++ drivers/hv/hv.c | 12 2 files changed, 11 insertions(+), 4 deletions(-

[PATCH 18/18] Drivers: hv: vmbus: Cleanup hyperv_vmbus.h

2016-12-30 Thread kys
From: K. Y. Srinivasan Get rid of all unused definitions. Signed-off-by: K. Y. Srinivasan --- drivers/hv/hyperv_vmbus.h | 152 + 1 files changed, 2 insertions(+), 150 deletions(-) diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h i

[PATCH 10/18] Drivers: hv: vmbus: Restructure the clockevents code

2016-12-30 Thread kys
From: K. Y. Srinivasan Move the relevant code that programs the hypervisor to an architecture specific file. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h |4 drivers/hv/hv.c | 10 +- 2 files changed, 9 insertions(+), 5 deletions(-) dif

[PATCH 01/18] Drivers: hv: vmbus: Move the definition of hv_x64_msr_hypercall_contents

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of the effort to separate out architecture specific code, move the definition of hv_x64_msr_hypercall_contents to x86 specific header file. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h | 12 drivers/hv/hyperv_vmbus.h |

[PATCH 05/18] Drivers: hv: vmbus: Consolidate all Hyper-V specific clocksource code

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of the effort to separate out architecture specific code, consolidate all Hyper-V specific clocksource code to an architecture specific code. Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/hv_init.c | 104 +++ arch/

[PATCH 04/18] Drivers: hv: vmbus: Move Hypercall invocation code out of common code

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of the effort to separate out architecture specific code, move the hypercall invocation code to an architecture specific file. Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/hv_init.c | 54 +++--- arch/x86/include/asm/

[PATCH 08/18] Drivers: hv: vmbus: Move the check for hypercall page setup

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of the effort to separate out architecture specific code, move the check for detecting if the hypercall page is setup. Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/hv_init.c | 15 +++ arch/x86/include/asm/mshyperv.h |1 + drivers/hv

[PATCH 14/18] Drivers: hv: vmbus: Define APIs to manipulate the event page

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of cleaning up architecture specific code, define APIs to manipulate the event page. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h |3 +++ drivers/hv/hv.c |8 2 files changed, 7 insertions(+), 4 deletions(-)

[PATCH 09/18] Drivers: hv: vmbus: Move the code to signal end of message

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of the effort to separate out architecture specific code, move the code for signaling end of message. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h | 37 + drivers/hv/channel_mgmt.c |1 + drive

[PATCH 12/18] Drivers: hv: vmbus: Get rid of an unsused variable

2016-12-30 Thread kys
From: K. Y. Srinivasan The version variable while it is initialized is not used; get rid of it. Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 0afffd8..5a2a329 100644 --- a/

[PATCH 07/18] Drivers: hv: vmbus: Move the crash notification function

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of the effort to separate out architecture specific code, move the crash notification function. Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/hv_init.c | 26 ++ arch/x86/include/asm/mshyperv.h|1 + arch/x86/include

[PATCH 13/18] Drivers: hv: vmbus: Define APIs to manipulate the message page

2016-12-30 Thread kys
From: K. Y. Srinivasan As part of cleaning up architecture specific code, define APIs to manipulate the message page. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h |3 +++ drivers/hv/hv.c |8 2 files changed, 7 insertions(+), 4 deletions(-

[PATCH 07/15] hv: allocate synic pages for all present CPUs

2016-12-01 Thread kys
From: Vitaly Kuznetsov It may happen that not all CPUs are online when we do hv_synic_alloc() and in case more CPUs come online later we may try accessing these allocated structures. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv.c |4 ++-- 1 files chang

[PATCH 03/15] hyperv: Fix spelling of HV_UNKOWN

2016-12-01 Thread kys
From: Haiyang Zhang Changed it to HV_UNKNOWN Signed-off-by: Haiyang Zhang Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c |6 +++--- include/linux/hyperv.h|2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/cha

[PATCH 01/15] Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()

2016-12-01 Thread kys
From: Vitaly Kuznetsov DoS protection conditions were altered in WS2016 and now it's easy to get -EAGAIN returned from vmbus_post_msg() (e.g. when we try changing MTU on a netvsc device in a loop). All vmbus_post_msg() callers don't retry the operation and we usually end up with a non-functional

[PATCH 11/15] hv: make CPU offlining prevention fine-grained

2016-12-01 Thread kys
From: Vitaly Kuznetsov Since commit e513229b4c38 ("Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors") cpu offlining was disabled. It is still true that we can't offline CPUs which have VMBus channels bound to them but we may have 'free' CPUs (e.v. we booted with maxcpus= parameter a

[PATCH 05/15] Drivers: hv: vmbus: Enhance the rescind callback functionality

2016-12-01 Thread kys
From: K. Y. Srinivasan Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 11 +++ include/linux/hyperv.h|7 --- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index f9c5827..d83c1ac 100644

[PATCH 06/15] hv: acquire vmbus_connection.channel_mutex in vmbus_free_channels()

2016-12-01 Thread kys
From: Vitaly Kuznetsov "kernel BUG at drivers/hv/channel_mgmt.c:350!" is observed when hv_vmbus module is unloaded. BUG_ON() was introduced in commit 85d9aa705184 ("Drivers: hv: vmbus: add an API vmbus_hvsock_device_unregister()") as vmbus_free_channels() codepath was apparently forgotten. Fixes

[PATCH 10/15] hv: switch to cpuhp state machine for synic init/cleanup

2016-12-01 Thread kys
From: Vitaly Kuznetsov To make it possible to online/offline CPUs switch to cpuhp infrastructure for doing hv_synic_init()/hv_synic_cleanup(). Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv.c | 15 +++ drivers/hv/hyperv_vmbus.h |4

[PATCH 09/15] hv: change clockevents unbind tactics

2016-12-01 Thread kys
From: Vitaly Kuznetsov To get prepared to CPU offlining support we need co change the way how we unbind clockevent devices. As one CPU may go online/offline multiple times we need to bind it in hv_synic_init() and unbind it in hv_synic_cleanup(). There is an additional corner case: when we unload

[PATCH 08/15] hv: init percpu_list in hv_synic_alloc()

2016-12-01 Thread kys
From: Vitaly Kuznetsov Initializing hv_context.percpu_list in hv_synic_alloc() helps to prevent a crash in percpu_channel_enq() when not all CPUs were online during initialization and it naturally belongs there. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv

[PATCH 13/15] vmbus: add support for dynamic device id's

2016-12-01 Thread kys
From: Stephen Hemminger This patch adds sysfs interface to dynamically bind new UUID values to existing VMBus device. This is useful for generic UIO driver to act similar to uio_pci_generic. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/vmbus_drv.c | 174 +++

[PATCH 15/15] Tools: hv: kvp: configurable external scripts path

2016-12-01 Thread kys
From: Alex Fluter error when running hypervkvpd: $ sudo ./hv_kvp_daemon -n sh: hv_get_dns_info: command not found sh: hv_get_dhcp_info: command not found sh: hv_get_dns_info: command not found sh: hv_get_dhcp_info: command not found The external scripts are not installed in system path, adding

[PATCH 00/15] Drivers: hv: CPU management fixes and a new uio driver

2016-12-01 Thread kys
From: K. Y. Srinivasan Fixes to handle CPU online/offline. Also included is a new uio driver for Hyper-V. Alex Fluter (1): Tools: hv: kvp: configurable external scripts path Haiyang Zhang (2): hyperv: Add a function to detect hv_device hyperv: Fix spelling of HV_UNKOWN K. Y. Srinivasan (

[PATCH 02/15] hyperv: Add a function to detect hv_device

2016-12-01 Thread kys
From: Haiyang Zhang Signed-off-by: Haiyang Zhang Signed-off-by: K. Y. Srinivasan --- drivers/hv/vmbus_drv.c |6 ++ include/linux/hyperv.h |2 ++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 0276d2e..1730ac0 100

[PATCH 04/15] Drivers: hv: vmbus: Prevent sending data on a rescinded channel

2016-12-01 Thread kys
From: K. Y. Srinivasan After the channel is rescinded, the host does not read from the rescinded channel. Fail writes to a channel that has already been rescinded Signed-off-by: K. Y. Srinivasan --- drivers/hv/ring_buffer.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --g

[PATCH 12/15] hv: don't reset hv_context.tsc_page on crash

2016-12-01 Thread kys
From: Vitaly Kuznetsov It may happen that secondary CPUs are still alive and resetting hv_context.tsc_page will cause a consequent crash in read_hv_clock_tsc() as we don't check for it being not NULL there. It is safe as we're not freeing this page anyways. Signed-off-by: Vitaly Kuznetsov Signe

[PATCH 14/15] uio-hv-generic: new userspace i/o driver for VMBus

2016-12-01 Thread kys
From: Stephen Hemminger This is a new driver to enable userspace networking on VMBus. It is based largely on the similar driver that already exists for PCI, and earlier work done by Brocade to support DPDK. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- MAINTAINERS

[PATCH V2 00/15] Drivers: hv: CPU management fixes and a new uio driver

2016-12-03 Thread kys
From: K. Y. Srinivasan Fixes to handle CPU online/offline. Also included is a new uio driver for Hyper-V. V2: Updated commit logs (Greg KH) Re-implemented the API to detect if it is a vmbus device Alex Fluter (1): Tools: hv: kvp: configurable external scripts path Haiyang

[PATCH V2 01/15] Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()

2016-12-03 Thread kys
From: Vitaly Kuznetsov DoS protection conditions were altered in WS2016 and now it's easy to get -EAGAIN returned from vmbus_post_msg() (e.g. when we try changing MTU on a netvsc device in a loop). All vmbus_post_msg() callers don't retry the operation and we usually end up with a non-functional

[PATCH V2 04/15] Drivers: hv: vmbus: Enhance the rescind callback functionality

2016-12-03 Thread kys
From: K. Y. Srinivasan Enhance the rescind callback functionality by permitting the passing of an opaque pointer. This functionality will be used by vmbus device drivers to implement rescind related cleanup more efficiently. Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 11

[PATCH V2 05/15] hv: acquire vmbus_connection.channel_mutex in vmbus_free_channels()

2016-12-03 Thread kys
From: Vitaly Kuznetsov "kernel BUG at drivers/hv/channel_mgmt.c:350!" is observed when hv_vmbus module is unloaded. BUG_ON() was introduced in commit 85d9aa705184 ("Drivers: hv: vmbus: add an API vmbus_hvsock_device_unregister()") as vmbus_free_channels() codepath was apparently forgotten. Fixes

[PATCH V2 15/15] hyperv: Add a function to detect if the device is a vmbus dev

2016-12-03 Thread kys
From: Haiyang Zhang On Hyper-V, every VF interface has a corresponding synthetic interface managed by netvsc that share the same MAC address. netvsc registers for netdev events to manage this association. Currently we use the MAC address to manage this association but going forward, we want to us

[PATCH V2 03/15] Drivers: hv: vmbus: Prevent sending data on a rescinded channel

2016-12-03 Thread kys
From: K. Y. Srinivasan After the channel is rescinded, the host does not read from the rescinded channel. Fail writes to a channel that has already been rescinded. Signed-off-by: K. Y. Srinivasan --- drivers/hv/ring_buffer.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff -

[PATCH V2 07/15] hv: init percpu_list in hv_synic_alloc()

2016-12-03 Thread kys
From: Vitaly Kuznetsov Initializing hv_context.percpu_list in hv_synic_alloc() helps to prevent a crash in percpu_channel_enq() when not all CPUs were online during initialization and it naturally belongs there. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv

[PATCH V2 02/15] hyperv: Fix spelling of HV_UNKOWN

2016-12-03 Thread kys
From: Haiyang Zhang Changed it to HV_UNKNOWN Signed-off-by: Haiyang Zhang Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c |6 +++--- include/linux/hyperv.h|2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/cha

[PATCH V2 09/15] hv: switch to cpuhp state machine for synic init/cleanup

2016-12-03 Thread kys
From: Vitaly Kuznetsov To make it possible to online/offline CPUs switch to cpuhp infrastructure for doing hv_synic_init()/hv_synic_cleanup(). Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv.c | 15 +++ drivers/hv/hyperv_vmbus.h |4

[PATCH V2 10/15] hv: make CPU offlining prevention fine-grained

2016-12-03 Thread kys
From: Vitaly Kuznetsov Since commit e513229b4c38 ("Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors") cpu offlining was disabled. It is still true that we can't offline CPUs which have VMBus channels bound to them but we may have 'free' CPUs (e.v. we booted with maxcpus= parameter a

[PATCH V2 12/15] vmbus: add support for dynamic device id's

2016-12-03 Thread kys
From: Stephen Hemminger This patch adds sysfs interface to dynamically bind new UUID values to existing VMBus device. This is useful for generic UIO driver to act similar to uio_pci_generic. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/vmbus_drv.c | 174 +++

[PATCH V2 11/15] hv: don't reset hv_context.tsc_page on crash

2016-12-03 Thread kys
From: Vitaly Kuznetsov It may happen that secondary CPUs are still alive and resetting hv_context.tsc_page will cause a consequent crash in read_hv_clock_tsc() as we don't check for it being not NULL there. It is safe as we're not freeing this page anyways. Signed-off-by: Vitaly Kuznetsov Signe

[PATCH V2 06/15] hv: allocate synic pages for all present CPUs

2016-12-03 Thread kys
From: Vitaly Kuznetsov It may happen that not all CPUs are online when we do hv_synic_alloc() and in case more CPUs come online later we may try accessing these allocated structures. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv.c |4 ++-- 1 files chang

[PATCH V2 14/15] Tools: hv: kvp: configurable external scripts path

2016-12-03 Thread kys
From: Alex Fluter error when running hypervkvpd: $ sudo ./hv_kvp_daemon -n sh: hv_get_dns_info: command not found sh: hv_get_dhcp_info: command not found sh: hv_get_dns_info: command not found sh: hv_get_dhcp_info: command not found The external scripts are not installed in system path, adding

[PATCH V2 08/15] hv: change clockevents unbind tactics

2016-12-03 Thread kys
From: Vitaly Kuznetsov To get prepared to CPU offlining support we need co change the way how we unbind clockevent devices. As one CPU may go online/offline multiple times we need to bind it in hv_synic_init() and unbind it in hv_synic_cleanup(). There is an additional corner case: when we unload

[PATCH V2 13/15] uio-hv-generic: new userspace i/o driver for VMBus

2016-12-03 Thread kys
From: Stephen Hemminger This is a new driver to enable userspace networking on VMBus. It is based largely on the similar driver that already exists for PCI, and earlier work done by Brocade to support DPDK. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- MAINTAINERS

[PATCH 0/2] pci-hyperv: Some miscellaneous fixes

2017-03-24 Thread kys
From: K. Y. Srinivasan Some miscellaneous fixes. K. Y. Srinivasan (2): pci-hyperv: Fix a bug in specifying CPU affinity pci-hyperv: Fix an atomic bug drivers/pci/host/pci-hyperv.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-)

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

2017-03-24 Thread kys
From: K. Y. Srinivasan The memory allocation here needs to be non-blocking. Fix the issue. Signed-off-by: K. Y. Srinivasan Cc: --- drivers/pci/host/pci-hyperv.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyper

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

2017-03-24 Thread kys
From: K. Y. Srinivasan When we have 32 or more CPUs in the affinity mask, we should use a special constant to specify that to the host. Fix this issue. Signed-off-by: K. Y. Srinivasan Cc: --- drivers/pci/host/pci-hyperv.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) d

[PATCH 1/2] PCI: hv: Fix a bug in specifying CPU affinity

2017-03-24 Thread kys
From: K. Y. Srinivasan When we have 32 or more CPUs in the affinity mask, we should use a special constant to specify that to the host. Fix this issue. Signed-off-by: K. Y. Srinivasan Cc: --- drivers/pci/host/pci-hyperv.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) di

[PATCH net-next 1/2] netvsc: Fix a bug in sub-channel handling

2017-03-24 Thread kys
From: K. Y. Srinivasan All netvsc channels are handled via NAPI. Setup the "read mode" correctly for the netvsc sub-channels. Signed-off-by: K. Y. Srinivasan --- drivers/net/hyperv/rndis_filter.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/net/hyperv/rn

[PATCH net-next 2/2] netvsc: Properly initialize the return value

2017-03-24 Thread kys
From: K. Y. Srinivasan Initialize the return value correctly. Signed-off-by: K. Y. Srinivasan --- drivers/net/hyperv/netvsc_drv.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index eb7ae79..f830bbb 1

[PATCH net-next 0/2] netvsc: Fix miscellaneous issues

2017-03-24 Thread kys
From: K. Y. Srinivasan Fix miscellaneous issues. K. Y. Srinivasan (2): netvsc: Fix a bug in sub-channel handling netvsc: Properly initialize the return value drivers/net/hyperv/netvsc_drv.c |2 +- drivers/net/hyperv/rndis_filter.c |5 + 2 files changed, 6 insertions(+), 1 del

[PATCH 0/2] Drivers: hv: Support vAPIC

2017-03-14 Thread kys
From: K. Y. Srinivasan Enable autoeoi based on the hypervisor recommendations. This is required to support vAPIC. K. Y. Srinivasan (2): Drivers: hv: Fix a typo Drivers: hv: Base autoeoi enablement based on hypervisor hints arch/x86/include/uapi/asm/hyperv.h |7 ++- drivers/hv/hv.c

[PATCH 2/2] Drivers: hv: Base autoeoi enablement based on hypervisor hints

2017-03-14 Thread kys
From: K. Y. Srinivasan Don't enable auto-eoi if the hypervisor recommends otherwise. This will enable vAPIC functionality if available. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/uapi/asm/hyperv.h |5 + drivers/hv/hv.c|5 - 2 files changed, 9 inser

[PATCH 1/2] Drivers: hv: Fix a typo

2017-03-14 Thread kys
From: K. Y. Srinivasan Fix a typo in the macro. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/uapi/asm/hyperv.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/include/uapi/asm/hyperv.h b/arch/x86/include/uapi/asm/hyperv.h index 3a20ccf..32ea7a3 10064

[PATCH 1/1] Drivers: hv: vmbus: Don't leak memory when a channel is rescinded

2017-03-12 Thread kys
From: K. Y. Srinivasan When we close a channel that has been rescinded, we will leak memory since vmbus_teardown_gpadl() returns an error. Fix this so that we can properly cleanup the memory allocated to the ring buffers. Fixes: ccb61f8a99e6 ("Drivers: hv: vmbus: Fix a rescind handling bug") Si

[PATCH 1/1] Drivers: hv: vmbus: Don't leak channel ids

2017-03-13 Thread kys
From: K. Y. Srinivasan If we cannot allocate memory for the channel, free the relid associated with the channel. Signed-off-by: K. Y. Srinivasan Cc: --- drivers/hv/channel_mgmt.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/ch

[PATCH 0/4] Drivers: hv: vmbus: Miscellaneous Fixes

2017-03-04 Thread kys
From: K. Y. Srinivasan These patches fix several issues introduced in 4.11. Greg, Please pick these patches for 4.11. Dexuan Cui (2): vmbus: remove hv_event_tasklet_disable/enable Drivers: hv: util: don't forget to init host_ts.lock Stephen Hemminger (1): vmbus: use rcu for per-cpu channe

[PATCH 3/4] Drivers: hv: util: move waiting for release to hv_utils_transport itself

2017-03-04 Thread kys
From: Vitaly Kuznetsov Waiting for release_event in all three drivers introduced issues on release as on_reset() hook is not always called. E.g. if the device was never opened we will never get the completion. Move the waiting code to hvutil_transport_destroy() and make sure it is only called wh

[PATCH 1/4] vmbus: use rcu for per-cpu channel list

2017-03-04 Thread kys
From: Stephen Hemminger The per-cpu channel list is now referred to in the interrupt routine. This is mostly safe since the host will not normally generate an interrupt when channel is being deleted but if it did then there would be a use after free problem. To solve, this use RCU protection on

[PATCH 2/4] vmbus: remove hv_event_tasklet_disable/enable

2017-03-04 Thread kys
From: Dexuan Cui With the recent introduction of per-channel tasklet, we need to update the way we handle the 3 concurrency issues: 1. hv_process_channel_removal -> percpu_channel_deq vs. vmbus_chan_sched -> list_for_each_entry(..., percpu_list); 2. vmbus_process_offer -> percpu_channel_enq/

[PATCH 4/4] Drivers: hv: util: don't forget to init host_ts.lock

2017-03-04 Thread kys
From: Dexuan Cui Without the patch, I always get a "BUG: spinlock bad magic" warning. Fixes: 3716a49a81ba ("hv_utils: implement Hyper-V PTP source") Signed-off-by: Dexuan Cui Cc: Vitaly Kuznetsov Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Signed-off-by: K. Y. Srinivasan

[PATCH 6/9] hyperv: remove unnecessary return variable

2017-03-04 Thread kys
From: Stephen Hemminger hv_ringbuffer_read cleanup. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/ring_buffer.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/ring_buffer.c index 52d0556..8a

[PATCH 4/9] vmbus: remove unnecessary initialization

2017-03-04 Thread kys
From: Stephen Hemminger Don't initialize variables that are then set a few lines later. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/ring_buffer.c | 13 + 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/hv/ring_buffer.c b

[PATCH 8/9] vmbus: cleanup header file style

2017-03-04 Thread kys
From: Stephen Hemminger Minor changes to align hyper-v vmbus include files with current linux kernel style. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/hyperv_vmbus.h | 16 include/linux/hyperv.h| 12 ++-- 2 files changed, 1

[PATCH 7/9] vmbus: make channel_message table constant

2017-03-04 Thread kys
From: Stephen Hemminger This table is immutable and should be const. Cleanup indentation and whitespace for this as well. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 48 ++-- drivers/hv/hyperv_vmbus

[PATCH 1/9] vmbus: only reschedule tasklet if time limit exceeded

2017-03-04 Thread kys
From: Stephen Hemminger The change to reschedule tasklet if more data arrives in ring buffer can cause performance regression if host timing is such that the next response happens in small window. Go back to a modified version of the original looping behavior. If the race occurs in a small time,

[PATCH 9/9] vmbus: expose debug info for drivers

2017-03-04 Thread kys
From: Stephen Hemminger Allow driver to get debug information about state of the ring. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/hyperv_vmbus.h | 11 --- drivers/hv/ring_buffer.c |1 + include/linux/hyperv.h| 17 + 3 f

[PATCH 2/9] hyperv: fix warning about missing prototype

2017-03-04 Thread kys
From: Stephen Hemminger Compiling with warnings enabled finds missing prototype for hv_do_hypercall. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/hv_init.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/hyperv/hv_init

[PATCH 3/9] vmbus: remove useless return's

2017-03-04 Thread kys
From: Stephen Hemminger No need for empty return at end of void function Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_balloon.c |2 -- drivers/hv/hv_fcopy.c|2 -- drivers/hv/hv_kvp.c |2 -- drivers/hv/hv_snapshot.c |2 -- drivers

[PATCH 5/9] vmbus: fix spelling errors

2017-03-04 Thread kys
From: Stephen Hemminger Several spelling errors in comments Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel.c | 10 +- drivers/hv/hv_kvp.c | 10 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/hv/channel.

[PATCH 0/9] Drivers: hv: vmbus: Miscellaneous cleanup

2017-03-04 Thread kys
From: K. Y. Srinivasan Miscellaneous cleanup. Stephen Hemminger (9): vmbus: only reschedule tasklet if time limit exceeded hyperv: fix warning about missing prototype vmbus: remove useless return's vmbus: remove unnecessary initialization vmbus: fix spelling errors hyperv: remove unn

<    1   2   3   4   5   >