From patchwork Thu Apr 11 14:29:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fred.konrad@greensocs.com X-Patchwork-Id: 235753 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2DF9F2C009C for ; Fri, 12 Apr 2013 00:31:35 +1000 (EST) Received: from localhost ([::1]:44000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQIXF-0003cV-20 for incoming@patchwork.ozlabs.org; Thu, 11 Apr 2013 10:31:33 -0400 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 Received: from localhost (unknown [127.0.0.1]) by s15328186.onlinehome-server.info (Postfix) with ESMTP id C0F7E40EC65; Thu, 11 Apr 2013 14:31:00 +0000 (UTC) Received: from s15328186.onlinehome-server.info ([127.0.0.1]) by localhost (s15328186.onlinehome-server.info [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 91gwjRVK6AF8; Thu, 11 Apr 2013 16:30:58 +0200 (CEST) Received: by s15328186.onlinehome-server.info (Postfix, from userid 491) id 93ACE40EC67; Thu, 11 Apr 2013 16:30:58 +0200 (CEST) Received: from localhost.localdomain (unknown [84.7.168.138]) by s15328186.onlinehome-server.info (Postfix) with ESMTPSA id C97F5400091; Thu, 11 Apr 2013 16:30:57 +0200 (CEST) From: fred.konrad@greensocs.com To: aliguori@us.ibm.com, qemu-devel@nongnu.org Date: Thu, 11 Apr 2013 16:29:56 +0200 Message-Id: <1365690602-22729-2-git-send-email-fred.konrad@greensocs.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1365690602-22729-1-git-send-email-fred.konrad@greensocs.com> References: <1365690602-22729-1-git-send-email-fred.konrad@greensocs.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 87.106.252.221 Cc: cornelia.huck@de.ibm.com, peter.maydell@linaro.org, mark.burton@greensocs.com, fred.konrad@greensocs.com Subject: [Qemu-devel] [PATCH v3 1/7] virtio: add two functions to VirtioDeviceClass. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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,