[PATCH 09/10] vmbus: cleanup header file style

2017-02-27 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 05/10] vmbus: remove unnecessary initialization

2017-02-27 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 00/10] Drivers: hv: vmbus: Miscellaneous fixes

2017-02-27 Thread kys
From: K. Y. Srinivasan Miscellaneous fixes. Stephen Hemminger (10): vmbus: only reschedule tasklet if time limit exceeded vmbus: use rcu for per-cpu channel list hyperv: fix warning about missing prototype vmbus: remove useless return's vmbus: remove unnecessary initialization vmbus:

[PATCH 04/10] vmbus: remove useless return's

2017-02-27 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 01/10] vmbus: only reschedule tasklet if time limit exceeded

2017-02-27 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 07/10] hyperv: remove unnecessary return variable

2017-02-27 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 03/10] hyperv: fix warning about missing prototype

2017-02-27 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 10/10] vmbus: expose debug info for drivers

2017-02-27 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 02/10] vmbus: use rcu for per-cpu channel list

2017-02-27 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 06/10] vmbus: fix spelling errors

2017-02-27 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 08/10] vmbus: make channel_message table constant

2017-02-27 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 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 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

[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 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 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 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 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 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 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 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 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 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 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 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 1/1] Drivers: hv: Issue explicit EOI when autoeoi is not enabled

2017-03-28 Thread kys
From: K. Y. Srinivasan When auto EOI is not enabled; issue an explicit EOI for hyper-v interrupts. Fixes: 6c248aad81c8 ("Drivers: hv: Base autoeoi enablement based on hypervisor hints") Signed-off-by: K. Y. Srinivasan --- arch/x86/kernel/cpu/mshyperv.c |3 +++ 1 files changed, 3 insertio

[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 ++- a

[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 +++ arc

[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 changed

[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: Consol

[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 inser

[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 V2 0/5] X86: Hyper-V: APIC enlightenments

2018-05-03 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: Hyper-

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

2018-05-03 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 in

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

2018-05-03 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 3/5] X86: Hyper-V: Enhanced IPI enlightenment

2018-05-03 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 2/5] X86: Hyper-V: Enable IPI enlightenments

2018-05-03 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 5/5] X86: Hyper-V: Consolidate the allocation of the hypercall input page

2018-05-03 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 insertio

[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 ("vmbus:

[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 suppo

[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 enlightenments

[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 +++ arch/x86/include/asm/hyper

[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 a/arch/x86/hyperv/mmu

[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 +- arch/x86/include/asm/

[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 arch/x86/hyperv/hv_in

[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 0/8] Drivers: hv: Miscellaneous fixes/improvements

2018-06-05 Thread kys
From: "K. Y. Srinivasan" Some miscellaneous fixes/improvements. Arjan van de Ven (1): use the new async probing feature for the hyperv drivers Dexuan Cui (1): Drivers: hv: vmbus: Fix the offer_in_progress in vmbus_process_offer() Michael Kelley (4): x86/hyperv: Add interrupt handler ann

[PATCH 4/8] Drivers: hv: vmbus: Fix the offer_in_progress in vmbus_process_offer()

2018-06-05 Thread kys
From: Dexuan Cui I didn't really hit a real bug, but just happened to spot the bug: we have decreased the counter at the beginning of vmbus_process_offer(), so we mustn't decrease it again. Fixes: 6f3d791f3006 ("Drivers: hv: vmbus: Fix rescind handling issues") Signed-off-by: Dexuan Cui Cc: sta

[PATCH 3/8] Drivers: hv: vmbus: Add comments on ring buffer signaling

2018-06-05 Thread kys
From: Michael Kelley Add comments describing intricacies of Hyper-V ring buffer signaling code. This information is not in Hyper-V public documents, so include here to capture the knowledge for future coders. There are no code changes in this commit. Signed-off-by: Michael Kelley Signed-off-b

[PATCH 7/8] tools: hv: update lsvmbus to be compatible with python3

2018-06-05 Thread kys
From: Olaf Hering Python3 changed the way how 'print' works. Adjust the code to a syntax that is understood by python2 and python3. Signed-off-by: Olaf Hering Acked-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan --- tools/hv/lsvmbus | 12 ++-- 1 file changed, 6 insertions(+), 6 delet

[PATCH 5/8] Drivers: hv: vmbus: Remove x86 MSR refs in arch independent code

2018-06-05 Thread kys
From: Michael Kelley In architecture independent code for manipulating Hyper-V synthetic timers and synthetic interrupts, pass in an ordinal number identifying the timer or interrupt, rather than an actual MSR register address. Then in x86/x64 specific code, map the ordinal number to the appropr

[PATCH 1/8] use the new async probing feature for the hyperv drivers

2018-06-05 Thread kys
From: Arjan van de Ven Recent kernels support asynchronous probing; most hyperv drivers can be probed async easily so set the required flag for this. Signed-off-by: Arjan van de Ven Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hid/hid-hyperv.c | 3

[PATCH 8/8] Tools: hv: vss: fix loop device detection

2018-06-05 Thread kys
From: Vitaly Kuznetsov Commit ea81fdf0981d ("Tools: hv: vss: Skip freezing filesystems backed by loop") added skip for filesystems backed by loop device. However, it seems the detection of such cases is incomplete. It was found that with 'devicemapper' storage driver docker creates the following

[PATCH 6/8] Drivers: hv: vmbus: Make TLFS #define names architecture neutral

2018-06-05 Thread kys
From: Michael Kelley The Hyper-V feature and hint flags in hyperv-tlfs.h are all defined with the string "X64" in the name. Some of these flags are indeed x86/x64 specific, but others are not. For the ones that are used in architecture independent Hyper-V driver code, or will be used in the upc

[PATCH 2/8] x86/hyperv: Add interrupt handler annotations

2018-06-05 Thread kys
From: Michael Kelley Add standard interrupt handler annotations to hyperv_vector_handler(). This does not fix any observed bug, but avoids potential removal of the code by link time optimization and makes it consistent with hv_stimer0_vector_handler in the same source file. Suggested-by: Thomas

[PATCH net-next 1/1] netvsc: Initialize all channel related state prior to opening the channel

2017-04-06 Thread kys
From: K. Y. Srinivasan Prior to opening the channel we should have all the state setup to handle interrupts. The current code does not do that; fix the bug. This bug can result in faults in the interrupt path. Signed-off-by: K. Y. Srinivasan --- drivers/net/hyperv/netvsc.c | 27 ++

[PATCH 1/1] netvsc: Deal with rescinded channels correctly

2017-04-19 Thread kys
From: K. Y. Srinivasan We will not be able to send packets over a channel that has been rescinded. Make necessary adjustments so we can properly cleanup even when the channel is rescinded. This issue can be trigerred in the NIC hot-remove path. Signed-off-by: K. Y. Srinivasan --- drivers/net/h

[PATCH net-next 1/1] netvsc: Deal with rescinded channels correctly

2017-04-19 Thread kys
From: K. Y. Srinivasan We will not be able to send packets over a channel that has been rescinded. Make necessary adjustments so we can properly cleanup even when the channel is rescinded. This issue can be trigerred in the NIC hot-remove path. Signed-off-by: K. Y. Srinivasan --- drivers/net/h

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

2017-04-30 Thread kys
From: K. Y. Srinivasan Miscellaneous fixes to vmbus and util drivers. Alex Ng (1): Tools: hv: vss: Thaw the filesystem and continue if freeze call has timed out K. Y. Srinivasan (3): Drivers: hv: vmbus: Fix error code returned by vmbus_post_msg() Drivers: hv: util: Make hv_poll_channe

[PATCH 6/6] HV: properly delay KVP packets when negotiation is in progress

2017-04-30 Thread kys
From: Long Li The host may send multiple negotiation packets (due to timeout) before the KVP user-mode daemon is connected. KVP user-mode daemon is connected. We need to defer processing those packets until the daemon is negotiated and connected. It's okay for guest to respond to all negotiation

[PATCH 5/6] Drivers: hv: vmbus: Fix rescind handling

2017-04-30 Thread kys
From: K. Y. Srinivasan Fix the rescind handling. This patch addresses the following rescind scenario that is currently not handled correctly: If a rescind were to be received while the offer is still being peocessed, we will be blocked indefinitely since the rescind message is handled on the sam

[PATCH 2/6] tools: hv: properly handle long paths

2017-04-30 Thread kys
From: Vitaly Kuznetsov Paths can be up to PATH_MAX long and PATH_MAX is usually greater than 256. While on it, simplify path reconstruction to a simple snprintf(), define and reuse KVP_NET_DIR. Suggested-by: Tomas Hozza Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- tool

[PATCH 3/6] Drivers: hv: vmbus: Fix error code returned by vmbus_post_msg()

2017-04-30 Thread kys
From: K. Y. Srinivasan ENOBUFS is a more approrpiate error code to be returned when the hypervisor cannot post the message because of insufficient buffers. Make the adjustment. Signed-off-by: K. Y. Srinivasan --- drivers/hv/connection.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(

[PATCH 1/6] Tools: hv: vss: Thaw the filesystem and continue if freeze call has timed out

2017-04-30 Thread kys
From: Alex Ng If a FREEZE operation takes too long, the driver may time out and move on to another operation. The daemon is unaware of this and attempts to notify the driver that the FREEZE succeeded. This results in an error from the driver and the daemon leaves the filesystem in frozen state.

[PATCH 4/6] Drivers: hv: util: Make hv_poll_channel() a little more efficient

2017-04-30 Thread kys
From: K. Y. Srinivasan The current code unconditionally sends an IPI. If we are running on the correct CPU and are in interrupt level, we don't need an IPI. Make this adjustment. Signed-off-by: K. Y. Srinivasan --- drivers/hv/hyperv_vmbus.h |4 1 files changed, 4 insertions(+), 0 dele

[PATCH 0/6] Drivers: hv: vmbus: Some miscellaneous fixes

2017-05-18 Thread kys
From: K. Y. Srinivasan Some miscellaneous fixes. Andy Shevchenko (1): vmbus: Reuse uuid_le_to_bin() helper K. Y. Srinivasan (2): Drivers: hv: vmbus: Get the current time from the current clocksource drivers: hv: vmbus: Increase the time between retries in vmbus_post_msg() Michael Kel

[PATCH 6/6] Drivers: hv: vmbus: Close timing hole that can corrupt per-cpu page

2017-05-18 Thread kys
From: Michael Kelley Extend the disabling of preemption to include the hypercall so that another thread can't get the CPU and corrupt the per-cpu page used for hypercall arguments. Cc: #4.11 Signed-off-by: Michael Kelley Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv.c |7 ++- 1 f

[PATCH 2/6] hv_utils: drop .getcrosststamp() support from PTP driver

2017-05-18 Thread kys
From: Vitaly Kuznetsov Turns out that our implementation of .getcrosststamp() never actually worked. Hyper-V is sending time samples every 5 seconds and this is too much for get_device_system_crosststamp() as it's interpolation algorithm (which nobody is currently using in kernel, btw) accounts f

[PATCH 1/6] Drivers: hv: vmbus: Get the current time from the current clocksource

2017-05-18 Thread kys
From: K. Y. Srinivasan The current code uses the MSR based mechanism to get the current tick. Use the current clock source as that might be more optimal. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h |1 - drivers/hv/hv.c |2 +- 2 files changed, 1

[PATCH 3/6] hv_utils: fix TimeSync work on pre-TimeSync-v4 hosts

2017-05-18 Thread kys
From: Vitaly Kuznetsov It was found that ICTIMESYNCFLAG_SYNC packets are handled incorrectly on WS2012R2, e.g. after the guest is paused and resumed its time is set to something different from host's time. The problem is that we call adj_guesttime() with reftime=0 for these old hosts and we don't

[PATCH 4/6] drivers: hv: vmbus: Increase the time between retries in vmbus_post_msg()

2017-05-18 Thread kys
From: K. Y. Srinivasan Commit c0bb03924f1a ("Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()") increased the retry/wait limits of vmbus_post_msg() to address the new DoS protection policies in WS2016. Increase the time between retries to make the code more robust. Signed-off-by:

[PATCH 5/6] vmbus: Reuse uuid_le_to_bin() helper

2017-05-18 Thread kys
From: Andy Shevchenko Instead of open coded variant use generic helper to convert UUID strings to binary format. Signed-off-by: Andy Shevchenko Signed-off-by: K. Y. Srinivasan --- drivers/hv/vmbus_drv.c | 51 +-- 1 files changed, 10 insertions(+),

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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

<    1   2   3   4   5   >