]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack
authorAndrey Smetanin <asmetanin@virtuozzo.com>
Mon, 30 Nov 2015 16:22:20 +0000 (19:22 +0300)
committerKamal Mostafa <kamal@canonical.com>
Wed, 13 Jul 2016 15:58:19 +0000 (08:58 -0700)
commitb7ee7a8742ec6d98c9e9fed7579fa8975c63a40c
tree53cfba1db892308dd311f74bf2dbd05ec2e36275
parent49306d70623ee0c7630e8051ddd811b69a17c646
kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

BugLink: http://bugs.launchpad.net/bugs/1583357
The SynIC message protocol mandates that the message slot is claimed
by atomically setting message type to something other than HVMSG_NONE.
If another message is to be delivered while the slot is still busy,
message pending flag is asserted to indicate to the guest that the
hypervisor wants to be notified when the slot is released.

To make sure the protocol works regardless of where the message
sources are (kernel or userspace), clear the pending flag on SINT ACK
notification, and let the message sources compete for the slot again.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
CC: Gleb Natapov <gleb@kernel.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: "K. Y. Srinivasan" <kys@microsoft.com>
CC: Haiyang Zhang <haiyangz@microsoft.com>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
CC: Roman Kagan <rkagan@virtuozzo.com>
CC: Denis V. Lunev <den@openvz.org>
CC: qemu-devel@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 765eaa0f70eaa274ec8b815d8c210c20cf7b6dbc)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
arch/x86/kvm/hyperv.c
include/linux/kvm_host.h