From: Tim Deegan Subject: Re: [PATCH] xen: arm: clear the exclusive monitor on exception return Date: Wed, 17 Jul 2013 20:48:21 +0100 Message-ID: <20130717194821.GC80836@ocelot.phlegethon.org> References: <1374059931-7508-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1374059931-7508-1-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: Ian Campbell Cc: julien.grall@citrix.com, stefano.stabellini@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org At 12:18 +0100 on 17 Jul (1374063531), Ian Campbell wrote: > Otherwise context switching between two vcpus which are contending the same > lock can result in a spurious success. Shouldn't this go in ctxt_swicth_to(), then? I think any use that Xen itself makes of the monitor should end with it cleared. Tim. > This is not required on ARMv8 since eret implicitly clears the monitor. > > Signed-off-by: Ian Campbell > --- > xen/arch/arm/arm32/entry.S | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/xen/arch/arm/arm32/entry.S b/xen/arch/arm/arm32/entry.S > index 76814dd..1c26835 100644 > --- a/xen/arch/arm/arm32/entry.S > +++ b/xen/arch/arm/arm32/entry.S > @@ -117,6 +117,7 @@ ENTRY(return_to_hypervisor) > msr SPSR_hyp, r11 > pop {r0-r12} > add sp, #(UREGS_SP_usr - UREGS_sp); /* SP, LR, SPSR, PC */ > + clrex > eret > > /* > -- > 1.7.2.5 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel