From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFnSv-000119-Iu for qemu-devel@nongnu.org; Mon, 17 Oct 2011 09:42:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFnSp-0006wW-Av for qemu-devel@nongnu.org; Mon, 17 Oct 2011 09:42:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFnSo-0006ri-PK for qemu-devel@nongnu.org; Mon, 17 Oct 2011 09:42:47 -0400 Date: Mon, 17 Oct 2011 15:43:49 +0200 From: "Michael S. Tsirkin" Message-ID: <20111017134349.GD6406@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [RFC][PATCH 11/45] msi: Factor out delivery hook List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Alex Williamson , Marcelo Tosatti , Avi Kivity , kvm@vger.kernel.org, qemu-devel@nongnu.org On Mon, Oct 17, 2011 at 11:27:45AM +0200, Jan Kiszka wrote: > diff --git a/hw/msi.c b/hw/msi.c > index 3c7ebc3..9055155 100644 > --- a/hw/msi.c > +++ b/hw/msi.c > @@ -40,6 +40,14 @@ > /* Flag for interrupt controller to declare MSI/MSI-X support */ > bool msi_supported; > > +static void msi_unsupported(MSIMessage *msg) > +{ > + /* If we get here, the board failed to register a delivery handler. */ > + abort(); > +} > + > +void (*msi_deliver)(MSIMessage *msg) = msi_unsupported; > + How about we set this to NULL, and check it instead of the bool flag? -- MSt