[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 18/18] xen/arm: Handle guest external abort as guest SError



On Mon, 13 Mar 2017, Wei Chen wrote:
> The guest generated external data/instruction aborts can be treated
> as guest SErrors. We already have a handler to handle the SErrors,
> so we can reuse this handler to handle guest external aborts.
> 
> Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx>

Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>

> ---
>  xen/arch/arm/traps.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
> index 3b84e80..24511e5 100644
> --- a/xen/arch/arm/traps.c
> +++ b/xen/arch/arm/traps.c
> @@ -2558,12 +2558,12 @@ static void do_trap_instr_abort_guest(struct 
> cpu_user_regs *regs,
>  
>      /*
>       * If this bit has been set, it means that this instruction abort is 
> caused
> -     * by a guest external abort. Currently we crash the guest to protect the
> -     * hypervisor. In future one can better handle this by injecting a 
> virtual
> -     * abort to the guest.
> +     * by a guest external abort. We can handle this instruction abort as 
> guest
> +     * SError.
>       */
>      if ( hsr.iabt.eat )
> -        domain_crash_synchronous();
> +        return __do_trap_serror(regs, true);
> +
>  
>      if ( hpfar_is_valid(hsr.iabt.s1ptw, fsc) )
>          gpa = get_faulting_ipa(gva);
> @@ -2661,12 +2661,10 @@ static void do_trap_data_abort_guest(struct 
> cpu_user_regs *regs,
>  
>      /*
>       * If this bit has been set, it means that this data abort is caused
> -     * by a guest external abort. Currently we crash the guest to protect the
> -     * hypervisor. In future one can better handle this by injecting a 
> virtual
> -     * abort to the guest.
> +     * by a guest external abort. We treat this data abort as guest SError.
>       */
>      if ( dabt.eat )
> -        domain_crash_synchronous();
> +        return __do_trap_serror(regs, true);
>  
>      info.dabt = dabt;
>  #ifdef CONFIG_ARM_32
> -- 
> 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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.