From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org
Subject: Re: [PATCH 2/3] xen: arm: flush TLB on all CPUs when setting or clearing fixmaps
Date: Wed, 02 Apr 2014 15:46:09 +0100 [thread overview]
Message-ID: <533C22B1.1020202@linaro.org> (raw)
In-Reply-To: <1396447971-27846-2-git-send-email-ian.campbell@citrix.com>
On 04/02/2014 03:12 PM, Ian Campbell wrote:
> These mappings are global and therefore need flushing on all processors. Add
> flush_all_xen_data_tlb_range_va which accomplishes this.
I think remove_early_mappings should also use flush_xen_data_range_va.
I'm wondering why BOOT_FDT_VIRT_START is removed so late (i.e in
discard_initial_modules). It can be done once the DTB is copied in setup_mm.
[..]
>
> +/*
> + * Flush a range of VA's hypervisor mappings from the data TLB on all
> + * processors in the inner-shareable domain. This is not sufficient
> + * when changing code mappings or for self modifying code.
> + */
> +static inline void flush_xen_data_tlb_range_va(unsigned long va,
> + unsigned long size)
> +{
> + unsigned long end = va + size;
> + dsb(sy); /* Ensure preceding are visible */
> + while ( va < end ) {
> + asm volatile(STORE_CP32(0, TLBIMVAHIS)
> + : : "r" (va) : "memory");
> + va += PAGE_SIZE;
> + }
> + dsb(sy); /* Ensure completion of the TLB flush */
> + isb();
> +}
> +
This loop is exactly the same on arm64 (except the TLBIMVAHIS), is it
possible to have a common code like clean_xen_dcache_va_range?
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-04-02 14:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 14:11 [PATCH 0/3 v3] xen: arm: smp & tlb cleanups Ian Campbell
2014-04-02 14:12 ` [PATCH 1/3] xen: arm: clarify naming of the Xen TLB flushing functions Ian Campbell
2014-04-02 14:29 ` Julien Grall
2014-04-02 14:12 ` [PATCH 2/3] xen: arm: flush TLB on all CPUs when setting or clearing fixmaps Ian Campbell
2014-04-02 14:46 ` Julien Grall [this message]
2014-04-02 15:22 ` Ian Campbell
2014-04-02 16:54 ` Ian Campbell
2014-04-02 16:59 ` Julien Grall
2014-04-02 14:12 ` [PATCH 3/3] xen: arm32: don't force the compiler to allocate a dummy register Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=533C22B1.1020202@linaro.org \
--to=julien.grall@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.