From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Leonard Subject: Re: [PATCH v3 0/3] map grant refs at pfn = mfn Date: Fri, 01 Aug 2014 13:35:05 +0100 Message-ID: <53DB8979.7060602@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini , xen-devel@lists.xensource.com Cc: Julien Grall , Ian Campbell List-Id: xen-devel@lists.xenproject.org On 24/07/14 14:30, Stefano Stabellini wrote: > 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 > available. > > 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 > pfn. Is there a version of these patches for Xen 4.4 that I can test? The restriction on duplicate pages is causing trouble for networking on Mirage (http://roscidus.com/blog/blog/2014/07/28/my-first-unikernel/#tcp-retransmissions). > 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 > arm_smmu_(un)map_page; > - introduce gnttab_need_identity_mapping; > - check gnttab_need_identity_mapping in __gnttab_map_grant_ref and > __gnttab_unmap_common. > > > > Stefano Stabellini (3): > xen/x86: introduce is_domain_direct_mapped(d) as (0) on x86 > xen: introduce arch_grant_(un)map_page_identity > xen/arm: introduce XENFEAT_grant_map_identity > > xen/arch/arm/p2m.c | 22 ++++++++++++++++++++++ > xen/common/grant_table.c | 35 +++++++++++++++++++++++++++-------- > xen/common/kernel.c | 3 +++ > xen/drivers/passthrough/arm/smmu.c | 13 ++----------- > 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/grant_table.h | 2 ++ > xen/include/asm-x86/p2m.h | 13 +++++++++++++ > xen/include/public/features.h | 3 +++ > 10 files changed, 80 insertions(+), 19 deletions(-) >