linux/drivers/hv
Vineeth Pillai b3f5d4e767 hv_utils: drain the timesync packets on onchannelcallback
commit b46b4a8a57 upstream.

There could be instances where a system stall prevents the timesync
packets to be consumed. And this might lead to more than one packet
pending in the ring buffer. Current code empties one packet per callback
and it might be a stale one. So drain all the packets from ring buffer
on each callback.

Signed-off-by: Vineeth Pillai <viremana@linux.microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20200821152849.99517-1-viremana@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
[ The old code in the upstream commit uses HV_HYP_PAGE_SIZE, but
  the old code in 5.4.y sitll uses PAGE_SIZE. Fixed this manually for 5.4.y.
  Note: 5.4.y already has the define HV_HYP_PAGE_SIZE, so the new code in
  in the upstream commit works for 5.4.y.
  If there are multiple messages in the host-to-guest ringbuffer of the TimeSync
  device, 5.4.y only handles 1 message, and later the host puts new messages
  into the ringbuffer without signaling the guest because the ringbuffer is not
  empty, causing a "hung" ringbuffer. Backported the mainline fix for this issue.]
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-05 09:08:20 +02:00
..
channel_mgmt.c Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs 2023-06-28 10:18:36 +02:00
channel.c Drivers: hv: vmbus: Fix virt_to_hvpfn() for X86_PAE 2019-08-20 12:49:57 -04:00
connection.c Drivers: hv: vmbus: Always handle the VMBus messages on CPU0 2020-06-22 09:31:00 +02:00
hv_balloon.c hv_balloon: rate-limit "Unhandled message" warning 2022-04-15 14:18:15 +02:00
hv_fcopy.c
hv_kvp.c
hv_snapshot.c
hv_trace_balloon.h
hv_trace.c
hv_trace.h tools: hv: Use the correct style for SPDX License Identifier 2019-08-17 15:29:34 -04:00
hv_util.c hv_utils: drain the timesync packets on onchannelcallback 2024-07-05 09:08:20 +02:00
hv_utils_transport.c
hv_utils_transport.h
hv.c Drivers: hv: vmbus: Allow cleanup of VMBUS_CONNECT_CPU if disconnected 2020-11-24 13:29:23 +01:00
hyperv_vmbus.h hyperv/vmbus: include linux/bitops.h 2021-11-17 09:48:20 +01:00
Kconfig clocksource/drivers/hyperv: Enable TSC page clocksource on 32bit 2019-08-23 16:59:54 +02:00
Makefile
ring_buffer.c Drivers: hv: vmbus: Prevent load re-ordering when reading ring buffer 2022-04-20 09:19:36 +02:00
vmbus_drv.c Drivers: hv: vmbus: fix possible memory leak in vmbus_device_register() 2022-12-08 11:22:58 +01:00