[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.4] xen: arm: flush TLB after overwriting 1:1 mapping in boot page tables
commit 7adf0b22d888bd0514d153c8b44e4982ad4d6e6e Author: Ian Campbell <ian.campbell@xxxxxxxxxx> AuthorDate: Mon Jul 14 17:39:10 2014 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Wed Jul 23 09:50:33 2014 +0100 xen: arm: flush TLB after overwriting 1:1 mapping in boot page tables Otherwise a stale TLB entry can shadow the fixmap/UART or DTB mapping Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Julien Grall <julien.grall@xxxxxxxxxx> (cherry picked from commit f1870804e58565399cd770e93f62e7ce57cd5231) --- xen/arch/arm/arm32/head.S | 13 ++++++++++++- xen/arch/arm/arm64/head.S | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S index 96230ac..5bc23cc 100644 --- a/xen/arch/arm/arm32/head.S +++ b/xen/arch/arm/arm32/head.S @@ -372,9 +372,20 @@ paging: ldr r4, =BOOT_FDT_VIRT_START mov r4, r4, lsr #18 /* Slot for BOOT_FDT_VIRT_START */ strd r2, r3, [r1, r4] /* Map it in the early fdt slot */ - dsb 1: + /* + * Flush the TLB in case the 1:1 mapping happens to clash with + * the virtual addresses used by the fixmap or DTB. + */ + dsb /* Ensure any page table updates made above + * have occurred. */ + + isb + mcr CP32(r0, TLBIALLH) /* Flush hypervisor TLB */ + dsb /* Ensure completion of TLB flush */ + isb + PRINT("- Ready -\r\n") /* The boot CPU should go straight into C now */ diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S index 31afdd0..be44f67 100644 --- a/xen/arch/arm/arm64/head.S +++ b/xen/arch/arm/arm64/head.S @@ -382,9 +382,20 @@ paging: ldr x1, =BOOT_FDT_VIRT_START lsr x1, x1, #18 /* x4 := Slot for BOOT_FDT_VIRT_START */ str x2, [x4, x1] /* Map it in the early fdt slot */ - dsb sy 1: + /* + * Flush the TLB in case the 1:1 mapping happens to clash with + * the virtual addresses used by the fixmap or DTB. + */ + dsb sy /* Ensure any page table updates made above + * have occurred. */ + + isb + tlbi alle2 + dsb sy /* Ensure completion of TLB flush */ + isb + PRINT("- Ready -\r\n") /* The boot CPU should go straight into C now */ -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.4 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |