From patchwork Mon May 6 15:00:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 241697 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 1D2242C00BF for ; Tue, 7 May 2013 01:01:40 +1000 (EST) Received: from localhost ([::1]:42369 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZMv4-0007s7-B0 for incoming@patchwork.ozlabs.org; Mon, 06 May 2013 11:01:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZMuF-0007Q8-Uq for qemu-devel@nongnu.org; Mon, 06 May 2013 11:00:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZMuC-0000Ln-Q6 for qemu-devel@nongnu.org; Mon, 06 May 2013 11:00:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZMuC-0000LT-E0 for qemu-devel@nongnu.org; Mon, 06 May 2013 11:00:44 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r46F0bW2009541 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 6 May 2013 11:00:38 -0400 Received: from redhat.com (vpn-201-190.tlv.redhat.com [10.35.201.190]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id r46F0UN5016304; Mon, 6 May 2013 11:00:33 -0400 Date: Mon, 6 May 2013 18:00:27 +0300 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <20130506150027.GA22689@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Peter Maydell , Paolo Bonzini , Anthony Liguori , "Michael S. Tsirkin" , KONRAD Frederic Subject: [Qemu-devel] [PATCH for-1.5] virtio-pci: bugfix 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 mask notifiers are never called without msix, so devices with backend masking like vhost don't work. Call mask notifiers explicitly at startup/cleanup to make it work. Signed-off-by: Michael S. Tsirkin Tested-by: Alexander Graf --- hw/virtio/virtio-pci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 8bba0f3..d0fcc6c 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -758,6 +758,10 @@ static int virtio_pci_set_guest_notifier(DeviceState *d, int n, bool assign, event_notifier_cleanup(notifier); } + if (!msix_enabled(&proxy->pci_dev) && proxy->vdev->guest_notifier_mask) { + proxy->vdev->guest_notifier_mask(proxy->vdev, n, !assign); + } + return 0; }