HV: properly delay KVP packets when negotiation is in progress
authorLong Li <longli@microsoft.com>
Sun, 30 Apr 2017 23:21:19 +0000 (16:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 May 2017 14:55:28 +0000 (16:55 +0200)
commita3ade8cc474d848676278660e65f5af1e9e094d9
tree6a0c3a67af53338000238ca8048dec9c8c91a131
parent54a66265d6754b37fb4baf1d970ec88a6225a988
HV: properly delay KVP packets when negotiation is in progress

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 packets.

In addition, the host may send multiple staged
KVP requests as soon as negotiation is done.
We need to properly process those packets using one
tasklet for exclusive access to ring buffer.

This patch is based on the work of
Nick Meier <Nick.Meier@microsoft.com>.

Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/hv_kvp.c