mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-06-15 18:05:49 +00:00
cb87229be5
The ARM GIC emulation needs to be told the number of interrupts
it has to support. As commit 1c262fa1dc7bc ("kvm tools: irq: make
irq__alloc_line generic") made the interrupt counter private,
add a new accessor returning the number of interrupt lines we've
allocated so far.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
15 lines
217 B
C
15 lines
217 B
C
#include "kvm/irq.h"
|
|
#include "kvm/kvm-arch.h"
|
|
|
|
static u8 next_line = KVM_IRQ_OFFSET;
|
|
|
|
int irq__alloc_line(void)
|
|
{
|
|
return next_line++;
|
|
}
|
|
|
|
int irq__get_nr_allocated_lines(void)
|
|
{
|
|
return next_line - KVM_IRQ_OFFSET;
|
|
}
|