xen/arch/arm/include/asm/event.h | 1 - xen/arch/arm/vgic.c | 2 +- xen/arch/arm/vgic/vgic.c | 2 +- xen/arch/ppc/include/asm/event.h | 1 - xen/arch/x86/hvm/vioapic.c | 2 +- xen/arch/x86/hvm/viridian/time.c | 2 +- xen/arch/x86/hvm/vmx/vmx.c | 2 +- xen/arch/x86/hvm/vpt.c | 2 +- xen/arch/x86/include/asm/event.h | 1 - xen/include/xen/event.h | 2 ++ 10 files changed, 8 insertions(+), 9 deletions(-)
The vcpu_kick() declaration is duplicated across multiple
architecture-specific event.h headers (ARM, x86, PPC).
Remove the redundant declarations and move vcpu_kick() into
the common xen/include/xen/event.h header.
Drop the definition of vcpu_kick() from ppc/include/asm/event.h,
as it is already provided in ppc/stubs.c.
Include <xen/event.h> instead of <asm/event.h> in places where
vcpu_kick() is used, since its declaration now resides in
<xen/event.h>.
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
xen/arch/arm/include/asm/event.h | 1 -
xen/arch/arm/vgic.c | 2 +-
xen/arch/arm/vgic/vgic.c | 2 +-
xen/arch/ppc/include/asm/event.h | 1 -
xen/arch/x86/hvm/vioapic.c | 2 +-
xen/arch/x86/hvm/viridian/time.c | 2 +-
xen/arch/x86/hvm/vmx/vmx.c | 2 +-
xen/arch/x86/hvm/vpt.c | 2 +-
xen/arch/x86/include/asm/event.h | 1 -
xen/include/xen/event.h | 2 ++
10 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/xen/arch/arm/include/asm/event.h b/xen/arch/arm/include/asm/event.h
index 509157b2b3..e036ab7fb8 100644
--- a/xen/arch/arm/include/asm/event.h
+++ b/xen/arch/arm/include/asm/event.h
@@ -3,7 +3,6 @@
#include <asm/domain.h>
-void vcpu_kick(struct vcpu *v);
void vcpu_mark_events_pending(struct vcpu *v);
void vcpu_update_evtchn_irq(struct vcpu *v);
void vcpu_block_unless_event_pending(struct vcpu *v);
diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
index 3ebdf9953f..6f4047bb77 100644
--- a/xen/arch/arm/vgic.c
+++ b/xen/arch/arm/vgic.c
@@ -9,6 +9,7 @@
*/
#include <xen/bitops.h>
+#include <xen/event.h>
#include <xen/lib.h>
#include <xen/init.h>
#include <xen/domain_page.h>
@@ -17,7 +18,6 @@
#include <xen/sched.h>
#include <xen/perfc.h>
-#include <asm/event.h>
#include <asm/current.h>
#include <asm/mmio.h>
diff --git a/xen/arch/arm/vgic/vgic.c b/xen/arch/arm/vgic/vgic.c
index b2c0e1873a..7361e38709 100644
--- a/xen/arch/arm/vgic/vgic.c
+++ b/xen/arch/arm/vgic/vgic.c
@@ -16,9 +16,9 @@
*/
#include <xen/bug.h>
+#include <xen/event.h>
#include <xen/list_sort.h>
#include <xen/sched.h>
-#include <asm/event.h>
#include <asm/new_vgic.h>
#include "vgic.h"
diff --git a/xen/arch/ppc/include/asm/event.h b/xen/arch/ppc/include/asm/event.h
index 0f475c4b89..565eee1439 100644
--- a/xen/arch/ppc/include/asm/event.h
+++ b/xen/arch/ppc/include/asm/event.h
@@ -5,7 +5,6 @@
#include <xen/lib.h>
/* TODO: implement */
-static inline void vcpu_kick(struct vcpu *v) { BUG_ON("unimplemented"); }
static inline void vcpu_mark_events_pending(struct vcpu *v) { BUG_ON("unimplemented"); }
static inline void vcpu_update_evtchn_irq(struct vcpu *v) { BUG_ON("unimplemented"); }
static inline void vcpu_block_unless_event_pending(struct vcpu *v) { BUG_ON("unimplemented"); }
diff --git a/xen/arch/x86/hvm/vioapic.c b/xen/arch/x86/hvm/vioapic.c
index 7c725f9e47..5e8938a799 100644
--- a/xen/arch/x86/hvm/vioapic.c
+++ b/xen/arch/x86/hvm/vioapic.c
@@ -29,6 +29,7 @@
#include <xen/xmalloc.h>
#include <xen/lib.h>
#include <xen/errno.h>
+#include <xen/event.h>
#include <xen/sched.h>
#include <xen/nospec.h>
#include <public/hvm/ioreq.h>
@@ -36,7 +37,6 @@
#include <asm/hvm/vlapic.h>
#include <asm/hvm/support.h>
#include <asm/current.h>
-#include <asm/event.h>
#include <asm/io_apic.h>
/* HACK: Route IRQ0 only to VCPU0 to prevent time jumps. */
diff --git a/xen/arch/x86/hvm/viridian/time.c b/xen/arch/x86/hvm/viridian/time.c
index 9311858d63..710a58879b 100644
--- a/xen/arch/x86/hvm/viridian/time.c
+++ b/xen/arch/x86/hvm/viridian/time.c
@@ -7,12 +7,12 @@
*/
#include <xen/domain_page.h>
+#include <xen/event.h>
#include <xen/hypercall.h>
#include <xen/sched.h>
#include <xen/version.h>
#include <asm/apic.h>
-#include <asm/event.h>
#include <asm/guest/hyperv.h>
#include <asm/guest/hyperv-tlfs.h>
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 6b407226c4..7009b9d0b0 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -5,6 +5,7 @@
*/
#include <xen/domain_page.h>
+#include <xen/event.h>
#include <xen/guest_access.h>
#include <xen/hypercall.h>
#include <xen/init.h>
@@ -21,7 +22,6 @@
#include <asm/cpufeature.h>
#include <asm/current.h>
#include <asm/debugreg.h>
-#include <asm/event.h>
#include <asm/fsgsbase.h>
#include <asm/gdbsx.h>
#include <asm/guest-msr.h>
diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c
index 50ed738998..e7737ac808 100644
--- a/xen/arch/x86/hvm/vpt.c
+++ b/xen/arch/x86/hvm/vpt.c
@@ -5,10 +5,10 @@
* Copyright (c) 2006, Xiaowei Yang, Intel Corporation.
*/
+#include <xen/event.h>
#include <xen/sched.h>
#include <xen/time.h>
#include <asm/hvm/vpt.h>
-#include <asm/event.h>
#include <asm/apic.h>
#include <asm/mc146818rtc.h>
#include <public/hvm/params.h>
diff --git a/xen/arch/x86/include/asm/event.h b/xen/arch/x86/include/asm/event.h
index 434f65007e..d13ce28167 100644
--- a/xen/arch/x86/include/asm/event.h
+++ b/xen/arch/x86/include/asm/event.h
@@ -11,7 +11,6 @@
#include <xen/shared.h>
-void vcpu_kick(struct vcpu *v);
void vcpu_mark_events_pending(struct vcpu *v);
static inline int vcpu_event_delivery_is_enabled(struct vcpu *v)
diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h
index 930190054c..211a3ae8d0 100644
--- a/xen/include/xen/event.h
+++ b/xen/include/xen/event.h
@@ -306,4 +306,6 @@ static inline int evtchn_port_poll(struct domain *d, evtchn_port_t port)
return rc;
}
+void vcpu_kick(struct vcpu *v);
+
#endif /* __XEN_EVENT_H__ */
--
2.52.0
On 28.11.2025 12:38, Oleksii Kurochko wrote: > The vcpu_kick() declaration is duplicated across multiple > architecture-specific event.h headers (ARM, x86, PPC). > > Remove the redundant declarations and move vcpu_kick() into > the common xen/include/xen/event.h header. > > Drop the definition of vcpu_kick() from ppc/include/asm/event.h, > as it is already provided in ppc/stubs.c. > > Include <xen/event.h> instead of <asm/event.h> in places where > vcpu_kick() is used, since its declaration now resides in > <xen/event.h>. Centralizing is of course good. Question is whether xen/event.h is a good home for the decl. Generally related decls live in xen/sched.h. There was, however, a vague plan to try to split that up some. Others, REST maintainers in particular: Thoughts? Jan
On 28/11/2025 11:58 am, Jan Beulich wrote: > On 28.11.2025 12:38, Oleksii Kurochko wrote: >> The vcpu_kick() declaration is duplicated across multiple >> architecture-specific event.h headers (ARM, x86, PPC). >> >> Remove the redundant declarations and move vcpu_kick() into >> the common xen/include/xen/event.h header. >> >> Drop the definition of vcpu_kick() from ppc/include/asm/event.h, >> as it is already provided in ppc/stubs.c. >> >> Include <xen/event.h> instead of <asm/event.h> in places where >> vcpu_kick() is used, since its declaration now resides in >> <xen/event.h>. > Centralizing is of course good. Question is whether xen/event.h is a good > home for the decl. Generally related decls live in xen/sched.h. There was, > however, a vague plan to try to split that up some. Others, REST > maintainers in particular: Thoughts? +1 to centralising. I'd suggest xen/sched.h too. ~Andrew
On 11/28/25 2:21 PM, Andrew Cooper wrote: > On 28/11/2025 11:58 am, Jan Beulich wrote: >> On 28.11.2025 12:38, Oleksii Kurochko wrote: >>> The vcpu_kick() declaration is duplicated across multiple >>> architecture-specific event.h headers (ARM, x86, PPC). >>> >>> Remove the redundant declarations and move vcpu_kick() into >>> the common xen/include/xen/event.h header. >>> >>> Drop the definition of vcpu_kick() from ppc/include/asm/event.h, >>> as it is already provided in ppc/stubs.c. >>> >>> Include <xen/event.h> instead of <asm/event.h> in places where >>> vcpu_kick() is used, since its declaration now resides in >>> <xen/event.h>. >> Centralizing is of course good. Question is whether xen/event.h is a good >> home for the decl. Generally related decls live in xen/sched.h. There was, >> however, a vague plan to try to split that up some. Others, REST >> maintainers in particular: Thoughts? > +1 to centralising. I'd suggest xen/sched.h too. I will move to xen/sched.h. It will be even better as the patch will be cleaner as <xen/sched.h> is mostly already included in the changed files in this patch. Thanks. ~ Oleksii
© 2016 - 2025 Red Hat, Inc.