|
@@ -576,6 +576,13 @@ static int __change_page_attr(struct cpa_data *cpa, int primary)
|
|
else
|
|
else
|
|
address = *cpa->vaddr;
|
|
address = *cpa->vaddr;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * If we're called with lazy mmu updates enabled, the
|
|
|
|
+ * in-memory pte state may be stale. Flush pending updates to
|
|
|
|
+ * bring them up to date.
|
|
|
|
+ */
|
|
|
|
+ arch_flush_lazy_mmu_mode();
|
|
|
|
+
|
|
repeat:
|
|
repeat:
|
|
kpte = lookup_address(address, &level);
|
|
kpte = lookup_address(address, &level);
|
|
if (!kpte)
|
|
if (!kpte)
|
|
@@ -854,6 +861,13 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
|
|
} else
|
|
} else
|
|
cpa_flush_all(cache);
|
|
cpa_flush_all(cache);
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * If we've been called with lazy mmu updates enabled, then
|
|
|
|
+ * make sure that everything gets flushed out before we
|
|
|
|
+ * return.
|
|
|
|
+ */
|
|
|
|
+ arch_flush_lazy_mmu_mode();
|
|
|
|
+
|
|
out:
|
|
out:
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|