aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/xen/mmu.c')
-rw-r--r--arch/x86/xen/mmu.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 8132aa8c5d49..846dad7d54a5 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -323,6 +323,27 @@ out:
323 preempt_enable(); 323 preempt_enable();
324} 324}
325 325
326pte_t xen_ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
327{
328 /* Just return the pte as-is. We preserve the bits on commit */
329 return *ptep;
330}
331
332void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr,
333 pte_t *ptep, pte_t pte)
334{
335 struct multicall_space mcs;
336 struct mmu_update *u;
337
338 mcs = xen_mc_entry(sizeof(*u));
339 u = mcs.args;
340 u->ptr = virt_to_machine(ptep).maddr | MMU_PT_UPDATE_PRESERVE_AD;
341 u->val = pte_val_ma(pte);
342 MULTI_mmu_update(mcs.mc, u, 1, NULL, DOMID_SELF);
343
344 xen_mc_issue(PARAVIRT_LAZY_MMU);
345}
346
326/* Assume pteval_t is equivalent to all the other *val_t types. */ 347/* Assume pteval_t is equivalent to all the other *val_t types. */
327static pteval_t pte_mfn_to_pfn(pteval_t val) 348static pteval_t pte_mfn_to_pfn(pteval_t val)
328{ 349{