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

Re: [Xen-devel] [PATCH v1 2/2] xen/arm: Clean and invalidate dcache for boot pagetables



Hello Oleksandr,

On 06/03/14 21:50, Oleksandr Tyshchenko wrote:
We need to invalidate dcache too after zeroing boot pagetables
to avoid unpredictable behavior which may take place after
non-boot CPUs enable their caches.

So, replace clean_xen_dcache() macro by a clean_and_invalidate_xen_dcache()
for boot pagetables.

This patch, and the previous one, might be a good candidate to backport for Xen 4.4.1.

Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Oleksandr Tyshchenko <oleksandr.tyshchenko@xxxxxxxxxxxxxxx>

With the comment about "signed-off-by" made by Ian:

Reviewed-by: Julien Grall <julien.grall@xxxxxxxxxx>

---
  xen/arch/arm/mm.c |    6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 308a798..4422b67 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -484,13 +484,13 @@ void __init setup_pagetables(unsigned long 
boot_phys_offset, paddr_t xen_paddr)
      /* Clear the copy of the boot pagetables. Each secondary CPU
       * rebuilds these itself (see head.S) */
      memset(boot_pgtable, 0x0, PAGE_SIZE);
-    clean_xen_dcache(boot_pgtable);
+    clean_and_invalidate_xen_dcache(boot_pgtable);
  #ifdef CONFIG_ARM_64
      memset(boot_first, 0x0, PAGE_SIZE);
-    clean_xen_dcache(boot_first);
+    clean_and_invalidate_xen_dcache(boot_first);
  #endif
      memset(boot_second, 0x0, PAGE_SIZE);
-    clean_xen_dcache(boot_second);
+    clean_and_invalidate_xen_dcache(boot_second);

      /* Break up the Xen mapping into 4k pages and protect them separately. */
      for ( i = 0; i < LPAE_ENTRIES; i++ )


--
Julien Grall

_______________________________________________
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®.