From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Tim.Deegan@citrix.com,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Ian.Campbell@citrix.com, david.vrabel@citrix.com
Subject: [PATCH v3 09/11] arm: implement flush_tlb_all_local and flush_tlb_local
Date: Fri, 2 Mar 2012 14:27:35 +0000 [thread overview]
Message-ID: <1330698457-8622-9-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1203021415060.923@kaball-desktop>
Call flush_tlb_all_local from create_p2m_entries after removing a page
from the p2m.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
xen/arch/arm/p2m.c | 2 ++
xen/include/asm-arm/flushtlb.h | 23 +++++++++++++++++++++--
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 4c94ef0..051a0e8 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -3,6 +3,7 @@
#include <xen/lib.h>
#include <xen/errno.h>
#include <xen/domain_page.h>
+#include <asm/flushtlb.h>
void p2m_load_VTTBR(struct domain *d)
{
@@ -123,6 +124,7 @@ static int create_p2m_entries(struct domain *d,
/* p2m entry already present */
free_domheap_page(
mfn_to_page(third[third_table_offset(addr)].p2m.base));
+ flush_tlb_all_local();
}
/* Allocate a new RAM page and attach */
diff --git a/xen/include/asm-arm/flushtlb.h b/xen/include/asm-arm/flushtlb.h
index c8486fc..210abfa 100644
--- a/xen/include/asm-arm/flushtlb.h
+++ b/xen/include/asm-arm/flushtlb.h
@@ -14,8 +14,27 @@ do { \
#define tlbflush_current_time() (0)
-/* Flush local TLBs */
-void flush_tlb_local(void);
+/* Flush local TLBs, current VMID only */
+static inline void flush_tlb_local(void)
+{
+ dsb();
+
+ WRITE_CP32((uint32_t) 0, TLBIALLIS);
+
+ dsb();
+ isb();
+}
+
+/* Flush local TLBs, all VMIDs, non-hypervisor mode */
+static inline void flush_tlb_all_local(void)
+{
+ dsb();
+
+ WRITE_CP32((uint32_t) 0, TLBIALLNSNHIS);
+
+ dsb();
+ isb();
+}
/* Flush specified CPUs' TLBs */
void flush_tlb_mask(const cpumask_t *mask);
--
1.7.2.5
next prev parent reply other threads:[~2012-03-02 14:27 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 14:27 [PATCH v3 0/11] xen/arm: event channels and shared_info page Stefano Stabellini
2012-03-02 14:27 ` [PATCH v3 01/11] arm: rename link to inflight Stefano Stabellini
2012-03-14 9:48 ` Ian Campbell
2012-03-02 14:27 ` [PATCH v3 02/11] arm: fix inflight_irqs list priority ordering Stefano Stabellini
2012-03-14 9:48 ` Ian Campbell
2012-03-02 14:27 ` [PATCH v3 03/11] arm: support fewer LR registers than virtual irqs Stefano Stabellini
2012-03-13 14:30 ` Ian Campbell
2012-03-13 17:31 ` Stefano Stabellini
2012-03-13 17:24 ` Ian Campbell
2012-03-14 9:26 ` Ian Campbell
2012-05-25 13:38 ` Stefano Stabellini
2012-03-02 14:27 ` [PATCH v3 04/11] arm: replace list_del and INIT_LIST_HEAD with list_del_init Stefano Stabellini
2012-03-14 9:49 ` Ian Campbell
2012-03-02 14:27 ` [PATCH v3 05/11] arm: shared_info page allocation and mapping Stefano Stabellini
2012-03-13 17:06 ` Ian Campbell
2012-05-25 13:44 ` Stefano Stabellini
2012-03-14 9:38 ` Ian Campbell
2012-05-25 13:54 ` Stefano Stabellini
2012-05-25 13:58 ` Ian Campbell
2012-03-02 14:27 ` [PATCH v3 06/11] arm: handle dom0_max_vcpus=0 case properly Stefano Stabellini
2012-03-14 9:49 ` Ian Campbell
2012-03-02 14:27 ` [PATCH v3 07/11] arm: use r12 to pass the hypercall number Stefano Stabellini
2012-03-13 15:28 ` Ian Campbell
2012-03-13 16:09 ` Ian Campbell
2012-03-13 16:17 ` WARNING: Xen ARMv7 with Virtualization Extensions Guest ABI has changed Ian Campbell
2012-03-02 14:27 ` [PATCH v3 08/11] arm: introduce more hypercalls Stefano Stabellini
2012-03-14 9:49 ` Ian Campbell
2012-03-02 14:27 ` Stefano Stabellini [this message]
2012-03-14 9:49 ` [PATCH v3 09/11] arm: implement flush_tlb_all_local and flush_tlb_local Ian Campbell
2012-03-02 14:27 ` [PATCH v3 10/11] arm: remove VGIC_SOFTIRQ Stefano Stabellini
2012-03-02 14:27 ` [PATCH v3 11/11] arm: implement event injection Stefano Stabellini
2012-03-14 9:50 ` [PATCH v3 0/11] xen/arm: event channels and shared_info page 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=1330698457-8622-9-git-send-email-stefano.stabellini@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Tim.Deegan@citrix.com \
--cc=david.vrabel@citrix.com \
--cc=xen-devel@lists.xensource.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).