#include <xen/lib.h>
#include <xen/errno.h>
#include <xen/domain_page.h>
+#include <asm/flushtlb.h>
void p2m_load_VTTBR(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 */
#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);