xen/arm: Restricted access to IFSR32_EL2 and FPEXC32_EL2

IFSR32_EL1 and FPEXC32_EL1 registers are accessible in
aarch64 mode only if aarch32 mode is support in EL1.
So allow access to these registers only for 32-bit domains.

Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Vijaya Kumar K authored and Ian Campbell committed 2014-09-24 09:39:47 +01:00
1 parent ffa980c308
commit 8ab802c878
2 files changed
+7 -3

No files matched your search

+4 -2
View File
@@ -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 ( is_32bit_domain(v->domain) )
v->arch.vfp.fpexc32_el2 = READ_SYSREG32(FPEXC32_EL2);
}
void vfp_restore_state(struct vcpu *v)
@@ -56,5 +57,6 @@ void vfp_restore_state(struct vcpu *v)
WRITE_SYSREG32(v->arch.vfp.fpsr, FPSR);
WRITE_SYSREG32(v->arch.vfp.fpcr, FPCR);
WRITE_SYSREG32(v->arch.vfp.fpexc32_el2, FPEXC32_EL2);
if ( is_32bit_domain(v->domain) )
WRITE_SYSREG32(v->arch.vfp.fpexc32_el2, FPEXC32_EL2);
}
+3 -1
View File
@@ -37,6 +37,7 @@
#include <asm/cpregs.h>
#include <asm/psci.h>
#include <asm/mmio.h>
#include <asm/cpufeature.h>
#include "decode.h"
#include "vtimer.h"
@@ -789,7 +790,8 @@ void show_registers(struct cpu_user_regs *regs)
#else
ctxt.far = READ_SYSREG(FAR_EL1);
ctxt.esr_el1 = READ_SYSREG(ESR_EL1);
ctxt.ifsr32_el2 = READ_SYSREG(IFSR32_EL2);
if ( is_32bit_domain(current->domain) )
ctxt.ifsr32_el2 = READ_SYSREG(IFSR32_EL2);
#endif
ctxt.vttbr_el2 = READ_SYSREG64(VTTBR_EL2);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.