[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] irq assignment
From: |
Avi Kivity |
Subject: |
[Qemu-devel] Re: [PATCH] irq assignment |
Date: |
Wed, 25 Jun 2008 14:53:20 +0300 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080501) |
(copying qemu-devel)
Xu, Anthony wrote:
Subject: [PATCH] Irq assignment
1. use bimodal _PRT
2. pci device can use irq > 15, reduce interrupt sharing
3. test by running linux guest in kvm-ia64, kvm-i32(w/ wo/ -no-kvm)
+
+static int ioapic_irq_count[IOAPIC_NUM_PINS];
+
void ioapic_set_irq(void *opaque, int vector, int level)
{
IOAPICState *s = opaque;
-
+ if( vector >= 16 ){
+ if( level )
+ ioapic_irq_count[vector] += 1;
+ else
+ ioapic_irq_count[vector] -= 1;
+ level = (ioapic_irq_count[vector] != 0);
+ }
+#ifdef KVM_CAP_IRQCHIP
+ if (kvm_enabled())
+ if (kvm_set_irq(vector, ioapic_irq_count[vector] == 0))
+ return;
+#endif
It's legal to call ioapic_set_irq(vector, 1) twice, which will screw up
the level calculation.
We need qemu_irq_or(), similar to qemu_irq_invert():
qemu_irq qemu_irq_or(qemu_irq irqs[], int nr);
Also, this is not the place for doing the or. The ioapic does not know
which interrupts are level connected and which are not. This belongs on
the pci level (or the mainboard level).
--
error compiling committee.c: too many arguments to function
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] Re: [PATCH] irq assignment,
Avi Kivity <=