From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 3/4 RFC] x86/p2m: use large pages for MMIO mappings Date: Tue, 29 Sep 2015 12:33:20 +0100 Message-ID: <560A7700.6010309@citrix.com> References: <55F70C9A02000078000A2A58@prv-mh.provo.novell.com> <55F7E13902000078000A2B7E@prv-mh.provo.novell.com> <55F7E13902000078000A2B7E@prv-mh.provo.novell.com> <55F7E63702000078000A2BD6@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZgtBC-0002Ht-MH for xen-devel@lists.xenproject.org; Tue, 29 Sep 2015 11:34:42 +0000 In-Reply-To: <55F7E63702000078000A2BD6@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel Cc: Wei Liu , Stefano Stabellini , George Dunlap , Andrew Cooper , Ian Jackson , Ian Campbell , Tiejun Chen , Malcolm Crossley , Keir Fraser List-Id: xen-devel@lists.xenproject.org Hi Jan, Sorry I hadn't much time to look at it until now. On 15/09/15 08:34, Jan Beulich wrote: > When mapping large BARs (e.g. the frame buffer of a graphics card) the > overhead or establishing such mappings using onle 4k pages has, > particularly after the XSA-125 fix, become unacceptable. Alter the > XEN_DOMCTL_memory_mapping semantics once again, so that there's no > longer a fixed amount of guest frames that represents the upper limit > of what a single invocation can map. Instead bound execution time by > limiting the number of iterations (regardless of page size). > > Signed-off-by: Jan Beulich > --- > RFC reasons: > - ARM side unimplemented (and hence libxc for now made cope with both > models), the main issue (besides my inability to test any change > there) being the many internal uses of map_mmio_regions()) map_mmio_regions is used in ARM to map all the device memory in a guest. We expect this function to map everything at once when called during DOM0 build and/or when a guest is created (used to map the interrupt controller). I would rather prefer to avoid introducing specific helpers with slightly different behavior (i.e one is only mapping N page, the other everything). What about extending map_mmio_regions to take a parameter telling if we want to limit the number of mapping in a single invocation? Regards, -- Julien Grall