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

Re: [Xen-devel] [PATCH] arm: restore ELR_hyp and SPSR_hyp on return from hypervisor to hypervisor.



On Mon, 20 Feb 2012, Ian Campbell wrote:
> This is necessary to handle nested traps to the hypervisor more than one deep.
> 
> I've not seen an actually failure relating to this but I'm not quite sure how
> we've managed to get away with not doing it (I suppose multiply nested traps
> are uncommon).

ack

> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> ---
>  xen/arch/arm/entry.S |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/xen/arch/arm/entry.S b/xen/arch/arm/entry.S
> index 0b9cce5..36f1119 100644
> --- a/xen/arch/arm/entry.S
> +++ b/xen/arch/arm/entry.S
> @@ -102,6 +102,10 @@ ENTRY(return_to_guest)
>  
>  ENTRY(return_to_hypervisor)
>       ldr lr, [sp, #UREGS_lr]
> +     ldr r11, [sp, #UREGS_pc]
> +     msr ELR_hyp, r11
> +     ldr r11, [sp, #UREGS_cpsr]
> +     msr SPSR_hyp, r11
>       pop {r0-r12}
>       add sp, #(UREGS_R8_fiq - UREGS_sp); /* SP, LR, SPSR, PC */
>       eret
> -- 
> 1.7.2.5
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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