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

2018-11-25 Thread kys
From: Dexuan Cui vmbus_process_offer() mustn't call channel->sc_creation_callback() directly for sub-channels, because sc_creation_callback() -> vmbus_open() may never get the host's response to the OPEN_CHANNEL message (the host may rescind a channel at any time, e.g. in the case of hot

[PATCH 1/2] Drivers: hv: vmbus: check the creation_status in vmbus_establish_gpadl()

2018-11-25 Thread kys
From: Dexuan Cui This is a longstanding issue: if the vmbus upper-layer drivers try to consume too many GPADLs, the host may return with an error 0xC044 (STATUS_QUOTA_EXCEEDED), but currently we forget to check the creation_status, and hence we can pass an invalid GPADL handle into the

[PATCH 0/2] Drivers: hv: vmbus: Miscellaneous fixes

2018-11-25 Thread kys
From: "K. Y. Srinivasan" Miscellaneous fixes. Dexuan Cui (2): Drivers: hv: vmbus: check the creation_status in vmbus_establish_gpadl() Drivers: hv: vmbus: offload the handling of channels to two workqueues drivers/hv/channel.c | 8 ++ drivers/hv/channel_mgmt.c | 188

[PATCH] Drivers: hv: vmbus: Remove the useless API vmbus_get_outgoing_channel()

2018-11-25 Thread kys
From: Dexuan Cui Commit d86adf482b84 ("scsi: storvsc: Enable multi-queue support") removed the usage of the API in Jan 2017, and the API is not used since then. netvsc and storvsc have their own algorithms to determine the outgoing channel, so this API is useless. And the API is potentially

[PATCH 0/4] Hyper-V: Enable Linux guests on Hyper-V on ARM64

2018-11-21 Thread kys
From: "K. Y. Srinivasan" This series enables Linux guests running on Hyper-V on ARM64 hardware. New ARM64-specific code in arch/arm64/hyperv initializes Hyper-V, including its synthetic clocks and hypercall mechanism. Existing architecture independent drivers for Hyper-V's VMbus and synthetic

[PATCH 0/4] Hyper-V: Enable Linux guests on Hyper-V on ARM64

2018-11-21 Thread kys
From: "K. Y. Srinivasan" This series enables Linux guests running on Hyper-V on ARM64 hardware. New ARM64-specific code in arch/arm64/hyperv initializes Hyper-V, including its synthetic clocks and hypercall mechanism. Existing architecture independent drivers for Hyper-V's VMbus and synthetic

[PATCH 4/4] Drivers: hv: Enable CONFIG_HYPERV on ARM64

2018-11-21 Thread kys
From: Michael Kelley Update drivers/hv/Kconfig so CONFIG_HYPERV can be selected on ARM64, causing the Hyper-V specific code to be built. Signed-off-by: Michael Kelley Signed-off-by: K. Y. Srinivasan --- drivers/hv/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 2/4] arm64: hyperv: Add support for Hyper-V as a hypervisor

2018-11-21 Thread kys
From: Michael Kelley Add ARM64-specific code to enable Hyper-V. This code includes: * Detecting Hyper-V and initializing the guest/Hyper-V interface * Setting up Hyper-V's synthetic clocks * Making hypercalls using the HVC instruction * Setting up VMbus and stimer0 interrupts * Setting up kexec

[PATCH 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-11-21 Thread kys
From: Michael Kelley Add hooks to enable/disable a per-CPU IRQ for VMbus. These hooks are in the architecture independent setup and shutdown paths for Hyper-V, and are needed by Linux guests on Hyper-V on ARM64. The x86/x64 implementation is null because VMbus interrupts on x86/x64 don't use an

[PATCH 1/4] arm64: hyperv: Add core Hyper-V include files

2018-11-21 Thread kys
From: Michael Kelley hyperv-tlfs.h defines Hyper-V interfaces from the Hyper-V Top Level Functional Spec (TLFS). The TLFS is distinctly oriented to x86/x64, and Hyper-V has not separated out the architecture-dependent parts into x86/x64 vs. ARM64. So hyperv-tlfs.h includes information for ARM64

[PATCH 0/2] Drivers: hv: Miscellaneous fixes

2018-09-16 Thread kys
From: "K. Y. Srinivasan" Some miscellaneous fixes. Dexuan Cui (1): Drivers: hv: vmbus: Use get/put_cpu() in vmbus_connect() Vitaly Kuznetsov (1): tools: hv: fcopy: set 'error' in case an unknown operation was requested drivers/hv/connection.c| 8 +---

[PATCH 2/2] tools: hv: fcopy: set 'error' in case an unknown operation was requested

2018-09-16 Thread kys
From: Vitaly Kuznetsov 'error' variable is left uninitialized in case we see an unknown operation. As we don't immediately return and proceed to pwrite() we need to set it to something, HV_E_FAIL sounds good enough. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan ---

[PATCH 1/2] Drivers: hv: vmbus: Use get/put_cpu() in vmbus_connect()

2018-09-16 Thread kys
From: Dexuan Cui With CONFIG_DEBUG_PREEMPT=y, I always see this warning: BUG: using smp_processor_id() in preemptible [] Fix the false warning by using get/put_cpu(). Here vmbus_connect() sends a message to the host and waits for the host's response. The host will deliver the response

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

2018-03-27 Thread kys
From: "K. Y. Srinivasan" Some miscellaneous fixes and adjustments. Dexuan Cui (2): Drivers: hv: vmbus: respect what we get from hv_get_synint_state() Drivers: hv: vmbus: do not mark HV_PCIE as perf_device Stephen Hemminger (2): hv: add SPDX license to trace hv: add SPDX license id to

[PATCH 2/4] Drivers: hv: vmbus: do not mark HV_PCIE as perf_device

2018-03-27 Thread kys
From: Dexuan Cui The pci-hyperv driver's channel callback hv_pci_onchannelcallback() is not really a hot path, so we don't need to mark it as a perf_device, meaning with this patch all HV_PCIE channels' target_cpu will be CPU0. Signed-off-by: Dexuan Cui Cc: sta...@vger.kernel.org Cc: Stephen

[PATCH 1/4] Drivers: hv: vmbus: respect what we get from hv_get_synint_state()

2018-03-27 Thread kys
From: Dexuan Cui I didn't really hit a bug, but just happened to notice the redundant line. Signed-off-by: Dexuan Cui Cc: Stephen Hemminger Cc: K. Y. Srinivasan Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hv/hv.c

[PATCH 4/4] hv: add SPDX license id to Kconfig

2018-03-27 Thread kys
From: Stephen Hemminger Missing license on Kconfig file. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig index 50b89ea0e60f..97954f575c3f 100644 ---

[PATCH 3/4] hv: add SPDX license to trace

2018-03-27 Thread kys
From: Stephen Hemminger Missing license on Hyper-V VMBUS tracing files. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_trace.c | 2 ++ drivers/hv/hv_trace.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/hv/hv_trace.c

[PATCH 0/5] X86: Hyper-V: APIC enlightenments

2018-04-25 Thread kys
From: "K. Y. Srinivasan" Implement APIC related enlightenments. K. Y. Srinivasan (5): X86: Hyper-V: Enlighten APIC access X86: Hyper-V: Enable IPI enlightenments X86: Hyper-V: Enhanced IPI enlightenment X86: Hyper-V: Consolidate code for converting cpumask to vpset X86: Hyper-V:

[PATCH 3/5] X86: Hyper-V: Enhanced IPI enlightenment

2018-04-25 Thread kys
From: "K. Y. Srinivasan" Support enhanced IPI enlightenments (to target more than 64 CPUs). Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/hv_apic.c | 49 -- arch/x86/include/asm/hyperv-tlfs.h | 1 + arch/x86/include/asm/mshyperv.h| 39

[PATCH 5/5] X86: Hyper-V: Consolidate the allocation of the hypercall input page

2018-04-25 Thread kys
From: "K. Y. Srinivasan" Consolidate the allocation of the hypercall input page. Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/hv_init.c | 2 -- arch/x86/hyperv/mmu.c | 33 + arch/x86/include/asm/mshyperv.h | 1 - 3 files changed, 9

[PATCH 1/5] X86: Hyper-V: Enlighten APIC access

2018-04-25 Thread kys
From: "K. Y. Srinivasan" Hyper-V supports MSR based APIC access; implement the enlightenment. Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/Makefile| 2 +- arch/x86/hyperv/hv_apic.c | 98 + arch/x86/hyperv/hv_init.c | 5 ++-

[PATCH 4/5] X86: Hyper-V: Consolidate code for converting cpumask to vpset

2018-04-25 Thread kys
From: "K. Y. Srinivasan" Consolidate code for converting cpumask to vpset. Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/hv_apic.c | 2 +- arch/x86/hyperv/mmu.c | 45 +++--- arch/x86/include/asm/hyperv-tlfs.h | 2 +- 3 files

[PATCH 2/5] X86: Hyper-V: Enable IPI enlightenments

2018-04-25 Thread kys
From: "K. Y. Srinivasan" Hyper-V supports hypercalls to implement IPI; use them. Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/hv_apic.c | 125 + arch/x86/hyperv/hv_init.c | 17 + arch/x86/include/asm/hyperv-tlfs.h | 9 +++

[PATCH V2 0/5] X86: Hyper-V: APIC enlightenments

2018-05-04 Thread kys
From: "K. Y. Srinivasan" Implement APIC related enlightenments. V2: Addressed comments from Thomas Gleixner and Michael Kelley (EOSG) . K. Y. Srinivasan (5): X86: Hyper-V: Enlighten APIC access X86: Hyper-V: Enable IPI enlightenments X86: Hyper-V: Enhanced IPI enlightenment X86:

[PATCH V2 2/5] X86: Hyper-V: Enable IPI enlightenments

2018-05-04 Thread kys
From: "K. Y. Srinivasan" Hyper-V supports hypercalls to implement IPI; use them. Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/hv_apic.c | 118 + arch/x86/hyperv/hv_init.c | 27 + arch/x86/include/asm/hyperv-tlfs.h | 15

[PATCH V2 1/5] X86: Hyper-V: Enlighten APIC access

2018-05-04 Thread kys
From: "K. Y. Srinivasan" Hyper-V supports MSR based APIC access; implement the enlightenment. Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/Makefile| 2 +- arch/x86/hyperv/hv_apic.c | 101 arch/x86/hyperv/hv_init.c | 5 +-

[PATCH V2 5/5] X86: Hyper-V: Consolidate the allocation of the hypercall input page

2018-05-04 Thread kys
From: "K. Y. Srinivasan" Consolidate the allocation of the hypercall input page. Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/hv_init.c | 2 -- arch/x86/hyperv/mmu.c | 30 ++ arch/x86/include/asm/mshyperv.h | 1 - 3 files changed, 6

[PATCH V2 3/5] X86: Hyper-V: Enhanced IPI enlightenment

2018-05-04 Thread kys
From: "K. Y. Srinivasan" Support enhanced IPI enlightenments (to target more than 64 CPUs). Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/hv_apic.c | 42 +- arch/x86/hyperv/mmu.c | 2 +- arch/x86/include/asm/hyperv-tlfs.h | 15

[PATCH V2 4/5] X86: Hyper-V: Consolidate code for converting cpumask to vpset

2018-05-04 Thread kys
From: "K. Y. Srinivasan" Consolidate code for converting cpumask to vpset. Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/mmu.c | 43 ++- 1 file changed, 2 insertions(+), 41 deletions(-) diff --git a/arch/x86/hyperv/mmu.c b/arch/x86/hyperv/mmu.c

[PATCH 1/1] doc: fix sysfs ABI documentation

2018-05-12 Thread kys
From: Stephen Hemminger In 4.9 kernel, the sysfs files for Hyper-V VMBus changed name but the documentation files were not updated. The current sysfs file names are /sys/bus/vmbus/devices//... See commit 9a56e5d6a0ba ("Drivers: hv: make VMBus bus ids persistent") and commit f6b2db084b65

[PATCH 1/1] Drivers: hv: vmbus: enable VMBus protocol version 5.0

2018-05-12 Thread kys
From: Dexuan Cui With VMBus protocol 5.0, we're able to better support new features, e.g. running two or more VMBus drivers simultaneously in a single VM -- note: we can't simply load the current VMBus driver twice, instead, a secondary VMBus driver must be implemented. This patch adds the

[PATCH V3 0/5] X86: Hyper-V: APIC enlightenments

2018-05-16 Thread kys
From: "K. Y. Srinivasan" Implement APIC related enlightenments. V2: Addressed comments from Thomas Gleixner and Michael Kelley (EOSG) . V3: Address build issues reported by kbuild test robot K. Y. Srinivasan (5): X86: Hyper-V: Enlighten APIC access X86: Hyper-V: Enable IPI

[PATCH V3 4/5] X86: Hyper-V: Consolidate code for converting cpumask to vpset

2018-05-16 Thread kys
From: "K. Y. Srinivasan" Consolidate code for converting cpumask to vpset. Signed-off-by: K. Y. Srinivasan Reviewed-by: Michael Kelley --- arch/x86/hyperv/mmu.c | 43 ++- 1 file changed, 2 insertions(+), 41 deletions(-) diff --git

[PATCH V3 3/5] X86: Hyper-V: Enhanced IPI enlightenment

2018-05-16 Thread kys
From: "K. Y. Srinivasan" Support enhanced IPI enlightenments (to target more than 64 CPUs). Signed-off-by: K. Y. Srinivasan Reviewed-by: Michael Kelley --- arch/x86/hyperv/hv_apic.c | 42 +- arch/x86/hyperv/mmu.c | 2 +-

[PATCH V3 2/5] X86: Hyper-V: Enable IPI enlightenments

2018-05-16 Thread kys
From: "K. Y. Srinivasan" Hyper-V supports hypercalls to implement IPI; use them. Signed-off-by: K. Y. Srinivasan Reviewed-by: Michael Kelley --- arch/x86/hyperv/hv_apic.c | 117 + arch/x86/hyperv/hv_init.c | 27 +++

[PATCH V3 5/5] X86: Hyper-V: Consolidate the allocation of the hypercall input page

2018-05-16 Thread kys
From: "K. Y. Srinivasan" Consolidate the allocation of the hypercall input page. Signed-off-by: K. Y. Srinivasan Reviewed-by: Michael Kelley --- arch/x86/hyperv/hv_init.c | 2 -- arch/x86/hyperv/mmu.c | 30 ++ arch/x86/include/asm/mshyperv.h | 1

[PATCH V3 1/5] X86: Hyper-V: Enlighten APIC access

2018-05-16 Thread kys
From: "K. Y. Srinivasan" Hyper-V supports MSR based APIC access; implement the enlightenment. Signed-off-by: K. Y. Srinivasan Reviewed-by: Michael Kelley --- arch/x86/hyperv/Makefile| 2 +- arch/x86/hyperv/hv_apic.c | 104

[PATCH V2 1/1] vmbus: hvsock: add proper sync for vmbus_hvsock_device_unregister()

2017-10-18 Thread kys
From: Dexuan Cui Without the patch, vmbus_hvsock_device_unregister() can destroy the device prematurely when close() is called, and can cause NULl dereferencing or potential data loss (the last portion of the data stream may be dropped prematurely). Signed-off-by: Dexuan Cui Cc: Haiyang Zhang

[PATCH 0/3] Drivers: hv: vmbus: Miscellaneous enhancements and fixes

2017-10-05 Thread kys
From: "K. Y. Srinivasan" Miscellaneous enhancements and fixes. K. Y. Srinivasan (1): Drivers: hv: vmbus: Make pannic reporting to be more useful Stephen Hemminger (2): Drivers: hv: vmbus: Expose per-channel interrupts and events counters vmbus: initialize reserved fields in messages

[PATCH 3/3] Drivers: hv: vmbus: Make pannic reporting to be more useful

2017-10-05 Thread kys
From: "K. Y. Srinivasan" Hyper-V allows the guest to report panic and the guest can pass additional information. All this is logged on the host. Currently Linux is passing back information that is not particularly useful. Make the following changes: 1. Windows uses crash MSR P0 to report

[PATCH 1/3] Drivers: hv: vmbus: Expose per-channel interrupts and events counters

2017-10-05 Thread kys
From: Stephen Hemminger When investigating performance, it is useful to be able to look at the number of host and guest events per-channel. This is equivalent to per-device interrupt statistics. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan ---

[PATCH 2/3] vmbus: initialize reserved fields in messages

2017-10-05 Thread kys
From: Stephen Hemminger Make sure and initialize reserved fields in messages to host, rather than passing stack junk. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hv/channel.c

[PATCH 1/1] vmbus: hvsock: add proper sync for vmbus_hvsock_device_unregister()

2017-10-10 Thread kys
From: Dexuan Cui Without the patch, vmbus_hvsock_device_unregister() can destroy the device prematurely when close() is called, and can cause NULl dereferencing or potential data loss (the last portion of the data stream may be dropped prematurely). Please consider this for 4.14.

[PATCH 1/1] Drivers: hv: vmbus: Fix bugs in rescind handling

2017-09-29 Thread kys
From: "K. Y. Srinivasan" This patch addresses the following bugs in the current rescind handling code: 1. Fixes a race condition where we may be invoking hv_process_channel_removal() on an already freed channel. 2. Prevents indefinite wait when rescinding sub-channels by correctly setting the

[PATCH 0/2] Drivers: hv: vmbus: Miscellaneous enhancements

2017-10-29 Thread kys
From: "K. Y. Srinivasan" Reply-To: k...@microsoft.com Miscellaneous enhancements. K. Y. Srinivasan (1): Drivers: hv: vmbus: Make pannic reporting to be more useful Stephen Hemminger (1): Drivers: hv: vmbus: Expose per-channel interrupts and events counters

[PATCH 1/2] Drivers: hv: vmbus: Expose per-channel interrupts and events counters

2017-10-29 Thread kys
From: Stephen Hemminger When investigating performance, it is useful to be able to look at the number of host and guest events per-channel. This is equivalent to per-device interrupt statistics. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan ---

[PATCH 2/2] Drivers: hv: vmbus: Make pannic reporting to be more useful

2017-10-29 Thread kys
From: "K. Y. Srinivasan" Hyper-V allows the guest to report panic and the guest can pass additional information. All this is logged on the host. Currently Linux is passing back information that is not particularly useful. Make the following changes: 1. Windows uses crash MSR P0 to report

[PATCH 00/17] Drivers: hv: vmbus: Add tracing to VMBus

2017-10-29 Thread kys
From: "K. Y. Srinivasan" Reply-To: k...@microsoft.com Messages between guest and host are used in Hyper-V as control flow. To simplify debugging various issues which are often hard to reproduce add tracepoints to all message senders and handlers. This is not a performance critical path and

[PATCH 03/17] hyper-v: trace vmbus_onoffer()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to CHANNELMSG_OFFERCHANNEL handler. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 37 + 2 files changed, 39 insertions(+) diff --git

[PATCH 09/17] hyper-v: trace vmbus_request_offers()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to CHANNELMSG_REQUESTOFFERS sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 4 +++- drivers/hv/hv_trace.h | 8 2 files changed, 11 insertions(+), 1 deletion(-) diff --git

[PATCH 07/17] hyper-v: trace vmbus_ongpadl_torndown()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to CHANNELMSG_GPADL_TORNDOWN handler. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 8 2 files changed, 10 insertions(+) diff --git a/drivers/hv/channel_mgmt.c

[PATCH 02/17] hyper-v: trace vmbus_on_message()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to vmbus_on_message() which is called when we start processing a blocking from work context. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 5 + 2 files changed, 7

[PATCH 17/17] hyper-v: trace channel events

2017-10-29 Thread kys
From: Vitaly Kuznetsov Added an additional set of trace points for when channel gets notified or signals host. Suggested-by: Stephen Hemminger Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel.c| 2 ++ drivers/hv/connection.c | 2 ++

[PATCH 06/17] hyper-v: trace vmbus_ongpadl_created()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to CHANNELMSG_GPADL_CREATED handler. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 17 + 2 files changed, 19 insertions(+) diff --git

[PATCH 14/17] hyper-v: trace vmbus_negotiate_version()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to CHANNELMSG_INITIATE_CONTACT sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/connection.c | 3 +++ drivers/hv/hv_trace.h | 26 ++ 2 files changed, 29 insertions(+) diff --git

[PATCH 16/17] hyper-v: trace vmbus_send_tl_connect_request()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to CHANNELMSG_TL_CONNECT_REQUEST sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel.c | 7 ++- drivers/hv/hv_trace.h | 20 2 files changed, 26 insertions(+), 1 deletion(-) diff --git

[PATCH 15/17] hyper-v: trace vmbus_release_relid()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to CHANNELMSG_RELID_RELEASED sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 7 +-- drivers/hv/hv_trace.h | 16 2 files changed, 21 insertions(+), 2 deletions(-) diff

[PATCH 10/17] hyper-v: trace vmbus_open()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to CHANNELMSG_OPENCHANNEL sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel.c | 2 ++ drivers/hv/hv_trace.h | 27 +++ 2 files changed, 29 insertions(+) diff --git

[PATCH 12/17] hyper-v: trace vmbus_establish_gpadl()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to CHANNELMSG_GPADL_HEADER/CHANNELMSG_GPADL_BODY sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel.c | 6 ++ drivers/hv/hv_trace.h | 42 ++ 2 files changed, 48

[PATCH 13/17] hyper-v: trace vmbus_teardown_gpadl()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to CHANNELMSG_GPADL_TEARDOWN sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel.c | 2 ++ drivers/hv/hv_trace.h | 18 ++ 2 files changed, 20 insertions(+) diff --git a/drivers/hv/channel.c

[PATCH 08/17] hyper-v: trace vmbus_onversion_response()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to CHANNELMSG_VERSION_RESPONSE handler. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 3 +++ drivers/hv/hv_trace.h | 11 +++ 2 files changed, 14 insertions(+) diff --git

[PATCH 11/17] hyper-v: trace vmbus_close_internal()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to CHANNELMSG_CLOSECHANNEL sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel.c | 2 ++ drivers/hv/hv_trace.h | 15 +++ 2 files changed, 17 insertions(+) diff --git a/drivers/hv/channel.c

[PATCH 04/17] hyper-v: trace vmbus_onoffer_rescind()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to CHANNELMSG_RESCIND_CHANNELOFFER handler. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 8 2 files changed, 10 insertions(+) diff --git

[PATCH 01/17] hyper-v: trace vmbus_on_msg_dpc()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracing subsystem to Hyper-V VMBus module and add tracepoint to vmbus_on_msg_dpc() which is called when we receive a message from host. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/Makefile | 4 +++- drivers/hv/hv_trace.c

[PATCH 05/17] hyper-v: trace vmbus_onopen_result()

2017-10-29 Thread kys
From: Vitaly Kuznetsov Add tracepoint to CHANNELMSG_OPENCHANNEL_RESULT handler. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 17 + 2 files changed, 19 insertions(+) diff --git

[PATCH 0/2] Drivers: hv: vmbus: Miscellaneous fixes

2017-11-14 Thread kys
From: K. Y. Srinivasan Miscellaneous fixes. Dexuan Cui (1): vmbus: unregister device_obj->channels_kset K. Y. Srinivasan (1): Drivers: hv: vmbus: Fix a rescind issue drivers/hv/channel.c | 10 -- drivers/hv/channel_mgmt.c |7 --- drivers/hv/vmbus_drv.c|2 ++

[PATCH 2/2] Drivers: hv: vmbus: Fix a rescind issue

2017-11-14 Thread kys
From: K. Y. Srinivasan The current rescind processing code will not correctly handle the case where the host immediately rescinds a channel that has been offerred. In this case, we could be blocked in the open call and since the channel is rescinded, the host will not respond and we could be

[PATCH 1/2] vmbus: unregister device_obj->channels_kset

2017-11-14 Thread kys
From: Dexuan Cui Fixes: c2e5df616e1a ("vmbus: add per-channel sysfs info") Without the patch, a device can't be thoroughly destroyed, because vmbus_device_register() -> kset_create_and_add() still holds a reference to the hv_device's device.kobj. Signed-off-by: Dexuan Cui Cc: Stephen

[PATCH 0/2] Drivers: hv: vmbbus: Miscellaneous cleanup

2017-11-14 Thread kys
From: K. Y. Srinivasan Miscellaneous cleanup. Michael Kelley (1): Drivers: hv: vmbus: Remove x86-isms from arch independent drivers Stephen Hemminger (1): vmbus: make hv_get_ringbuffer_availbytes local arch/x86/hyperv/hv_init.c | 21 ++---

[PATCH 2/2] vmbus: make hv_get_ringbuffer_availbytes local

2017-11-14 Thread kys
From: Stephen Hemminger hv_get_ringbuffer_availbytes is only used by the debug info routine so make it static. Also, add READ_ONCE() to avoid any possible issues with potentially volatile index values. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan ---

[PATCH 1/2] Drivers: hv: vmbus: Remove x86-isms from arch independent drivers

2017-11-14 Thread kys
From: Michael Kelley hv_is_hypercall_page_setup() is used to check if Hyper-V is initialized, but a 'hypercall page' is an x86 implementation detail that isn't necessarily present on other architectures. Rename to the architecture independent hv_is_hyperv_initialized() and add check that

[PATCH 1/1] hv: kvp: Avoid reading past allocated blocks from KVP file

2017-11-14 Thread kys
From: Paul Meyer While reading in more than one block (50) of KVP records, the allocation goes per block, but the reads used the total number of allocated records (without resetting the pointer/stream). This causes the records buffer to overrun when the refresh reads more than one block over the

[PATCH 1/1] tools/hv: add install target to Makefile

2017-11-14 Thread kys
From: Vitaly Kuznetsov Makefiles usually come with 'install' target included so each distro doesn't need to implement the procedure from scratch. Add it to tools/hv. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- tools/hv/Makefile | 23 ++- 1 files

[PATCH 0/2] Drivers: hv: vmbus: Add additional per-channel sysfs info

2017-09-21 Thread kys
From: "K. Y. Srinivasan" Add additional per-channel sysfs information to help debug performance issues. Greg, please apply this patch-set to 4.15-rc1. Stephen Hemminger (2): vmbus: add per-channel sysfs info Drivers: hv: vmbus: Expose per-channel interrupts and events counters

[PATCH 2/2] Drivers: hv: vmbus: Expose per-channel interrupts and events counters

2017-09-21 Thread kys
From: Stephen Hemminger When investigating performance, it is useful to be able to look at the number of host and guest events per-channel. This is equivalent to per-device interrupt statistics. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan ---

[PATCH 1/2] vmbus: add per-channel sysfs info

2017-09-21 Thread kys
From: Stephen Hemminger This extends existing vmbus related sysfs structure to provide per-channel state information. This is useful when diagnosing issues with multiple queues in networking and storage. The existing sysfs only displayed information about the primary channel. The one place it

[PATCH 0/2] Drivers: hv: Miscellaneous fixes

2017-09-22 Thread kys
From: "K. Y. Srinivasan" Miscellaneous fixes. Greg, please apply these to 4.14-final. Dexuan Cui (1): vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister() Olaf Hering (1): Drivers: hv: fcopy: restore correct transfer length drivers/hv/channel_mgmt.c | 4

[PATCH 2/2] Drivers: hv: fcopy: restore correct transfer length

2017-09-22 Thread kys
From: Olaf Hering Till recently the expected length of bytes read by the daemon did depend on the context. It was either hv_start_fcopy or hv_do_fcopy. The daemon had a buffer size of two pages, which was much larger than needed. Now the expected length of bytes read by the daemon changed

[PATCH 1/2] vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister()

2017-09-22 Thread kys
From: Dexuan Cui Due to commit 54a66265d675 ("Drivers: hv: vmbus: Fix rescind handling"), we need this patch to resolve the below deadlock: after we get the mutex in vmbus_hvsock_device_unregister() and call vmbus_device_unregister() -> device_unregister() -> ... -> device_release() ->

[PATCH 0/2] Tools: hv: Miscellaneous adjustments

2017-08-10 Thread kys
From: K. Y. Srinivasan Miscellaneous adjustments. Olaf Hering (2): Tools: hv: fix snprintf warning in kvp_daemon Tools: hv: update buffer handling in hv_fcopy_daemon tools/hv/hv_fcopy_daemon.c | 32 +--- tools/hv/hv_kvp_daemon.c |2 +- 2 files changed,

[PATCH 1/2] Tools: hv: fix snprintf warning in kvp_daemon

2017-08-10 Thread kys
From: Olaf Hering Increase buffer size so that "_{-INT_MAX}" will fit. Spotted by the gcc7 snprintf checker. Signed-off-by: Olaf Hering Signed-off-by: K. Y. Srinivasan --- tools/hv/hv_kvp_daemon.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH 2/2] Tools: hv: update buffer handling in hv_fcopy_daemon

2017-08-10 Thread kys
From: Olaf Hering Currently this warning is triggered when compiling hv_fcopy_daemon: hv_fcopy_daemon.c:216:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] kernel_modver = *(__u32 *)buffer; Convert the send/receive buffer to a union and

[PATCH 1/1] Drivers: hv: vmbus: Fix rescind handling issues

2017-08-11 Thread kys
From: K. Y. Srinivasan This patch handles the following issues that were observed when we are handling racing channel offer message and rescind message for the same offer: 1. Since the host does not respond to messages on a rescinded channel, in the current code, we could be indefinitely

[PATCH 1/1] x86/hyper-V: Allocate the IDT entry early in boot

2017-09-08 Thread kys
From: "K. Y. Srinivasan" Allocate the hypervisor callback IDT entry early in the boot sequence. Signed-off-by: K. Y. Srinivasan --- arch/x86/kernel/cpu/mshyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/mshyperv.c

[PATCH 0/5] Drivers: hv: Miscellaneous fixes

2017-08-06 Thread kys
From: K. Y. Srinivasan Miscellaneous fixes. Alex Ng (5): Tools: hv: vss: Skip freezing filesystems backed by loop Drivers: hv: balloon: Correctly update onlined page count Drivers: hv: balloon: Show the max dynamic memory assigned Drivers: hv: balloon: Initialize last_post_time on

[PATCH 1/5] Tools: hv: vss: Skip freezing filesystems backed by loop

2017-08-06 Thread kys
From: Alex Ng Since a loop device is backed by a file, a backup will already result in its parent filesystem being frozen. It's sufficient to just freeze the parent filesystem, so we can skip the loop device. This avoids a situation where a loop device and its parent filesystem are both frozen

[PATCH 2/5] Drivers: hv: balloon: Correctly update onlined page count

2017-08-06 Thread kys
From: Alex Ng Previously, num_pages_onlined was updated using value from memory online notifier. This is incorrect because they assume that all hot-added pages are online, even though we only online the amount that's backed by the host. We should update num_pages_onlined only when the balloon

[PATCH 3/5] Drivers: hv: balloon: Show the max dynamic memory assigned

2017-08-06 Thread kys
From: Alex Ng Previously we were only showing max number of pages. We should make it more clear that this value is the max amount of dynamic memory that the Hyper-V host is willing to assign to this guest. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_balloon.c |

[PATCH 4/5] Drivers: hv: balloon: Initialize last_post_time on startup

2017-08-06 Thread kys
From: Alex Ng When left uninitialized, this sometimes fails the following check in post_status(): if (!time_after(now, (last_post_time + HZ))) { return; } This causes unnecessary delays in reporting memory pressure to host after booting up. Signed-off-by: Alex

[PATCH 5/5] Drivers: hv: kvp: Use MAX_ADAPTER_ID_SIZE for translating adapter id

2017-08-06 Thread kys
From: Alex Ng There's a bug which passes the output buffer size as MAX_IP_ADDR_SIZE, when converting the adapter_id field to UTF16. This is much larger than the actual size (MAX_ADAPTER_ID_SIZE). Fix this by passing the proper size. Fortunately, the translation is limited by the length of the

[PATCH V2 0/4] Drivers: hv: Miscellaneous fixes

2017-09-17 Thread kys
From: "K. Y. Srinivasan" Miscellaneous fixes. V2: Dropped the patch: "vmbus: suppress uevents for hv_sock devices" as this was only to address test trigerred issues. Dexuan Cui (1): vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister() Olaf Hering (1): Drivers: hv: fcopy:

[PATCH V2 1/4] vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister()

2017-09-17 Thread kys
From: Dexuan Cui Due to commit 54a66265d675 ("Drivers: hv: vmbus: Fix rescind handling"), we need this patch to resolve the below deadlock: after we get the mutex in vmbus_hvsock_device_unregister() and call vmbus_device_unregister() -> device_unregister() -> ... -> device_release() ->

[PATCH V2 2/4] Drivers: hv: fcopy: restore correct transfer length

2017-09-17 Thread kys
From: Olaf Hering Till recently the expected length of bytes read by the daemon did depend on the context. It was either hv_start_fcopy or hv_do_fcopy. The daemon had a buffer size of two pages, which was much larger than needed. Now the expected length of bytes read by the daemon changed

[PATCH V2 3/4] vmbus: add per-channel sysfs info

2017-09-17 Thread kys
From: Stephen Hemminger This extends existing vmbus related sysfs structure to provide per-channel state information. This is useful when diagnosing issues with multiple queues in networking and storage. The existing sysfs only displayed information about the primary channel. The one place it

[PATCH V2 4/4] Drivers: hv: vmbus: Expose per-channel event counters events counters

2017-09-17 Thread kys
From: Stephen Hemminger When investigating performance, it is useful to be able to look at the number of host and guest events per-channel. This is equivalent to per-device interrupt statistics. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan ---

[PATCH V2 00/12] Drivers: hv: Miscellaneous fixes

2018-03-04 Thread kys
From: "K. Y. Srinivasan" Miscellaneous fixes. V2: Only the patch "Drivers: hv: vmbus: Implement Direct Mode for stimer0" has been modified to address review comments from Dan Carpenter. Dexuan Cui (1): tools: hv: fix compiler warnings about major/target_fname Haiyang Zhang

[PATCH V2 07/12] hv_vmbus: Correct the stale comments regarding cpu affinity

2018-03-04 Thread kys
From: Haiyang Zhang The comments doesn't match what the current code does, also have a typo. This patch corrects them. 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, 3 insertions(+), 5

[PATCH V2 01/12] tools/hv: Fix IP reporting by KVP daemon with SRIOV

2018-03-04 Thread kys
From: Haiyang Zhang On Hyper-V the VF NIC has the same MAC as the related synthetic NIC. VF NIC can work under the synthetic NIC transparently, without its own IP address. The existing KVP daemon only gets IP from the first NIC matching a MAC address, and may not be able to find the IP in this

[PATCH V2 09/12] hv_balloon: fix printk loglevel

2018-03-04 Thread kys
From: Vitaly Kuznetsov We have a mix of different ideas of which loglevel should be used. Unify on the following: - pr_info() for normal operation - pr_warn() for 'strange' host behavior - pr_err() for all errors. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan ---

  1   2   3   4   5   6   7   8   9   >