13 May, 2010
1 commit
-
kvm_set_irq is used from non sleepable contexes, so convert ioapic from
mutex to spinlock.KVM-Stable-Tag.
Tested-by: Ralf Bonenkamp
Signed-off-by: Marcelo Tosatti
01 Mar, 2010
2 commits
-
If we fail to init ioapic device or the fail to setup the default irq
routing, the device register by kvm_create_pic() and kvm_ioapic_init()
remain unregister. This patch fixed to do this.Signed-off-by: Wei Yongjun
Signed-off-by: Avi Kivity -
When the guest acknowledges an interrupt, it sends an EOI message to the local
apic, which broadcasts it to the ioapic. To handle the EOI, we need to take
the ioapic mutex.On large guests, this causes a lot of contention on this mutex. Since large
guests usually don't route interrupts via the ioapic (they use msi instead),
this is completely unnecessary.Avoid taking the mutex by introducing a handled_vectors bitmap. Before taking
the mutex, check if the ioapic was actually responsible for the acked vector.
If not, we can return early.Signed-off-by: Avi Kivity
Signed-off-by: Marcelo Tosatti
03 Dec, 2009
2 commits
-
The allows removal of irq_lock from the injection path.
Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
This removes assumptions that max GSIs is smaller than number of pins.
Sharing is tracked on pin level not GSI level.[avi: no PIC on ia64]
Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity
10 Jun, 2009
8 commits
-
Deliver interrupt during destination matching loop.
Signed-off-by: Gleb Natapov
Acked-by: Xiantao Zhang
Signed-off-by: Marcelo Tosatti -
The new way does not require additional loop over vcpus to calculate
the one with lowest priority as one is chosen during delivery bitmap
construction.Signed-off-by: Gleb Natapov
Signed-off-by: Marcelo Tosatti -
Use kvm_apic_match_dest() in kvm_get_intr_delivery_bitmask() instead
of duplicating the same code. Use kvm_get_intr_delivery_bitmask() in
apic_send_ipi() to figure out ipi destination instead of reimplementing
the logic.Signed-off-by: Gleb Natapov
Signed-off-by: Marcelo Tosatti -
ioapic_deliver() and kvm_set_msi() have code duplication. Move
the code into ioapic_deliver_entry() function and call it from
both places.Signed-off-by: Gleb Natapov
Signed-off-by: Marcelo Tosatti -
Gleb fixed bitmap ops usage in kvm_ioapic_get_delivery_bitmask.
Sheng merged two functions, as well as fixed several issues in
kvm_get_intr_delivery_bitmask
1. deliver_bitmask is a bitmap rather than a unsigned long intereger.
2. Lowest priority target bitmap wrong calculated by mistake.
3. Prevent potential NULL reference.
4. Declaration in include/kvm_host.h caused powerpc compilation warning.
5. Add warning for guest broadcast interrupt with lowest priority delivery mode.
6. Removed duplicate bitmap clean up in caller of kvm_get_intr_delivery_bitmask.Signed-off-by: Gleb Natapov
Signed-off-by: Sheng Yang
Signed-off-by: Marcelo Tosatti -
Would be used with bit ops, and would be easily extended if KVM_MAX_VCPUS is
increased.Signed-off-by: Sheng Yang
Signed-off-by: Avi Kivity -
In order to use with bit ops.
Signed-off-by: Sheng Yang
Signed-off-by: Avi Kivity -
Prepared for reuse ioapic_redir_entry for MSI.
Signed-off-by: Sheng Yang
Signed-off-by: Avi Kivity
24 Mar, 2009
1 commit
-
IRQ injection status is either -1 (if there was no CPU found
that should except the interrupt because IRQ was masked or
ioapic was misconfigured or ...) or >= 0 in that case the
number indicates to how many CPUs interrupt was injected.
If the value is 0 it means that the interrupt was coalesced
and probably should be reinjected.Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity
31 Dec, 2008
1 commit
-
It would be used for MSI in device assignment, for MSI dispatch.
Signed-off-by: Sheng Yang
Signed-off-by: Avi Kivity
15 Oct, 2008
2 commits
-
Moving irqchip_in_kernel() from ioapic.h to irq.h.
Signed-off-by: Xiantao Zhang
Signed-off-by: Avi Kivity -
Based on a patch from: Ben-Ami Yassour
which was based on a patch from: Amit ShahNotify IRQ acking on PIC/APIC emulation. The previous patch missed two things:
- Edge triggered interrupts on IOAPIC
- PIC reset with IRR/ISR set should be equivalent to ack (LAPIC probably
needs something similar).Signed-off-by: Marcelo Tosatti
CC: Amit Shah
CC: Ben-Ami Yassour
Signed-off-by: Avi Kivity
31 Jan, 2008
1 commit
-
Move ioapic code to common, since IA64 also needs it.
Signed-off-by: Zhang Xiantao
Signed-off-by: Avi Kivity