mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
pseries: Add support for level interrupts to XICS
The pseries "xics" interrupt controller, like most interrupt controllers can support both message (i.e. edge sensitive) interrupts and level sensitive interrupts, but it needs to know which are which. When I implemented the xics emulation for qemu, the only devices we supported were the PAPR virtual IO devices. These devices only use message interrupts, so they were the only ones I implemented in xics. Since then, however, we have added support for PCI devices, which use level sensitive interrupts. It turns out the message interrupt logic still actually works most of the time for these, but there are circumstances where we can lost interrupts due to the incorrect interrupt logic. This patch, therefore, implements the correct xics level-sensitive interrupt logic. The type of the interrupt is set when a device allocates a new xics interrupt. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
eb6ea4b22e
commit
d07fee7e8a
6 changed files with 127 additions and 48 deletions
|
@ -83,7 +83,8 @@
|
|||
|
||||
sPAPREnvironment *spapr;
|
||||
|
||||
qemu_irq spapr_allocate_irq(uint32_t hint, uint32_t *irq_num)
|
||||
qemu_irq spapr_allocate_irq(uint32_t hint, uint32_t *irq_num,
|
||||
enum xics_irq_type type)
|
||||
{
|
||||
uint32_t irq;
|
||||
qemu_irq qirq;
|
||||
|
@ -95,7 +96,7 @@ qemu_irq spapr_allocate_irq(uint32_t hint, uint32_t *irq_num)
|
|||
irq = spapr->next_irq++;
|
||||
}
|
||||
|
||||
qirq = xics_find_qirq(spapr->icp, irq);
|
||||
qirq = xics_assign_irq(spapr->icp, irq, type);
|
||||
if (!qirq) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue