| To: | kvm@vger.kernel.org, linux-mips@linux-mips.org |
|---|---|
| Subject: | [PATCH v2 13/18] MIPS: If KVM is enabled then use the KVM specific routine to flush the TLBs on a ASID wrap. |
| From: | Sanjay Lal <sanjayl@kymasys.com> |
| Date: | Wed, 21 Nov 2012 18:34:11 -0800 |
| Cc: | Sanjay Lal <sanjayl@kymasys.com> |
| In-reply-to: | <1353551656-23579-1-git-send-email-sanjayl@kymasys.com> |
| List-archive: | <http://www.linux-mips.org/archives/linux-mips/> |
| List-help: | <mailto:ecartis@linux-mips.org?Subject=help> |
| List-id: | linux-mips <linux-mips.eddie.linux-mips.org> |
| List-owner: | <mailto:ralf@linux-mips.org> |
| List-post: | <mailto:linux-mips@linux-mips.org> |
| List-software: | Ecartis version 1.0.0 |
| List-subscribe: | <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips> |
| List-unsubscribe: | <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips> |
| References: | <1353551656-23579-1-git-send-email-sanjayl@kymasys.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
---
arch/mips/include/asm/mmu_context.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/mips/include/asm/mmu_context.h
b/arch/mips/include/asm/mmu_context.h
index 9b02cfb..10a3fd2 100644
--- a/arch/mips/include/asm/mmu_context.h
+++ b/arch/mips/include/asm/mmu_context.h
@@ -112,15 +112,21 @@ static inline void enter_lazy_tlb(struct mm_struct *mm,
struct task_struct *tsk)
static inline void
get_new_mmu_context(struct mm_struct *mm, unsigned long cpu)
{
+ extern void kvm_local_flush_tlb_all(void);
unsigned long asid = asid_cache(cpu);
if (! ((asid += ASID_INC) & ASID_MASK) ) {
if (cpu_has_vtag_icache)
flush_icache_all();
+#ifdef CONFIG_VIRTUALIZATION
+ kvm_local_flush_tlb_all(); /* start new asid cycle */
+#else
local_flush_tlb_all(); /* start new asid cycle */
+#endif
if (!asid) /* fix version if needed */
asid = ASID_FIRST_VERSION;
}
+
cpu_context(cpu, mm) = asid_cache(cpu) = asid;
}
--
1.7.11.3
|
| Previous by Date: | [PATCH v2 08/18] KVM/MIPS32: Release notes and KVM module Makefile, Sanjay Lal |
|---|---|
| Next by Date: | [PATCH v2 04/18] KVM/MIPS32: MIPS arch specific APIs for KVM, Sanjay Lal |
| Previous by Thread: | [PATCH v2 08/18] KVM/MIPS32: Release notes and KVM module Makefile, Sanjay Lal |
| Next by Thread: | [PATCH v2 04/18] KVM/MIPS32: MIPS arch specific APIs for KVM, Sanjay Lal |
| Indexes: | [Date] [Thread] [Top] [All Lists] |