From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v1 2/2] xen/arm: Clean and invalidate dcache for boot pagetables Date: Fri, 07 Mar 2014 12:16:37 +0800 Message-ID: <53194825.8000809@linaro.org> References: <1394113851-17321-1-git-send-email-oleksandr.tyshchenko@globallogic.com> <1394113851-17321-3-git-send-email-oleksandr.tyshchenko@globallogic.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1394113851-17321-3-git-send-email-oleksandr.tyshchenko@globallogic.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Oleksandr Tyshchenko , xen-devel@lists.xen.org Cc: tim@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org 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 > Signed-off-by: Ian Campbell > Signed-off-by: Oleksandr Tyshchenko With the comment about "signed-off-by" made by Ian: Reviewed-by: Julien Grall > --- > 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