From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC 15/19] xen/arm: Reserve region in guest memory for device passthrough Date: Wed, 18 Jun 2014 16:23:26 +0100 Message-ID: <53A1AEEE.1030200@linaro.org> References: <1402935486-29136-1-git-send-email-julien.grall@linaro.org> <1402935486-29136-16-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WxHhy-0002s9-Ke for xen-devel@lists.xenproject.org; Wed, 18 Jun 2014 15:23:30 +0000 Received: by mail-we0-f171.google.com with SMTP id q58so1051401wes.16 for ; Wed, 18 Jun 2014 08:23:29 -0700 (PDT) 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 Cc: xen-devel@lists.xenproject.org, stefano.stabellini@citrix.com, ian.campbell@citrix.com, tim@xen.org List-Id: xen-devel@lists.xenproject.org On 06/18/2014 04:12 PM, Stefano Stabellini wrote: > On Mon, 16 Jun 2014, Julien Grall wrote: >> This region will be split by the toolstack to allocate MMIO range for eac >> device. >> >> For now only reserve a 512MB region, this should be enought to passthrough >> multiple device at the same time. >> >> Signed-off-by: Julien Grall >> --- >> xen/include/public/arch-arm.h | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h >> index ac54cd6..789bffb 100644 >> --- a/xen/include/public/arch-arm.h >> +++ b/xen/include/public/arch-arm.h >> @@ -369,6 +369,10 @@ typedef uint64_t xen_callback_t; >> #define GUEST_GICC_BASE 0x03002000ULL >> #define GUEST_GICC_SIZE 0x00000100ULL >> >> +/* Space for mapping MMIO from device passthrough: 512MB @ 256MB*/ >> +#define GUEST_MMIO_BASE 0x10000000ULL >> +#define GUEST_MMIO_SIZE 0x20000000ULL > > Is it really necessary to specify size here? It looks like an artifical > limitation to me: given that is unlikely that we'll ever be able to > support non-PCI device hotplug, we only have to handle cold-plug here. > So the toolstack has all the information it needs to build the perfect > memory layout for the guest at VM creation time. We have the same "artificial" limitation for the RAM banks... The toolstack doesn't know where the different regions end up without the size. As the layout may move in the future, adding the size avoid modifying the toolstack every time we change it. For instance, the layout will change again soon with guest support for GICv3. Regards, -- Julien Grall