mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
xics: Handle KVM interrupt presentation from "simple" ICS code
We want to use the "simple" ICS type in both KVM and non-KVM setups. Teach the "simple" ICS how to present interrupts to KVM and adapt sPAPR accordingly. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <155023082996.1011724.16237920586343905010.stgit@bahia.lan> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
f1f5b701b8
commit
557b456729
4 changed files with 8 additions and 9 deletions
|
@ -466,6 +466,11 @@ void ics_simple_set_irq(void *opaque, int srcno, int val)
|
|||
{
|
||||
ICSState *ics = (ICSState *)opaque;
|
||||
|
||||
if (kvm_irqchip_in_kernel()) {
|
||||
ics_kvm_set_irq(ics, srcno, val);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ics->irqs[srcno].flags & XICS_FLAGS_IRQ_LSI) {
|
||||
ics_simple_set_irq_lsi(ics, srcno, val);
|
||||
} else {
|
||||
|
|
|
@ -259,9 +259,8 @@ int ics_set_kvm_state(ICSState *ics)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void ics_kvm_set_irq(void *opaque, int srcno, int val)
|
||||
void ics_kvm_set_irq(ICSState *ics, int srcno, int val)
|
||||
{
|
||||
ICSState *ics = opaque;
|
||||
struct kvm_irq_level args;
|
||||
int rc;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue