diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-01-11 21:39:28 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-01-11 23:24:44 -0500 |
commit | 7f1c410da59090f9bb2300efebbc3b717594d64c (patch) | |
tree | a01f0e72172aee94f076eabe6fe799e606bdc99e | |
parent | 12c1f339cd49119e39063ae67f02d936f988c079 (diff) |
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>
-rw-r--r-- | arch/powerpc/include/asm/xive.h | 3 | ||||
-rw-r--r-- | arch/powerpc/sysdev/xive/common.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/xive.h b/arch/powerpc/include/asm/xive.h index 0e77005cf021..b619a5585cd6 100644 --- a/arch/powerpc/include/asm/xive.h +++ b/arch/powerpc/include/asm/xive.h | |||
@@ -58,6 +58,9 @@ struct xive_irq_data { | |||
58 | #define XIVE_IRQ_FLAG_EOI_FW 0x10 | 58 | #define XIVE_IRQ_FLAG_EOI_FW 0x10 |
59 | #define XIVE_IRQ_FLAG_H_INT_ESB 0x20 | 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 | #define XIVE_INVALID_CHIP_ID -1 | 64 | #define XIVE_INVALID_CHIP_ID -1 |
62 | 65 | ||
63 | /* A queue tracking structure in a CPU */ | 66 | /* A queue tracking structure in a CPU */ |
diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c index a3b8d7d1316e..2547b6021e6a 100644 --- a/arch/powerpc/sysdev/xive/common.c +++ b/arch/powerpc/sysdev/xive/common.c | |||
@@ -367,7 +367,8 @@ static void xive_irq_eoi(struct irq_data *d) | |||
367 | * EOI the source if it hasn't been disabled and hasn't | 367 | * EOI the source if it hasn't been disabled and hasn't |
368 | * been passed-through to a KVM guest | 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 | xive_do_source_eoi(irqd_to_hwirq(d), xd); | 372 | xive_do_source_eoi(irqd_to_hwirq(d), xd); |
372 | 373 | ||
373 | /* | 374 | /* |