From: Ian Campbell Subject: Re: [PATCH] xen/arm: trap SMC instructions and inject an UND exception Date: Thu, 2 May 2013 16:55:58 +0100 Message-ID: <1367510158.21869.137.camel@zakaz.uk.xensource.com> References: <1367492463-28998-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: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: Julien Grall , "Tim (Xen.org)" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, 2013-05-02 at 14:53 +0100, Stefano Stabellini wrote: > On Thu, 2 May 2013, Ian Campbell wrote: > > Currently only handles 32 bit guests. The 64-bit exception model is > > considerably different. > > > > Signed-off-by: Ian Campbell > > > > There are probably other places where injecting UND would be more appropriate > > than killing the guest. It should also be reasonably easy to extend this logic > > to inject DABT and PABT. > > --- > > xen/arch/arm/traps.c | 56 ++++++++++++++++++++++++++++++++- > > xen/include/asm-arm/arm32/processor.h | 4 ++- > > xen/include/asm-arm/processor.h | 8 +++++ > > xen/include/public/arch-arm.h | 1 + > > 4 files changed, 67 insertions(+), 2 deletions(-) > > > > diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c > > index b7487b7..72dddb2 100644 > > --- a/xen/arch/arm/traps.c > > +++ b/xen/arch/arm/traps.c > > @@ -59,7 +59,7 @@ void __cpuinit init_traps(void) > > WRITE_SYSREG((vaddr_t)hyp_traps_vector, VBAR_EL2); > > > > /* Setup hypervisor traps */ > > - WRITE_SYSREG(HCR_PTW|HCR_BSU_OUTER|HCR_AMO|HCR_IMO|HCR_VM, HCR_EL2); > > + WRITE_SYSREG(HCR_PTW|HCR_BSU_OUTER|HCR_AMO|HCR_IMO|HCR_TSC|HCR_VM, HCR_EL2); > > isb(); > > } > > My recent patch http://marc.info/?l=xen-devel&m=136734156810415 does > this Right, I should have mentioned that. What do you do with the SMCs? I think we've concluded that undef is the right response? Ian.