mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-24 00:18:36 -07:00
hw/intc/loongarch_pch: Inject irq line interrupt to kernel
If kvm_irqchip_in_kernel() return true, irq line interrupt can be injected with API kvm_set_irq() to KVM. Reviewed-by: Song Gao <gaosong@loongson.cn> Signed-off-by: Bibo Mao <maobibo@loongson.cn> Message-ID: <20250606063033.2557365-10-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
This commit is contained in:
parent
11a04c9f40
commit
0dd6798a1a
1 changed files with 5 additions and 0 deletions
|
|
@ -49,6 +49,11 @@ static void pch_pic_irq_handler(void *opaque, int irq, int level)
|
|||
assert(irq < s->irq_num);
|
||||
trace_loongarch_pch_pic_irq_handler(irq, level);
|
||||
|
||||
if (kvm_irqchip_in_kernel()) {
|
||||
kvm_set_irq(kvm_state, irq, !!level);
|
||||
return;
|
||||
}
|
||||
|
||||
if (s->intedge & mask) {
|
||||
/* Edge triggered */
|
||||
if (level) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue