From: Ian Campbell Subject: Re: [PATCH 5/5] xen: remove evtchn_upcall_mask from interface on ARM Date: Thu, 18 Jul 2013 15:36:12 +0100 Message-ID: <1374158172.26728.105.camel@kazak.uk.xensource.com> References: <1374153311.26728.86.camel@kazak.uk.xensource.com> <1374153340-29398-5-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1374153340-29398-5-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: keir@xen.org, ian.jackson@eu.citrix.com, jbeulich@suse.com List-Id: xen-devel@lists.xenproject.org On Thu, 2013-07-18 at 14:15 +0100, Ian Campbell wrote: > On ARM event-channel upcalls are masked using the hardware's interrupt mask > bit and not by a software bit. > > Leaving this field present in the interface has caused some confusion already > and is liable to mean it gets inadvertently used in the future. So arrange for > this field to be turned into a padding field on ARM by introducing a > XEN_HAVE_PV_UPCALL_MASK define. > > This bit is also unused for x86 PV-on-HVM guests, but we can't realistically > distinguish those from x86 PV guests in the headers. > > Add a per-arch vcpu_event_delivery_is_enabled function to replace the single > open coded use of evtchn_upcall_mask in common code (in a debug keyhandler). > The existing local_event_delivery_is_enabled, which operates only on current, > was unimplemented on ARM and unused on x86, so remove it. I failed to notice the new use of this in common code which arose from moving map_vcpu_info to common code. The most obvious fix is: diff --git a/xen/common/domain.c b/xen/common/domain.c index 6c264a5..9390a22 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -921,7 +921,9 @@ int map_vcpu_info(struct vcpu *v, unsigned long gfn, unsigned offset) if ( v->vcpu_info == &dummy_vcpu_info ) { memset(new_info, 0, sizeof(*new_info)); +#ifdef XEN_HAVE_PV_UPCALL_MASK __vcpu_info(v, new_info, evtchn_upcall_mask) = 1; +#endif } else { But that doesn't feel very satisfactory. Any bright ideas? arch_vcpu_info_init(new_info) perhaps? Ian.