Received: from eggs.gnu.org ([208.118.235.92]:33909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQIWn-0003c9-34 for qemu-devel@nongnu.org; Thu, 11 Apr 2013 10:31:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQIWk-0006kZ-JQ for qemu-devel@nongnu.org; Thu, 11 Apr 2013 10:31:04 -0400 Received: from greensocs.com ([87.106.252.221]:49300 helo=s15328186.onlinehome-server.info) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQIWk-0006kP-E6 for qemu-devel@nongnu.org; Thu, 11 Apr 2013 10:31:02 -0400 From: fred.konrad@greensocs.com Date: Thu, 11 Apr 2013 16:29:56 +0200 Message-Id: <1365690602-22729-2-git-send-email-fred.konrad@greensocs.com> In-Reply-To: <1365690602-22729-1-git-send-email-fred.konrad@greensocs.com> References: <1365690602-22729-1-git-send-email-fred.konrad@greensocs.com> Subject: [Qemu-devel] [PATCH v3 1/7] virtio: add two functions to VirtioDeviceClass. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com, qemu-devel@nongnu.org Cc: cornelia.huck@de.ibm.com, peter.maydell@linaro.org, mark.burton@greensocs.com, fred.konrad@greensocs.com From: KONRAD Frederic Recent changes need two functions to VirtioDevice. This just add them into VirtioDeviceClass. Signed-off-by: KONRAD Frederic --- include/hw/virtio/virtio.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 7e24b2b..b21e5c2 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -171,6 +171,18 @@ typedef struct VirtioDeviceClass { void (*set_config)(VirtIODevice *vdev, const uint8_t *config); void (*reset)(VirtIODevice *vdev); void (*set_status)(VirtIODevice *vdev, uint8_t val); + /* Test and clear event pending status. + * Should be called after unmask to avoid losing events. + * If backend does not support masking, + * must check in frontend instead. + */ + bool (*guest_notifier_pending)(VirtIODevice *vdev, int n); + /* Mask/unmask events from this vq. Any events reported + * while masked will become pending. + * If backend does not support masking, + * must mask in frontend instead. + */ + void (*guest_notifier_mask)(VirtIODevice *vdev, int n, bool mask); } VirtioDeviceClass; void virtio_init(VirtIODevice *vdev, const char *name, -- 1.8.1.4