aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/mmu.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2009-02-09 15:05:49 -0500
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-10-20 19:22:27 -0400
commiteba3ff8b99863bcc9e66b8d528e4750229e29693 (patch)
tree478e2e9e00751c5593be1424fba36ed461c2e306 /arch/x86/xen/mmu.c
parent655d406a7c80bffc03263d071b6ba1e0fcf548f9 (diff)
xen: add xen_set_domain_pte()
Add xen_set_domain_pte() to allow setting a pte mapping a page from another domain. The common case is to map from DOMID_IO, the pseudo domain which owns all IO pages, but will also be used in the privcmd interface to map other domain pages. [ Impact: new Xen-internal API for cross-domain mappings ] Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch/x86/xen/mmu.c')
-rw-r--r--arch/x86/xen/mmu.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 42086ac406af..1ceb0f2fa0af 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -395,7 +395,7 @@ static bool xen_iomap_pte(pte_t pte)
395 return pte_flags(pte) & _PAGE_IOMAP; 395 return pte_flags(pte) & _PAGE_IOMAP;
396} 396}
397 397
398static void xen_set_iomap_pte(pte_t *ptep, pte_t pteval) 398void xen_set_domain_pte(pte_t *ptep, pte_t pteval, unsigned domid)
399{ 399{
400 struct multicall_space mcs; 400 struct multicall_space mcs;
401 struct mmu_update *u; 401 struct mmu_update *u;
@@ -407,10 +407,16 @@ static void xen_set_iomap_pte(pte_t *ptep, pte_t pteval)
407 u->ptr = arbitrary_virt_to_machine(ptep).maddr; 407 u->ptr = arbitrary_virt_to_machine(ptep).maddr;
408 u->val = pte_val_ma(pteval); 408 u->val = pte_val_ma(pteval);
409 409
410 MULTI_mmu_update(mcs.mc, mcs.args, 1, NULL, DOMID_IO); 410 MULTI_mmu_update(mcs.mc, mcs.args, 1, NULL, domid);
411 411
412 xen_mc_issue(PARAVIRT_LAZY_MMU); 412 xen_mc_issue(PARAVIRT_LAZY_MMU);
413} 413}
414EXPORT_SYMBOL_GPL(xen_set_domain_pte);
415
416static void xen_set_iomap_pte(pte_t *ptep, pte_t pteval)
417{
418 xen_set_domain_pte(ptep, pteval, DOMID_IO);
419}
414 420
415static void xen_extend_mmu_update(const struct mmu_update *update) 421static void xen_extend_mmu_update(const struct mmu_update *update)
416{ 422{