[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 10/18] xen/arm32: Use cpu_hwcaps to skip the check of pending serrors
On Mon, 13 Mar 2017, Wei Chen wrote: > We have provided an option to administrator to determine how to > handle the SErrors. In order to skip the check of pending SError, > in conventional way, we have to read the option every time before > we try to check the pending SError. > > Currently, we haven't export the option to other source file. But, > in the previous patch, we had set "SKIP_CHECK_PENDING_VSERROR" to > cpu_hwcaps when the option doesn't need to check the SErrors. So we > can use checking cpu_hwcaps to replace checking the option directly. > > Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> > --- > This is a temporary solution, this would have to be dropped as soon > as ARM32 gain support of alternative patching to avoid potential misusage. > The alternative patching support patches for ARM32 are still in review > stage. > --- > xen/arch/arm/arm32/entry.S | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/xen/arch/arm/arm32/entry.S b/xen/arch/arm/arm32/entry.S > index 2187226..79929ca 100644 > --- a/xen/arch/arm/arm32/entry.S > +++ b/xen/arch/arm/arm32/entry.S > @@ -1,5 +1,6 @@ > #include <asm/asm_defns.h> > #include <asm/regs.h> > +#include <asm/cpufeature.h> > #include <public/xen.h> > > #define SAVE_ONE_BANKED(reg) mrs r11, reg; str r11, [sp, #UREGS_##reg] > @@ -11,6 +12,21 @@ > #define RESTORE_BANKED(mode) \ > RESTORE_ONE_BANKED(SP_##mode) ; RESTORE_ONE_BANKED(LR_##mode) ; > RESTORE_ONE_BANKED(SPSR_##mode) > > +/* > + * If the SKIP_CHECK_PENDING_VSERROR has been set in the cpu feature, > + * the checking of pending SErrors will be skipped. > + * > + * As it is a temporary solution, we are assuming that > + * SKIP_CHECK_PENDING_VSERROR will always be in the first word for > + * cpu_hwcaps. This would have to be dropped as soon as ARM32 gain > + * support of alternative. > + */ > +#define SKIP_VSERROR_CHECK \ > + ldr r1, =cpu_hwcaps; \ > + ldr r1, [r1]; \ > + tst r1, #SKIP_CHECK_PENDING_VSERROR; \ > + moveq pc, lr > + > #define SAVE_ALL \ > sub sp, #(UREGS_SP_usr - UREGS_sp); /* SP, LR, SPSR, PC */ \ > push {r0-r12}; /* Save R0-R12 */ \ > @@ -44,6 +60,9 @@ save_guest_regs: > SAVE_BANKED(fiq) > SAVE_ONE_BANKED(R8_fiq); SAVE_ONE_BANKED(R9_fiq); > SAVE_ONE_BANKED(R10_fiq) > SAVE_ONE_BANKED(R11_fiq); SAVE_ONE_BANKED(R12_fiq); > + > + SKIP_VSERROR_CHECK > + > /* > * Start to check pending virtual abort in the gap of Guest -> HYP > * world switch. > -- > 2.7.4 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > https://lists.xen.org/xen-devel > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |