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

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).

Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Juergen Gross <jgross@suse.com> # xen/sched
This commit is contained in:
Grygorii Strashko authored and Jan Beulich committed 2025-07-31 14:44:02 +02:00
1 parent aeea3fd341
commit 341f271cf8
3 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -224,7 +224,7 @@ void cleanup_domain_irq_mapping(struct domain *d);
bool cpu_has_pending_apic_eoi(void);
static inline void arch_move_irqs(struct vcpu *v) { }
#define arch_move_irqs(v) evtchn_move_pirqs(v)
struct msi_info;
int allocate_and_map_gsi_pirq(struct domain *d, int index, int *pirq_p);
+4 -2
View File
@@ -970,6 +970,7 @@ void send_guest_domain_virq(struct domain *d, uint32_t virq)
read_unlock_irqrestore(&v->virq_lock, flags);
}
#ifdef CONFIG_HAS_PIRQ
void send_guest_pirq(struct domain *d, const struct pirq *pirq)
{
int port;
@@ -994,6 +995,7 @@ void send_guest_pirq(struct domain *d, const struct pirq *pirq)
evtchn_read_unlock(chn);
}
}
#endif /* CONFIG_HAS_PIRQ */
static DEFINE_SPINLOCK(global_virq_handlers_lock);
@@ -1706,7 +1708,7 @@ void evtchn_destroy_final(struct domain *d)
#endif
}
#ifdef CONFIG_HAS_PIRQ
void evtchn_move_pirqs(struct vcpu *v)
{
struct domain *d = v->domain;
@@ -1722,7 +1724,7 @@ void evtchn_move_pirqs(struct vcpu *v)
}
read_unlock(&d->event_lock);
}
#endif /* CONFIG_HAS_PIRQ */
static void domain_dump_evtchn_info(struct domain *d)
{
-1
View File
@@ -642,7 +642,6 @@ int sched_init_vcpu(struct vcpu *v)
static void vcpu_move_irqs(struct vcpu *v)
{
arch_move_irqs(v);
evtchn_move_pirqs(v);
}
static void sched_move_irqs(const struct sched_unit *unit)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.