[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 24/37] pc: keep gsi reference
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH 24/37] pc: keep gsi reference |
Date: |
Tue, 19 Jul 2016 12:54:19 +0400 |
From: Marc-André Lureau <address@hidden>
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é Lureau <address@hidden>
---
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 = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS);
}
+ machine->gsi = gsi;
if (pcmc->pci_enabled) {
pci_bus = 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 = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS);
}
+ machine->gsi = gsi;
/* create pci host bus */
q35_host = 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;
/*< public >*/
--
2.9.0
- Re: [Qemu-devel] [PATCH 18/37] acpi-build: fix array leak, (continued)
[Qemu-devel] [PATCH 19/37] char: disconnect peer when qemu_chr_free(), marcandre . lureau, 2016/07/19
[Qemu-devel] [PATCH 20/37] char: free MuxDriver when closing, marcandre . lureau, 2016/07/19
[Qemu-devel] [PATCH 21/37] tests: fix qom-test leaks, marcandre . lureau, 2016/07/19
[Qemu-devel] [PATCH 22/37] pc: free i8259, marcandre . lureau, 2016/07/19
[Qemu-devel] [PATCH 23/37] pci-bus: do not allocate and leak bsel, marcandre . lureau, 2016/07/19
[Qemu-devel] [PATCH 24/37] pc: keep gsi reference,
marcandre . lureau <=
[Qemu-devel] [PATCH 25/37] ahci: free irqs array, marcandre . lureau, 2016/07/19
[Qemu-devel] [PATCH 26/37] sd: free timer, marcandre . lureau, 2016/07/19