From d9da3eaa2cd070d24988ab8a243684025b351fe9 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 23 May 2019 10:42:29 -0700 Subject: [PATCH] events: drop arch_evtchn_inject() Have the only user call vcpu_mark_events_pending() instead, at the same time arranging for correct ordering of the writes (evtchn_pending_sel should be written before evtchn_upcall_pending). Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Reviewed-by: Julien Grall --- xen/arch/arm/vgic.c | 5 ----- xen/common/domain.c | 3 +-- xen/include/xen/event.h | 3 --- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index cb4acb3f61..d9bacd07e7 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -530,11 +530,6 @@ void vgic_vcpu_inject_spi(struct domain *d, unsigned int virq) vgic_vcpu_inject_irq(v, virq); } -void arch_evtchn_inject(struct vcpu *v) -{ - vgic_vcpu_inject_irq(v, v->domain->arch.evtchn_irq); -} - bool vgic_emulate(struct cpu_user_regs *regs, union hsr hsr) { struct vcpu *v = current; diff --git a/xen/common/domain.c b/xen/common/domain.c index 7a944416ed..619bca8044 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -1203,10 +1203,9 @@ int map_vcpu_info(struct vcpu *v, unsigned long gfn, unsigned offset) * Mark everything as being pending just to make sure nothing gets * lost. The domain will get a spurious event, but it can cope. */ - vcpu_info(v, evtchn_upcall_pending) = 1; for ( i = 0; i < BITS_PER_EVTCHN_WORD(d); i++ ) set_bit(i, &vcpu_info(v, evtchn_pending_sel)); - arch_evtchn_inject(v); + vcpu_mark_events_pending(v); return 0; } diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h index 82caddbe76..945c2e7049 100644 --- a/xen/include/xen/event.h +++ b/xen/include/xen/event.h @@ -68,9 +68,6 @@ int guest_enabled_event(struct vcpu *v, uint32_t virq); /* Notify remote end of a Xen-attached event channel.*/ void notify_via_xen_event_channel(struct domain *ld, int lport); -/* Inject an event channel notification into the guest */ -void arch_evtchn_inject(struct vcpu *v); - /* * Internal event channel object storage. * -- 2.39.5