From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH stable-1.1] qemu-kvm: virtio: Do not register mask notifiers without in-kernel irqchip support Date: Mon, 2 Jul 2012 12:12:17 +0300 Message-ID: <20120702091217.GE8268@redhat.com> References: <4FF15653.7020506@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Marcelo Tosatti , kvm , Michael Tokarev To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:53080 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932730Ab2GBJMW (ORCPT ); Mon, 2 Jul 2012 05:12:22 -0400 Content-Disposition: inline In-Reply-To: <4FF15653.7020506@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Jul 02, 2012 at 10:05:39AM +0200, Jan Kiszka wrote: > We crash if we registers mask notifiers without backing in-kernel > irqchip. This corresponds to the check in QEMU upstream after 1.1 now. > > Signed-off-by: Jan Kiszka Acked-by: Michael S. Tsirkin > --- > > Not needed for master as we have upstream logic there already. > > hw/virtio-pci.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c > index a0c2ca7..5b64356 100644 > --- a/hw/virtio-pci.c > +++ b/hw/virtio-pci.c > @@ -629,7 +629,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign) > > /* Must unset mask notifier while guest notifier > * is still assigned */ > - if (!assign) { > + if (kvm_irqchip_in_kernel() && !assign) { > r = msix_unset_mask_notifier(&proxy->pci_dev); > assert(r >= 0); > } > @@ -647,7 +647,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign) > > /* Must set mask notifier after guest notifier > * has been assigned */ > - if (assign) { > + if (kvm_irqchip_in_kernel() && assign) { > r = msix_set_mask_notifier(&proxy->pci_dev, > virtio_pci_mask_notifier); > if (r < 0) { > -- > 1.7.3.4