[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v6 0/3] map grant refs at pfn = mfn

Hi all,
this patch series introduces a second p2m mapping of grant reference on
ARM at guest physical address == machine address of the grant ref.  It
is safe because dom0 is already mapped 1:1. We export
XENFEAT_grant_map_identity to signal the guest that this second p2m
mapping is

One reason for wanting the second p2m mapping is to avoid tracking mfn
to pfn mappings in the guest kernel. Since the same mfn can be granted
multiple times to the backend, finding the right pfn corresponding to a
given mfn can be difficult and expensive. Providing a second mapping at
a known address allow the kernel to access the page without knowing the

All the patches in this series has been Acked.

Changes in v6:
- collect all the acks;
- fix a code style issue.

Changes in v5:
- actually define arch_grant_(un)map_page_identity as extern without
  implementation on x86;
- fix coding style;
- remove arm_smmu_map_page and arm_smmu_unmap_page.

Changes in v4:
- remove define is_domain_direct_mapped in common/memory.c;
- is_domain_direct_mapped as ((void)(d), 0);
- declare the x86 implementations of arch_grant_(un)map_page_identity as extern;
- add ASSERTs to ARM implementations of
- add XENFEAT_grant_map_identity if is_domain_direct_mapped;
- remove gnttab_need_identity_mapping, check is_domain_direct_mapped
- define gnttab_need_iommu_mapping as is_domain_direct_mapped on arm.

Changes in v3:
- add "introduce is_domain_direct_mapped(d) as (0) on x86";
- use p2m_iommu types in arch_grant_(un)map_page_identity;
- call arch_grant_(un)map_page_identity functions from
- introduce gnttab_need_identity_mapping;
- check gnttab_need_identity_mapping in __gnttab_map_grant_ref and

he following changes since commit d91b0f9b58219724717db503f46ff2f731aa4c59:

  x86/cpu: drop the num_siblings check against nr_cpu_ids (2014-08-01 16:32:39 

are available in the git repository at:

  git://xenbits.xen.org/people/sstabellini/xen-unstable.git grant_map_identity

for you to fetch changes up to 85a1aad35d0f61f929e0ddaf84468a8a55ee0cdc:

  xen/arm: introduce XENFEAT_grant_map_identity (2014-08-01 14:36:33 +0000)

Stefano Stabellini (3):
      xen/x86: introduce is_domain_direct_mapped(d) as ((void)(d), 0) on x86
      xen: introduce arch_grant_(un)map_page_identity
      xen/arm: introduce XENFEAT_grant_map_identity

 xen/arch/arm/p2m.c                 |   26 ++++++++++++++++++++++
 xen/common/grant_table.c           |   30 +++++++++++++++++++++-----
 xen/common/kernel.c                |    2 ++
 xen/common/memory.c                |    4 ----
 xen/drivers/passthrough/arm/smmu.c |   42 ------------------------------------
 xen/include/asm-arm/grant_table.h  |    3 +--
 xen/include/asm-arm/p2m.h          |    4 ++++
 xen/include/asm-x86/domain.h       |    1 +
 xen/include/asm-x86/p2m.h          |    4 ++++
 xen/include/public/features.h      |    3 +++
 10 files changed, 66 insertions(+), 53 deletions(-)

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.