[PATCH V2 1/1] Revert "Drivers: hv: ring_buffer: count on wrap around mappings in get_next_pkt_raw()"

2016-09-06 Thread kys
From: K. Y. Srinivasan To deal with the merge conflict between net-next and char-misc trees, revert commit bb08d431a914 from char-misc tree. This commit can be rebased and applied once net-next picks up char-misc changes. Here is the commit log of the reverted patch: "With wrap around mappings i

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

2016-09-07 Thread kys
From: K. Y. Srinivasan Some miscellaneous fixes. Dexuan Cui (1): Drivers: hv: vmbus: suppress some "hv_vmbus: Unknown GUID" warnings Stephen Hemminger (1): Driver: hv: vmbus: Make mmio resource local drivers/hv/channel_mgmt.c | 26 -- drivers/hv/vmbus_drv.c|

[PATCH 1/2] Driver: hv: vmbus: Make mmio resource local

2016-09-07 Thread kys
From: Stephen Hemminger This fixes a sparse warning because hyperv_mmio resources are only used in this one file and should be static. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/vmbus_drv.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) dif

[PATCH 2/2] Drivers: hv: vmbus: suppress some "hv_vmbus: Unknown GUID" warnings

2016-09-07 Thread kys
From: Dexuan Cui Some VMBus devices are not needed by Linux guest[1][2], and, VMBus channels of Hyper-V Sockets don't really mean usual synthetic devices, so let's suppress the warnings for them. [1] https://support.microsoft.com/en-us/kb/2925727 [2] https://msdn.microsoft.com/en-us/library/jj98

[PATCH 0/3] Drivers: hv: util: Support the latest time synch protocol from the host

2016-09-08 Thread kys
From: K. Y. Srinivasan WS2016 has introduced a new protocol for conditioning guest clock. Support this new protocol. Alex Ng (3): Drivers: hv: utils: Rename version definitions to reflect protocol version. Drivers: hv: utils: Use TimeSync samples to adjust the clock after boot. Dri

[PATCH 1/3] Drivers: hv: utils: Rename version definitions to reflect protocol version.

2016-09-08 Thread kys
From: Alex Ng Different Windows host versions may reuse the same protocol version when negotiating the TimeSync, Shutdown, and Heartbeat protocols. We should only refer to the protocol version to avoid conflating the two concepts. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan --- dri

[PATCH 2/3] Drivers: hv: utils: Use TimeSync samples to adjust the clock after boot.

2016-09-08 Thread kys
From: Alex Ng Only the first 50 samples after boot were being used to discipline the clock. After the first 50 samples, any samples from the host were ignored and the guest clock would eventually drift from the host clock. This patch allows TimeSync-enabled guests to continuously synchronize the

[PATCH 3/3] Drivers: hv: utils: Support TimeSync version 4.0 protocol samples.

2016-09-08 Thread kys
From: Alex Ng This enables support for more accurate TimeSync v4 samples when hosted under Windows Server 2016 and newer hosts. The new time samples include a "vmreferencetime" field that represents the guest's TSC value when the host generated its time sample. This value lets the guest calculat

[PATCH 1/1] Drivers: hv: hv_util: Avoid dynamic allocation in time synch

2016-09-08 Thread kys
From: Vivek yadav Under stress, we have seen allocation failure in time synch code. Avoid this dynamic allocation. Signed-off-by: Vivek Yadav Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_util.c | 39 --- 1 files changed, 28 insertions(+), 11 deletion

[PATCH 0/7] Drivers: hv: Some miscellaneous fixes

2016-09-02 Thread kys
From: K. Y. Srinivasan Some miscellaneous fixes and enhancements. These patches were all sent earlier but failed to apply clean on Greg's tree. These have now been rebased. Alex Ng (2): Drivers: hv: utils: Continue to poll VSS channel after handling requests. Drivers: hv: utils: Check VS

[PATCH 4/7] Drivers: hv: ring_buffer: count on wrap around mappings in get_next_pkt_raw()

2016-09-02 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() Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Teste

[PATCH 7/7] Drivers: hv: utils: Check VSS daemon is listening before a hot backup

2016-09-02 Thread kys
From: Alex Ng Hyper-V host will send a VSS_OP_HOT_BACKUP request to check if guest is ready for a live backup/snapshot. The driver should respond to the check only if the daemon is running and listening to requests. This allows the host to fallback to standard snapshots in case the VSS daemon is

[PATCH 2/7] Drivers: hv: ring_buffer: wrap around mappings for ring buffers

2016-09-02 Thread kys
From: Vitaly Kuznetsov Make it possible to always use a single memcpy() or to provide a direct link to a packet on the ring buffer by creating virtual mapping for two copies of the ring buffer with vmap(). Utilize currently empty hv_ringbuffer_cleanup() to do the unmap. While on it, replace size

[PATCH 5/7] Drivers: hv: Introduce a policy for controlling channel affinity

2016-09-02 Thread kys
From: K. Y. Srinivasan Introduce a mechanism to control how channels will be affinitized. We will support two policies: 1. HV_BALANCED: All performance critical channels will be dstributed evenly amongst all the available NUMA nodes. Once the Node is assigned, we will assign the CPU based on a s

[PATCH 3/7] Drivers: hv: ring_buffer: use wrap around mappings in hv_copy{from,to}_ringbuffer()

2016-09-02 Thread kys
From: Vitaly Kuznetsov With wrap around mappings for ring buffers we can always use a single memcpy() to do the job. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Tested-by: Dexuan Cui --- drivers/hv/ring_buffer.c | 24 +++- 1 files changed, 3 insertio

[PATCH 1/7] Drivers: hv: cleanup vmbus_open() for wrap around mappings

2016-09-02 Thread kys
From: Vitaly Kuznetsov In preparation for doing wrap around mappings for ring buffers cleanup vmbus_open() function: - check that ring sizes are PAGE_SIZE aligned (they are for all in-kernel drivers now); - kfree(open_info) on error only after we kzalloc() it (not an issue as it is valid to c

[PATCH 6/7] Drivers: hv: utils: Continue to poll VSS channel after handling requests.

2016-09-02 Thread kys
From: Alex Ng Multiple VSS_OP_HOT_BACKUP requests may arrive in quick succession, even though the host only signals once. The driver wass handling the first request while ignoring the others in the ring buffer. We should poll the VSS channel after handling a request to continue processing other r

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

2016-08-24 Thread kys
From: K. Y. Srinivasan Miscellaneous fixes to the balloon driver. Alex Ng (1): Drivers: hv: balloon: Use available memory value in pressure report Vitaly Kuznetsov (4): Drivers: hv: balloon: keep track of where ha_region starts Drivers: hv: balloon: account for gaps in hot add regions D

[PATCH 3/5] Drivers: hv: balloon: don't wait for ol_waitevent when memhp_auto_online is enabled

2016-08-24 Thread kys
From: Vitaly Kuznetsov With the recently introduced in-kernel memory onlining (MEMORY_HOTPLUG_DEFAULT_ONLINE) these is no point in waiting for pages to come online in the driver and we can get rid of the waiting. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/h

[PATCH 1/5] Drivers: hv: balloon: keep track of where ha_region starts

2016-08-24 Thread kys
From: Vitaly Kuznetsov Windows 2012 (non-R2) does not specify hot add region in hot add requests and the logic in hot_add_req() is trying to find a 128Mb-aligned region covering the request. It may also happen that host's requests are not 128Mb aligned and the created ha_region will start before

[PATCH 5/5] Drivers: hv: balloon: Use available memory value in pressure report

2016-08-24 Thread kys
From: Alex Ng Reports for available memory should use the si_mem_available() value. The previous freeram value does not include available page cache memory. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_balloon.c | 13 + 1 files changed, 5 insertions(+

[PATCH 2/5] Drivers: hv: balloon: account for gaps in hot add regions

2016-08-24 Thread kys
From: Vitaly Kuznetsov I'm observing the following hot add requests from the WS2012 host: hot_add_req: start_pfn = 0x108200 count = 330752 hot_add_req: start_pfn = 0x158e00 count = 193536 hot_add_req: start_pfn = 0x188400 count = 239616 As the host doesn't specify hot add regions we're trying t

[PATCH 4/5] Drivers: hv: balloon: replace ha_region_mutex with spinlock

2016-08-24 Thread kys
From: Vitaly Kuznetsov lockdep reports possible circular locking dependency when udev is used for memory onlining: systemd-udevd/3996 is trying to acquire lock: ((memory_chain).rwsem){.+}, at: [] __blocking_notifier_call_chain+0x4e/0xc0 but task is already holding lock: (&dm_device.h

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

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

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

[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 --- drivers/hv/ring_buffer

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

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

[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/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 Documentation/ABI/stable/sysfs-

[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 --- Documentation/ABI/stable/sysf

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

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

[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 a/drivers/hv/c

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

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

[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 ++ drivers/hv/hv_t

[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 a/drivers/hv/channe

[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 a/drivers/h

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

[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 a/drivers/hv/channel

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

[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 b/d

[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 a/drivers/hv/channel_

[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 b/driver

[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 a/drivers/hv/channel_mg

[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 a/drivers/hv/c

[PATCH 0/5] Miscellaneous fixes/enhancements

2018-08-10 Thread kys
From: "K. Y. Srinivasan" Miscellaneous fixes/enhancements. K. Y. Srinivasan (1): Tools: hv: Fix a bug in the key delete code Michael Kelley (1): Drivers: hv: vmbus: Fix synic per-cpu context initialization Stephen Hemminger (3): vmbus: add driver_override support uio_hv_generic: increa

[PATCH 5/5] Drivers: hv: vmbus: Fix synic per-cpu context initialization

2018-08-10 Thread kys
From: Michael Kelley If hv_synic_alloc() errors out, the state of the per-cpu context for some CPUs is unknown since the zero'ing is done as each CPU is iterated over. In such case, hv_synic_cleanup() may try to free memory based on uninitialized values. Fix this by zero'ing the per-cpu context

[PATCH 1/5] Tools: hv: Fix a bug in the key delete code

2018-08-10 Thread kys
From: "K. Y. Srinivasan" Fix a bug in the key delete code - the num_records range from 0 to num_records-1. Signed-off-by: K. Y. Srinivasan Reported-by: David Binderman Cc: --- tools/hv/hv_kvp_daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/hv/hv_kvp_daemon.

[PATCH 4/5] uio_hv_generic: drop #ifdef DEBUG

2018-08-10 Thread kys
From: Stephen Hemminger DEBUG is leftover from the development phase, remove it. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/uio/uio_hv_generic.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c ind

[PATCH 3/5] uio_hv_generic: increase size of receive and send buffers

2018-08-10 Thread kys
From: Stephen Hemminger When using DPDK there is significant performance boost by using the largest possible send and receive buffer area. Unfortunately, with UIO model there is not a good way to configure this at run time. But it is okay to have a bigger buffer available even if application onl

[PATCH 2/5] vmbus: add driver_override support

2018-08-10 Thread kys
From: Stephen Hemminger Add support for overriding the default driver for a VMBus device in the same way that it can be done for PCI devices. This patch adds the /sys/bus/vmbus/devices/.../driver_override file and the logic for matching. This is used by driverctl tool to do driver override. http

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

2018-07-28 Thread kys
From: "K. Y. Srinivasan" Miscellaneous fixes/enhancements Stephen Hemminger (1): Drivers: hv: vmbus: add numa_node to sysfs Sunil Muthuswamy (3): Drivers: hv: vmus: Fix the check for return value from kmsg get dump buffer Drivers: hv: vmbus: Fix the issue with freeing up hv_ctl_table_

[PATCH 1/4] Drivers: hv: vmus: Fix the check for return value from kmsg get dump buffer

2018-07-28 Thread kys
From: Sunil Muthuswamy The code to support panic control message was checking the return was checking the return value from kmsg_dump_get_buffer as error value, which is not what the routine returns. This fixes it. Fixes: 81b18bce48af ("Drivers: HV: Send one page worth of kmsg dump over Hyper-V

[PATCH 3/4] Drivers: hv: vmbus: Get rid of MSR access from vmbus_drv.c

2018-07-28 Thread kys
From: Sunil Muthuswamy Get rid of ISA specific code from vmus_drv.c which is common code. Fixes: 81b18bce48af ("Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic") Signed-off-by: Sunil Muthuswamy Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h | 3 +

[PATCH 4/4] Drivers: hv: vmbus: add numa_node to sysfs

2018-07-28 Thread kys
From: Stephen Hemminger Being able to find the numa_node for a device is useful for userspace drivers (DPDK) and also for diagnosing performance issues. This makes vmbus similar to pci. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- Documentation/ABI/stable/sysfs-bus-vm

[PATCH 2/4] Drivers: hv: vmbus: Fix the issue with freeing up hv_ctl_table_hdr

2018-07-28 Thread kys
From: Sunil Muthuswamy The check to free the Hyper-V control table header was reversed. This fixes it. Fixes: 81b18bce48af ("Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic") Signed-off-by: Sunil Muthuswamy Signed-off-by: K. Y. Srinivasan --- drivers/hv/vmbus_drv.c |

[PATCH 1/1] x86/hyper-v: Fix a merge error

2018-07-19 Thread kys
From: "K. Y. Srinivasan" When the mapping betwween the Linux notion of CPU ID to the hypervisor's notion of CPU ID is not initialized, we should fall back on the non-enligghtened path for IPI. A merge error introduced this bug; fix it. Fixes: 1268ed0c474a ("Merge branch 'x86/urgent' into x86/hyp

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

2018-08-01 Thread kys
From: "K. Y. Srinivasan" Miscellaneous fixes. Dexuan Cui (1): Drivers: hv: vmbus: Reset the channel callback in vmbus_onoffer_rescind() Michael Kelley (2): Drivers: hv: vmbus: Remove use of slow_virt_to_phys() Drivers: hv: vmbus: Cleanup synic memory free path drivers/hv/channel.c

[PATCH 3/3] Drivers: hv: vmbus: Cleanup synic memory free path

2018-08-01 Thread kys
From: Michael Kelley clk_evt memory is not being freed when the synic is shutdown or when there is an allocation error. Add the appropriate kfree() call, along with a comment to clarify how the memory gets freed after an allocation error. Make the free path consistent by removing checks for NUL

[PATCH 2/3] Drivers: hv: vmbus: Remove use of slow_virt_to_phys()

2018-08-01 Thread kys
From: Michael Kelley slow_virt_to_phys() is only implemented for arch/x86. Remove its use in arch independent Hyper-V drivers, and replace with test for vmalloc() address followed by appropriate v-to-p function. This follows the typical pattern of other drivers and avoids the need to implement sl

[PATCH 1/3] Drivers: hv: vmbus: Reset the channel callback in vmbus_onoffer_rescind()

2018-08-01 Thread kys
From: Dexuan Cui Before setting channel->rescind in vmbus_rescind_cleanup(), we should make sure the channel callback won't run any more, otherwise a high-level driver like pci_hyperv, which may be infinitely waiting for the host VSP's response and notices the channel has been rescinded, can't sa

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

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

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

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

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

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

[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 a/d

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

[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/1] Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic

2018-07-07 Thread kys
From: Sunil Muthuswamy In the VM mode on Hyper-V, currently, when the kernel panics, an error code and few register values are populated in an MSR and the Hypervisor notified. This information is collected on the host. The amount of information currently collected is found to be limited and not v

[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 1/1] X86: Fix the circular dependency in IPI enlightenment.

2018-07-03 Thread kys
From: "K. Y. Srinivasan" The IPI hypercalls depend on being able to map the Linux notion of CPU ID to the hypervisor's notion of the CPU ID. The array hv_vp_index[] provides this mapping. Code for populating this array depends on the IPI functionality. Break this circular dependency. Fixes: 68bb

[PATCH 1/1] X86/Hyper-V:: Fix the circular dependency in IPI enlightenment.

2018-07-03 Thread kys
From: "K. Y. Srinivasan" The IPI hypercalls depend on being able to map the Linux notion of CPU ID to the hypervisor's notion of the CPU ID. The array hv_vp_index[] provides this mapping. Code for populating this array depends on the IPI functionality. Break this circular dependency. Fixes: 68bb

[PATCH] vmbus: don't return values for uninitalized channels

2018-08-20 Thread kys
From: Stephen Hemminger For unsupported device types, the vmbus channel ringbuffer is never initialized, and therefore reading the sysfs files will return garbage or cause a kernel OOPS. Fixes: c2e5df616e1a ("vmbus: add per-channel sysfs info") Signed-off-by: Stephen Hemminger Signed-off-by: K

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

2018-10-16 Thread kys
From: "K. Y. Srinivasan" Miscellaneous fixes. Dexuan Cui (3): Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up Drivers: hv: kvp: Use %u to print U32 Tools: hv: kvp: Fix a warning of buffer overflow with gcc 8.0.1 Haiyang Zhang (1): hv_utils: update name in st

[PATCH 4/5] Drivers: hv: kvp: Use %u to print U32

2018-10-16 Thread kys
From: Dexuan Cui I didn't find a real issue. Let's just make it consistent with the next "case REG_U64:" where %llu is used. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_kvp.c | 2 +- 1 file ch

[PATCH 5/5] Tools: hv: kvp: Fix a warning of buffer overflow with gcc 8.0.1

2018-10-16 Thread kys
From: Dexuan Cui The patch fixes: hv_kvp_daemon.c: In function 'kvp_set_ip_info': hv_kvp_daemon.c:1305:2: note: 'snprintf' output between 41 and 4136 bytes into a destination of size 4096 Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Signed-off-

[PATCH 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-10-16 Thread kys
From: Dexuan Cui In kvp_send_key(), we do need call process_ib_ipinfo() if message->kvp_hdr.operation is KVP_OP_GET_IP_INFO, because it turns out the userland hv_kvp_daemon needs the info of operation, adapter_id and addr_family. With the incorrect fc62c3b1977d, the host can't get the VM's IP via

[PATCH 1/5] Drivers: hv: vmbus: Get rid of unnecessary state in hv_context

2018-10-16 Thread kys
From: "K. Y. Srinivasan" Currently we are replicating state in struct hv_context that is unnecessary - this state can be retrieved from the hypervisor. Furthermore, this is a per-cpu state that is being maintained as a global state in struct hv_context. Get rid of this state in struct hv_context.

[PATCH 2/5] hv_utils: update name in struct hv_driver util_drv

2018-10-16 Thread kys
From: Haiyang Zhang The correct module name is hv_utils. This patch corrects the name in struct hv_driver util_drv. Signed-off-by: Haiyang Zhang Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/hv_util.c b/

[PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-10-17 Thread kys
From: Dexuan Cui In kvp_send_key(), we do need call process_ib_ipinfo() if message->kvp_hdr.operation is KVP_OP_GET_IP_INFO, because it turns out the userland hv_kvp_daemon needs the info of operation, adapter_id and addr_family. With the incorrect fc62c3b1977d, the host can't get the VM's IP via

[PATCH V2 5/5] Tools: hv: kvp: Fix a warning of buffer overflow with gcc 8.0.1

2018-10-17 Thread kys
From: Dexuan Cui The patch fixes: hv_kvp_daemon.c: In function 'kvp_set_ip_info': hv_kvp_daemon.c:1305:2: note: 'snprintf' output between 41 and 4136 bytes into a destination of size 4096 The "(unsigned int)str_len" is to avoid: hv_kvp_daemon.c:1309:30: warning: comparison of integer expressio

[PATCH V2 2/5] hv_utils: update name in struct hv_driver util_drv

2018-10-17 Thread kys
From: Haiyang Zhang The correct module name is hv_utils. This patch corrects the name in struct hv_driver util_drv. Signed-off-by: Haiyang Zhang Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/hv_util.c b/

[PATCH V2 1/5] Drivers: hv: vmbus: Get rid of unnecessary state in hv_context

2018-10-17 Thread kys
From: "K. Y. Srinivasan" Currently we are replicating state in struct hv_context that is unnecessary - this state can be retrieved from the hypervisor. Furthermore, this is a per-cpu state that is being maintained as a global state in struct hv_context. Get rid of this state in struct hv_context.

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

2018-10-17 Thread kys
From: "K. Y. Srinivasan" Miscellaneous fixes. V2: Addressed comments from Greg. Dexuan Cui (3): Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up Drivers: hv: kvp: Use %u to print U32 Tools: hv: kvp: Fix a warning of buffer overflow with gcc 8.0.1 Haiyang Zhang

[PATCH V2 4/5] Drivers: hv: kvp: Use %u to print U32

2018-10-17 Thread kys
From: Dexuan Cui I didn't find a real issue. Let's just make it consistent with the next "case REG_U64:" where %llu is used. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_kvp.c | 2 +- 1 file changed

[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 +--- tools/hv/hv_fcopy_daemon.

[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 --- tools/hv/

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

  1   2   3   4   5   >