On 17.07.2025 15:01, Grygorii Strashko wrote:
> --- a/xen/common/event_channel.c
> +++ b/xen/common/event_channel.c
> @@ -975,6 +975,9 @@ void send_guest_pirq(struct domain *d, const struct pirq
> *pirq)
> int port;
> struct evtchn *chn;
>
> + if (!IS_ENABLED(CONFIG_HAS_PIRQ))
> + return;
> +
> /*
> * PV guests: It should not be possible to race with __evtchn_close().
> The
> * caller of this function must synchronise with pirq_guest_unbind().
Isn't this function unreachable on Arm, and hence a Misra rule 2.1 violation,
requiring #ifdef around the entire function to address?
> @@ -1710,10 +1713,15 @@ void evtchn_destroy_final(struct domain *d)
> void evtchn_move_pirqs(struct vcpu *v)
> {
> struct domain *d = v->domain;
> - const cpumask_t *mask = cpumask_of(v->processor);
> + const cpumask_t *mask;
This change shouldn't be necessary; compilers ought to be able to DCE the
code.
> unsigned int port;
> struct evtchn *chn;
>
> + if (!IS_ENABLED(CONFIG_HAS_PIRQ))
Nit (style): Missing blanks (see other nearby if()-s).
I wonder though whether we wouldn't better have x86'es arch_move_irqs()
invoke this function, and then #ifdef it out here altogether as well.
Jan