From: Ian Campbell Subject: Re: [PATCH V2] xen: arm: fix guest register access. Date: Tue, 15 Jan 2013 11:27:27 +0000 Message-ID: <1358249247.15691.58.camel@zakaz.uk.xensource.com> References: <1355929001-19183-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: In-Reply-To: <1355929001-19183-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: "xen-devel@lists.xen.org" Cc: "Tim (Xen.org)" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Wed, 2012-12-19 at 14:56 +0000, Ian Campbell wrote: > @@ -73,6 +73,64 @@ static void print_xen_info(void) > debug, print_tainted(taint_str)); > } > > +uint32_t *select_user_reg(struct cpu_user_regs *regs, int reg) > +{ > + BUG_ON( guest_mode(regs) ); I was obviously on crack here. 8<-------------------------- >From a53486a9aa6c0bd9512ac5e213119c6bda27e3b6 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 15 Jan 2013 11:25:05 +0000 Subject: [PATCH] xen: arm: fix assert in select_user_reg The condition was inverted. Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index f42e4e9..8afcf0c 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -75,7 +75,7 @@ static void print_xen_info(void) uint32_t *select_user_reg(struct cpu_user_regs *regs, int reg) { - BUG_ON( guest_mode(regs) ); + BUG_ON( !guest_mode(regs) ); /* * We rely heavily on the layout of cpu_user_regs to avoid having -- 1.7.2.5