kernel_optimize_test/drivers/hv
Vitaly Kuznetsov 97bf16cd30 Drivers: hv: kvp: switch to using the hvutil_device_state state machine
Switch to using the hvutil_device_state state machine from using 2 different state variables: kvp_transaction.active and
in_hand_shake.

State transitions are:
-> HVUTIL_DEVICE_INIT when driver loads or on device release
-> HVUTIL_READY if the handshake was successful
-> HVUTIL_HOSTMSG_RECEIVED when there is a non-negotiation message from the host
-> HVUTIL_USERSPACE_REQ after we sent the message to the userspace daemon
   -> HVUTIL_USERSPACE_RECV after/if the userspace daemon has replied
-> HVUTIL_READY after we respond to the host
-> HVUTIL_DEVICE_DYING on driver unload

In hv_kvp_onchannelcallback() process ICMSGTYPE_NEGOTIATE messages even when
the userspace daemon is disconnected, otherwise we can make the host think
we don't support KVP and disable the service completely.

Unfortunately there is no good way we can figure out that the userspace daemon
has died (unless we start treating all timeouts as such). In case the daemon
restarts we skip the negotiation procedure (so the daemon is supposed to has
the same version). This behavior is unchanged from in_handshake approach.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 12:17:41 -07:00
..
channel_mgmt.c hv: remove the per-channel workqueue 2015-04-03 16:18:02 +02:00
channel.c Drivers: hv: vmbus: Fix a siganlling host signalling issue 2015-03-25 11:53:55 +01:00
connection.c hv_vmbus: Add gradually increased delay for retries in vmbus_post_msg() 2015-04-03 16:18:02 +02:00
hv_balloon.c Drivers: hv: hv_balloon: correctly handle num_pages>INT_MAX case 2015-04-03 16:20:12 +02:00
hv_fcopy.c Drivers: hv: fcopy: rename fcopy_work -> fcopy_timeout_work 2015-05-24 12:17:40 -07:00
hv_kvp.c Drivers: hv: kvp: switch to using the hvutil_device_state state machine 2015-05-24 12:17:41 -07:00
hv_snapshot.c Drivers: hv: vss: process deferred messages when we complete the transaction 2015-05-24 12:17:40 -07:00
hv_util.c Drivers: hv: util: On device remove, close the channel after de-initializing the service 2015-03-01 19:31:02 -08:00
hv.c Drivers: hv: vmbus: Teardown clockevent devices on module unload 2015-03-01 19:30:07 -08:00
hyperv_vmbus.h Drivers: hv: util: introduce state machine for util drivers 2015-05-24 12:17:41 -07:00
Kconfig x86: Make Linux guest support optional 2013-03-04 13:14:25 -08:00
Makefile Drivers: hv: Implement the file copy service 2014-02-18 10:53:48 -08:00
ring_buffer.c Drivers: hv: vmbus: Enable interrupt driven flow control 2014-09-23 23:31:22 -07:00
vmbus_drv.c hv: run non-blocking message handlers in the dispatch tasklet 2015-04-03 16:18:01 +02:00