From: Jan Beulich Date: Tue, 12 Mar 2019 13:40:24 +0000 (+0100) Subject: events: drop arch_evtchn_inject() X-Git-Tag: archive/raspbian/4.11.3+24-g14b62ab3e5-1+rpi1^2~55^2~154 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=33a9494e2d758f99b58fd73adef3122e30480ab8;p=xen.git 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 --- diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index 3fafdd0b66..07c704edff 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -597,11 +597,6 @@ out: return; } -void arch_evtchn_inject(struct vcpu *v) -{ - vgic_inject_irq(v->domain, v, v->domain->arch.evtchn_irq, true); -} - bool vgic_evtchn_irq_pending(struct vcpu *v) { struct pending_irq *p; diff --git a/xen/arch/arm/vgic/vgic.c b/xen/arch/arm/vgic/vgic.c index a35449bf11..bd4e268e57 100644 --- a/xen/arch/arm/vgic/vgic.c +++ b/xen/arch/arm/vgic/vgic.c @@ -692,11 +692,6 @@ void vgic_kick_vcpus(struct domain *d) } } -void arch_evtchn_inject(struct vcpu *v) -{ - vgic_inject_irq(v->domain, v, v->domain->arch.evtchn_irq, true); -} - bool vgic_evtchn_irq_pending(struct vcpu *v) { struct vgic_irq *irq; diff --git a/xen/common/domain.c b/xen/common/domain.c index 6cbf135457..f0458c200f 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -1239,10 +1239,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 ebb879e88d..b8152a9831 100644 --- a/xen/include/xen/event.h +++ b/xen/include/xen/event.h @@ -83,9 +83,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. *