|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen/arm: Properly clean update to init_ttbr and smp_up_cpu
commit 4c2d50d586717533f6bee4c6340be0432d0a76d0
Author: Julien Grall <jgrall@xxxxxxxxxx>
AuthorDate: Thu Feb 1 17:35:22 2024 +0000
Commit: Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Thu Feb 1 17:35:45 2024 +0000
xen/arm: Properly clean update to init_ttbr and smp_up_cpu
Recent rework to the secondary boot code modified how init_ttbr and
smp_up_cpu are accessed. Rather than directly accessing them, we
are using a pointer to them.
The helper clean_dcache() is expected to take the variable in parameter
and then clean its content. As we now pass a pointer to the variable,
we will clean the area storing the address rather than the content itself.
Switch to use clean_dcache_va_range() to avoid casting the pointer.
Fixes: a5ed59e62c6f ("arm/mmu: Move init_ttbr to a new section .data.idmap")
Fixes: 9a5114074b04 ("arm/smpboot: Move smp_up_cpu to a new section
.data.idmap)
Reported-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
Tested-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
---
xen/arch/arm/mmu/smpboot.c | 2 +-
xen/arch/arm/smpboot.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/mmu/smpboot.c b/xen/arch/arm/mmu/smpboot.c
index bc91fdfe33..4ffc8254a4 100644
--- a/xen/arch/arm/mmu/smpboot.c
+++ b/xen/arch/arm/mmu/smpboot.c
@@ -88,7 +88,7 @@ static void set_init_ttbr(lpae_t *root)
* init_ttbr will be accessed with the MMU off, so ensure the update
* is visible by cleaning the cache.
*/
- clean_dcache(ptr);
+ clean_dcache_va_range(ptr, sizeof(uint64_t));
unmap_domain_page(ptr);
}
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index 119bfa3160..a84e706d77 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -449,7 +449,7 @@ static void set_smp_up_cpu(unsigned long mpidr)
* smp_up_cpu will be accessed with the MMU off, so ensure the update
* is visible by cleaning the cache.
*/
- clean_dcache(ptr);
+ clean_dcache_va_range(ptr, sizeof(unsigned long));
unmap_domain_page(ptr);
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |