Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/xive: Add interrupt flag to disable automatic EOI

This will be used by KVM in order to keep escalation interrupts
in the non-EOI (masked) state after they fire. They will be
re-enabled directly in HW by KVM when needed.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Benjamin Herrenschmidt and committed by
Michael Ellerman
7f1c410d 12c1f339

+5 -1
+3
arch/powerpc/include/asm/xive.h
··· 58 58 #define XIVE_IRQ_FLAG_EOI_FW 0x10 59 59 #define XIVE_IRQ_FLAG_H_INT_ESB 0x20 60 60 61 + /* Special flag set by KVM for excalation interrupts */ 62 + #define XIVE_IRQ_NO_EOI 0x80 63 + 61 64 #define XIVE_INVALID_CHIP_ID -1 62 65 63 66 /* A queue tracking structure in a CPU */
+2 -1
arch/powerpc/sysdev/xive/common.c
··· 367 367 * EOI the source if it hasn't been disabled and hasn't 368 368 * been passed-through to a KVM guest 369 369 */ 370 - if (!irqd_irq_disabled(d) && !irqd_is_forwarded_to_vcpu(d)) 370 + if (!irqd_irq_disabled(d) && !irqd_is_forwarded_to_vcpu(d) && 371 + !(xd->flags & XIVE_IRQ_NO_EOI)) 371 372 xive_do_source_eoi(irqd_to_hwirq(d), xd); 372 373 373 374 /*