Received: from eggs.gnu.org ([2001:4830:134:3::10]:46870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQol-0001Ez-3V for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:55:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPQok-0007lJ-6l for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:55:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQok-0007lD-0e for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:55:54 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8B28D7304C for ; Tue, 19 Jul 2016 08:55:53 +0000 (UTC) From: marcandre.lureau@redhat.com Date: Tue, 19 Jul 2016 12:54:19 +0400 Message-Id: <20160719085432.4572-25-marcandre.lureau@redhat.com> In-Reply-To: <20160719085432.4572-1-marcandre.lureau@redhat.com> References: <20160719085432.4572-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 24/37] pc: keep gsi reference List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= From: Marc-Andr=C3=A9 Lureau Further cleanup would need to call qemu_free_irq() at the appropriate time, but for now this silences ASAN about direct leaks. Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + include/hw/boards.h | 1 + 3 files changed, 3 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index a07dc81..b2db274 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -190,6 +190,7 @@ static void pc_init1(MachineState *machine, } else { gsi =3D qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS)= ; } + machine->gsi =3D gsi; =20 if (pcmc->pci_enabled) { pci_bus =3D i440fx_init(host_type, diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index c5e8367..5dfb14f 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -158,6 +158,7 @@ static void pc_q35_init(MachineState *machine) } else { gsi =3D qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS)= ; } + machine->gsi =3D gsi; =20 /* create pci host bus */ q35_host =3D Q35_HOST_DEVICE(qdev_create(NULL, TYPE_Q35_HOST_DEVICE)= ); diff --git a/include/hw/boards.h b/include/hw/boards.h index e46a744..289ba52 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -139,6 +139,7 @@ struct MachineState { /*< private >*/ Object parent_obj; Notifier sysbus_notifier; + qemu_irq *gsi; =20 /*< public >*/ =20 --=20 2.9.0