On 22.07.25 11:23, Jan Beulich wrote:
On 18.07.2025 12:11, Grygorii Strashko wrote:
From: Grygorii Strashko <grygorii_stras...@epam.com>

On platforms without PIRQ support evtchn_move_pirqs()/send_guest_pirq()
functions are unreachable (Misra rule 2.1).

Move these function under CONFIG_HAS_PIRQ ifdefs to fix Misra rule 2.1
violation and resolve call of evtchn_move_pirqs() from common /sched/core.c
vcpu_move_irqs() code by moving evtchn_move_pirqs() into x86
arch_move_irqs() callback (which is converted to define).

The patch title isn't quite appropriate anymore with this description, I
think.

Signed-off-by: Grygorii Strashko <grygorii_stras...@epam.com>

Reviewed-by: Jan Beulich <jbeul...@suse.com>
preferably with ...

@@ -1707,6 +1709,7 @@ void evtchn_destroy_final(struct domain *d)
  }
+#ifdef CONFIG_HAS_PIRQ
  void evtchn_move_pirqs(struct vcpu *v)
  {
      struct domain *d = v->domain;

... one of the two blank lines also dropped here, just like you do ...

@@ -1722,7 +1725,7 @@ void evtchn_move_pirqs(struct vcpu *v)
      }
      read_unlock(&d->event_lock);
  }
-
+#endif /* CONFIG_HAS_PIRQ */

... here. Happy to adjust while committing,

Thank you.

but please consider suggesting a replacement patch title.

Honestly, I, by myself, not sure about proper patch title :(
My options would be:

 "xen/evtchn: evtchn_move_pirqs()/send_guest_pirq() fix MISRA Rule 2.1 
violation"

 "xen/evtchn: opt out of common pIRQ code for arches without pIRQ support"

 "xen/evtchn: fully restrict concept of pIRQ for arches with pIRQ support only"


--
Best regards,
-grygorii

Reply via email to