[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xen/arm: disable interrupts on return_to_hypervisor
# HG changeset patch # User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> # Date 1354789148 0 # Node ID d3c96e02e53270040a4f8ad0ea89796a5bf59cdd # Parent 0c96325e2c8fbf279c0c30c8b630b1855c5945bb xen/arm: disable interrupts on return_to_hypervisor At the moment it is possible to reach return_to_hypervisor with interrupts enabled (it happens all the times when we are actually going back to hypervisor mode, when we don't take the return_to_guest path). If that happens we risk loosing the content of ELR_hyp: if we receive an interrupt right after restoring ELR_hyp, once we come back we'll have a different value in ELR_hyp and the original is lost. In order to make the return_to_hypervisor path safe, we disable interrupts before restoring any registers. Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- diff -r 0c96325e2c8f -r d3c96e02e532 xen/arch/arm/entry.S --- a/xen/arch/arm/entry.S Thu Dec 06 10:19:07 2012 +0000 +++ b/xen/arch/arm/entry.S Thu Dec 06 10:19:08 2012 +0000 @@ -108,6 +108,7 @@ ENTRY(return_to_guest) RESTORE_ONE_BANKED(R11_fiq); RESTORE_ONE_BANKED(R12_fiq); /* Fall thru */ ENTRY(return_to_hypervisor) + cpsid i ldr lr, [sp, #UREGS_lr] ldr r11, [sp, #UREGS_pc] msr ELR_hyp, r11 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |