Skip to contentSkip to conversation

xen/arch: irq: drop unreachable pirq callbacks

PATCH Superseded Grygorii Strashko 4 participants 7 messages Aug 1, 2025 – Aug 4, 2025 RISC-V

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover xen/arch: irq: drop unreachable pirq callbacks

From: Grygorii Strashko <[email protected]>

Hence prerequisite patch was merged [1] arch specific pIRQ callback can now be dropped for arches without pIRQ support as those callback become unreachable.

[1] commit 341f271cf86f ("xen/evtchn: fully restrict concept of pIRQ for arches with pIRQ support only")

Grygorii Strashko (3):
xen/arm: irq: drop unreachable pirq callbacks
xen/ppc: irq: drop unreachable pirq callbacks
xen/riscv: irq: drop unreachable pirq callbacks

 xen/arch/arm/irq.c     | 29 -----------------------------
 xen/arch/ppc/stubs.c   | 20 --------------------
 xen/arch/riscv/stubs.c | 20 --------------------
 3 files changed, 69 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/3 xen/arm: irq: drop unreachable pirq callbacks

From: Grygorii Strashko <[email protected]>

Hence all common pIRQ code is under CONFIG_HAS_PIRQ idefs corresponding Arm arch pIRQ callbacks become unreachable, so drop them.

---
 xen/arch/arm/irq.c | 29 -----------------------------
 1 file changed, 29 deletions(-)
xen/arch/arm/irq.c +0 -29
index 03fbb90c6c43..4bbf0b0664df 100644
@@ -595,35 +595,6 @@ unlock:
     return ret;
 }
 
-/*
- * pirq event channels. We don't use these on ARM, instead we use the
- * features of the GIC to inject virtualised normal interrupts.
- */
-struct pirq *alloc_pirq_struct(struct domain *d)
-{
-    return NULL;
-}
-
-/*
- * These are all unreachable given an alloc_pirq_struct
- * which returns NULL, all callers try to lookup struct pirq first
- * which will fail.
- */
-int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share)
-{
-    BUG();
-}
-
-void pirq_guest_unbind(struct domain *d, struct pirq *pirq)
-{
-    BUG();
-}
-
-void pirq_set_affinity(struct domain *d, int pirq, const cpumask_t *mask)
-{
-    BUG();
-}
-
 static bool irq_validate_new_type(unsigned int curr, unsigned int new)
 {
     return (curr == IRQ_TYPE_INVALID || curr == new );
Signature · 1 line
2.34.1
#2 lore raw

PATCH 2/3 xen/ppc: irq: drop unreachable pirq callbacks

In reply to Grygorii Strashko

From: Grygorii Strashko <[email protected]>

Hence all common pIRQ code is under CONFIG_HAS_PIRQ idefs corresponding PPC arch pIRQ callbacks become unreachable, so drop them.

---
 xen/arch/ppc/stubs.c | 20 --------------------
 1 file changed, 20 deletions(-)
xen/arch/ppc/stubs.c +0 -20
index 671e71aa0a60..bdaf474c5cc0 100644
@@ -103,26 +103,6 @@ void smp_send_call_function_mask(const cpumask_t *mask)
 
 /* irq.c */
 
-struct pirq *alloc_pirq_struct(struct domain *d)
-{
-    BUG_ON("unimplemented");
-}
-
-int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share)
-{
-    BUG_ON("unimplemented");
-}
-
-void pirq_guest_unbind(struct domain *d, struct pirq *pirq)
-{
-    BUG_ON("unimplemented");
-}
-
-void pirq_set_affinity(struct domain *d, int pirq, const cpumask_t *mask)
-{
-    BUG_ON("unimplemented");
-}
-
 void irq_ack_none(struct irq_desc *desc)
 {
     BUG_ON("unimplemented");
Signature · 1 line
2.34.1
#3 lore raw

PATCH 3/3 xen/riscv: irq: drop unreachable pirq callbacks

In reply to Grygorii Strashko

From: Grygorii Strashko <[email protected]>

Hence all common pIRQ code is under CONFIG_HAS_PIRQ idefs corresponding RISCV arch pIRQ callbacks become unreachable, so drop them.

---
 xen/arch/riscv/stubs.c | 20 --------------------
 1 file changed, 20 deletions(-)
xen/arch/riscv/stubs.c +0 -20
index 8918cebf35c6..1a8c86cd8da2 100644
@@ -82,26 +82,6 @@ void smp_send_call_function_mask(const cpumask_t *mask)
 
 /* irq.c */
 
-struct pirq *alloc_pirq_struct(struct domain *d)
-{
-    BUG_ON("unimplemented");
-}
-
-int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share)
-{
-    BUG_ON("unimplemented");
-}
-
-void pirq_guest_unbind(struct domain *d, struct pirq *pirq)
-{
-    BUG_ON("unimplemented");
-}
-
-void pirq_set_affinity(struct domain *d, int pirq, const cpumask_t *mask)
-{
-    BUG_ON("unimplemented");
-}
-
 void irq_ack_none(struct irq_desc *desc)
 {
     BUG_ON("unimplemented");
Signature · 1 line
2.34.1
#4 lore raw

Re: [XEN][PATCH 3/3] xen/riscv: irq: drop unreachable pirq callbacks

Quoted 31 lines · Grygorii Strashko

From: Grygorii Strashko<[email protected]>

Hence all common pIRQ code is under CONFIG_HAS_PIRQ idefs corresponding RISCV arch pIRQ callbacks become unreachable, so drop them.

---
  xen/arch/riscv/stubs.c | 20 --------------------
  1 file changed, 20 deletions(-)
xen/arch/riscv/stubs.c +0 -13
index 8918cebf35c6..1a8c86cd8da2 100644
@@ -82,26 +82,6 @@ void smp_send_call_function_mask(const cpumask_t *mask)
 
  /* irq.c */
 
-struct pirq *alloc_pirq_struct(struct domain *d)
-{
-    BUG_ON("unimplemented");
-}
-
-int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share)
-{
-    BUG_ON("unimplemented");
-}
-
-void pirq_guest_unbind(struct domain *d, struct pirq *pirq)
-{
-    BUG_ON("unimplemented");

xen/arch/riscv/stubs.c void smp_send_call_function_mask(const cpumask_t *mask) · line 87

Quoted 10 lines
xen/arch/riscv/stubs.c +0 -7
-}
-
-void pirq_set_affinity(struct domain *d, int pirq, const cpumask_t *mask)
-{
-    BUG_ON("unimplemented");
-}
-
  void irq_ack_none(struct irq_desc *desc)
  {
      BUG_ON("unimplemented");

LGTM: Reviewed-by: Oleksii Kurochko<[email protected]>

~ Oleksii

#5 lore raw
In reply to Grygorii Strashko
Quoted 11 lines · Grygorii Strashko

From: Grygorii Strashko <[email protected]>

Hence prerequisite patch was merged [1] arch specific pIRQ callback can now be dropped for arches without pIRQ support as those callback become unreachable.

[1] commit 341f271cf86f ("xen/evtchn: fully restrict concept of pIRQ for arches with pIRQ support only")

Grygorii Strashko (3):
xen/arm: irq: drop unreachable pirq callbacks
xen/ppc: irq: drop unreachable pirq callbacks
xen/riscv: irq: drop unreachable pirq callbacks

In the individual commit messages, it would be helpful to explicitly say:

Since commit 341f271cf86f ("xen/evtchn: fully restrict concept of pIRQ for arches with pIRQ support only"), the $ARCH callbacks ...

Having it only in the cover letter is not great for future archaeologists.

With something to that effect, Acked-by: Andrew Cooper <[email protected]>.  It's always lovely to see diffstats like this.

~Andrew

Quoted 6 lines
 xen/arch/arm/irq.c     | 29 -----------------------------
 xen/arch/ppc/stubs.c   | 20 --------------------
 xen/arch/riscv/stubs.c | 20 --------------------
 3 files changed, 69 deletions(-)
Reviewed-by Denis Mukhin on the v1 series
#6 lore raw
In reply to Grygorii Strashko
Quoted 11 lines · Grygorii Strashko

From: Grygorii Strashko <[email protected]>

Hence prerequisite patch was merged [1] arch specific pIRQ callback can now be dropped for arches without pIRQ support as those callback become unreachable.

[1] commit 341f271cf86f ("xen/evtchn: fully restrict concept of pIRQ for arches with pIRQ support only")

Grygorii Strashko (3):
xen/arm: irq: drop unreachable pirq callbacks
xen/ppc: irq: drop unreachable pirq callbacks
xen/riscv: irq: drop unreachable pirq callbacks

Please consider

for the series with or without further corrections for commit messages (there was a separate request).

Quoted 9 lines
 xen/arch/arm/irq.c     | 29 -----------------------------
 xen/arch/ppc/stubs.c   | 20 --------------------
 xen/arch/riscv/stubs.c | 20 --------------------
 3 files changed, 69 deletions(-)

--
2.34.1