x86: rewrite gsi_handler()
commitceea95cd88c8f90ad93a83bbad4a077590316342
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 3 Dec 2020 10:54:13 +0000 (3 11:54 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 10 Dec 2020 07:47:44 +0000 (10 08:47 +0100)
tree7857345653dc1848fef9a9d3e763fc73ce533296
parent5e7b204dbfae9a562fc73684986f936b97f63877
x86: rewrite gsi_handler()

Rewrite function to use switch() for IRQ number mapping.
Check i8259_irq exists before raising it so the function
also works in case no i8259 (aka pic) is present.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 20201203105423.10431-3-kraxel@redhat.com
hw/i386/x86.c