Message ID | 20201105133923.23821-7-kraxel@redhat.com |
---|---|
State | Accepted |
Commit | e57e9ae7992bde44d7938ca9a2ec0aa9c5f0bbb6 |
Headers | show |
Series | microvm: add second ioapic | expand |
On Thu, 5 Nov 2020 14:39:17 +0100 Gerd Hoffmann <kraxel@redhat.com> wrote: > With the improved gsi_handler() we don't need > our private version any more. > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> > --- > hw/i386/microvm.c | 14 +------------- > 1 file changed, 1 insertion(+), 13 deletions(-) > > diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c > index 5e4182b47464..829b376a1278 100644 > --- a/hw/i386/microvm.c > +++ b/hw/i386/microvm.c > @@ -96,13 +96,6 @@ static void microvm_set_rtc(MicrovmMachineState *mms, ISADevice *s) > rtc_set_memory(s, 0x5d, val >> 16); > } > > -static void microvm_gsi_handler(void *opaque, int n, int level) > -{ > - GSIState *s = opaque; > - > - qemu_set_irq(s->ioapic_irq[n], level); > -} > - > static void create_gpex(MicrovmMachineState *mms) > { > X86MachineState *x86ms = X86_MACHINE(mms); > @@ -163,12 +156,7 @@ static void microvm_devices_init(MicrovmMachineState *mms) > /* Core components */ > > gsi_state = g_malloc0(sizeof(*gsi_state)); > - if (mms->pic == ON_OFF_AUTO_ON || mms->pic == ON_OFF_AUTO_AUTO) { > - x86ms->gsi = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS); > - } else { > - x86ms->gsi = qemu_allocate_irqs(microvm_gsi_handler, > - gsi_state, GSI_NUM_PINS); > - } > + x86ms->gsi = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS); > > isa_bus = isa_bus_new(NULL, get_system_memory(), get_system_io(), > &error_abort);
diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 5e4182b47464..829b376a1278 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -96,13 +96,6 @@ static void microvm_set_rtc(MicrovmMachineState *mms, ISADevice *s) rtc_set_memory(s, 0x5d, val >> 16); } -static void microvm_gsi_handler(void *opaque, int n, int level) -{ - GSIState *s = opaque; - - qemu_set_irq(s->ioapic_irq[n], level); -} - static void create_gpex(MicrovmMachineState *mms) { X86MachineState *x86ms = X86_MACHINE(mms); @@ -163,12 +156,7 @@ static void microvm_devices_init(MicrovmMachineState *mms) /* Core components */ gsi_state = g_malloc0(sizeof(*gsi_state)); - if (mms->pic == ON_OFF_AUTO_ON || mms->pic == ON_OFF_AUTO_AUTO) { - x86ms->gsi = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS); - } else { - x86ms->gsi = qemu_allocate_irqs(microvm_gsi_handler, - gsi_state, GSI_NUM_PINS); - } + x86ms->gsi = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS); isa_bus = isa_bus_new(NULL, get_system_memory(), get_system_io(), &error_abort);
With the improved gsi_handler() we don't need our private version any more. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/i386/microvm.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)