diff options
author | David Vrabel <david.vrabel@citrix.com> | 2014-01-08 09:00:01 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2014-05-15 11:16:40 -0400 |
commit | f59c5145dc6a079b14b349c388d44362eb813cdf (patch) | |
tree | ff2b459c8fe1b90a38ee6e86f69aa3dc49db8651 | |
parent | 25b884a83d487fd62c3de7ac1ab5549979188482 (diff) |
x86/xen: do not use _PAGE_IOMAP in xen_remap_domain_mfn_range()
_PAGE_IOMAP is used in xen_remap_domain_mfn_range() to prevent the
pfn_pte() call in remap_area_mfn_pte_fn() from using the p2m to translate
the MFN. If mfn_pte() is used instead, the p2m look up is avoided and
the use of _PAGE_IOMAP is no longer needed.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-rw-r--r-- | arch/x86/xen/mmu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 86e02eabb640..d91602424b39 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -2522,7 +2522,7 @@ static int remap_area_mfn_pte_fn(pte_t *ptep, pgtable_t token, | |||
2522 | unsigned long addr, void *data) | 2522 | unsigned long addr, void *data) |
2523 | { | 2523 | { |
2524 | struct remap_data *rmd = data; | 2524 | struct remap_data *rmd = data; |
2525 | pte_t pte = pte_mkspecial(pfn_pte(rmd->mfn++, rmd->prot)); | 2525 | pte_t pte = pte_mkspecial(mfn_pte(rmd->mfn++, rmd->prot)); |
2526 | 2526 | ||
2527 | rmd->mmu_update->ptr = virt_to_machine(ptep).maddr; | 2527 | rmd->mmu_update->ptr = virt_to_machine(ptep).maddr; |
2528 | rmd->mmu_update->val = pte_val_ma(pte); | 2528 | rmd->mmu_update->val = pte_val_ma(pte); |
@@ -2547,8 +2547,6 @@ int xen_remap_domain_mfn_range(struct vm_area_struct *vma, | |||
2547 | if (xen_feature(XENFEAT_auto_translated_physmap)) | 2547 | if (xen_feature(XENFEAT_auto_translated_physmap)) |
2548 | return -EINVAL; | 2548 | return -EINVAL; |
2549 | 2549 | ||
2550 | prot = __pgprot(pgprot_val(prot) | _PAGE_IOMAP); | ||
2551 | |||
2552 | BUG_ON(!((vma->vm_flags & (VM_PFNMAP | VM_IO)) == (VM_PFNMAP | VM_IO))); | 2550 | BUG_ON(!((vma->vm_flags & (VM_PFNMAP | VM_IO)) == (VM_PFNMAP | VM_IO))); |
2553 | 2551 | ||
2554 | rmd.mfn = mfn; | 2552 | rmd.mfn = mfn; |