From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH] xen/arm: Restricted access to IFSR32_EL2 and FPEXC32_EL2 Date: Tue, 27 May 2014 12:21:31 +0100 Message-ID: <5384753B.7040904@linaro.org> References: <1401187022-15822-1-git-send-email-vijay.kilari@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1401187022-15822-1-git-send-email-vijay.kilari@gmail.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: vijay.kilari@gmail.com, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, stefano.stabellini@citrix.com, xen-devel@lists.xen.org Cc: Prasun.Kapoor@caviumnetworks.com, vijaya.kumar@caviumnetworks.com List-Id: xen-devel@lists.xenproject.org Hi Vijaya, On 05/27/2014 11:37 AM, vijay.kilari@gmail.com wrote: > From: Vijaya Kumar K > > Some platforms does not support aarch32 mode. So access only if > platform supports it. Accessing these registers will > raise exception > > Signed-off-by: Vijaya Kumar K > --- > xen/arch/arm/arm64/vfp.c | 6 ++++-- > xen/arch/arm/traps.c | 7 +++++-- > 2 files changed, 9 insertions(+), 4 deletions(-) > > diff --git a/xen/arch/arm/arm64/vfp.c b/xen/arch/arm/arm64/vfp.c > index 3cd2b1b..c550a68 100644 > --- a/xen/arch/arm/arm64/vfp.c > +++ b/xen/arch/arm/arm64/vfp.c > @@ -28,7 +28,8 @@ void vfp_save_state(struct vcpu *v) > > v->arch.vfp.fpsr = READ_SYSREG32(FPSR); > v->arch.vfp.fpcr = READ_SYSREG32(FPCR); > - v->arch.vfp.fpexc32_el2 = READ_SYSREG32(FPEXC32_EL2); > + if ( cpu_has_el2_32 ) You should use is_32bit_domain here. If your platform doesn't support aarch32 mode, then we should not create 32bit domain. I think you will have to deny somewhere the domain creation in this case. Regards, -- Julien Grall