From patchwork Thu Jul 31 15:00:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 34657 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8F96620540 for ; Thu, 31 Jul 2014 15:02:26 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rp18sf14349504iec.8 for ; Thu, 31 Jul 2014 08:02:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=f9LIdC/NC+/vVwC4fxkTB0tSrCiK9a+q11aHneM0fIY=; b=MMeuO0G+VCVPCLe6At8f+Le4K9nNKRb517TDA2P/YMsa4/Bpw460ad1na31/K52+cU uX5ycCa/uA5vu48ym0Pn6N4pcFs8t+Bs/OX7t397J1+wXYMBYs62CDzLp3YzaCJySHkz 1+9z4C/6fUNWA29OEEHQhDOiEpYfyBXfIFMnlBDyw82a/Z93eZv41RSdoUErbt7ir6OQ 4gnuzg+fyjkblT5b+ryygCkyPdlpc+bSJ5GvUoBN8PgYIY+giw95X5GUv2466aTBRQf0 1HBW90zOSUI6tEPhjePmFAB6oBEfN4pXQfHvG87+uvqFpklpb67e2SOLB35lIuWKnDhn JTOg== X-Gm-Message-State: ALoCoQnQT9f+O+oq81dDkkdO0UWASi1W7md3EgFGU8QVptwc/ygRIAGufqOSrm0g7WK6n+JsONqK X-Received: by 10.43.85.201 with SMTP id ap9mr13450771icc.11.1406818945974; Thu, 31 Jul 2014 08:02:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.50.79.168 with SMTP id k8ls1779711igx.20.gmail; Thu, 31 Jul 2014 08:02:25 -0700 (PDT) X-Received: by 10.66.235.70 with SMTP id uk6mr5063263pac.49.1406818945577; Thu, 31 Jul 2014 08:02:25 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id ag1si4627050vec.32.2014.07.31.08.02.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 31 Jul 2014 08:02:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id la4so4448446vcb.33 for ; Thu, 31 Jul 2014 08:02:22 -0700 (PDT) X-Received: by 10.220.131.207 with SMTP id y15mr3009892vcs.71.1406818942743; Thu, 31 Jul 2014 08:02:22 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp25067vcb; Thu, 31 Jul 2014 08:02:22 -0700 (PDT) X-Received: by 10.42.252.201 with SMTP id mx9mr16302102icb.78.1406818941902; Thu, 31 Jul 2014 08:02:21 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id o17si14832541icl.100.2014.07.31.08.02.21 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 31 Jul 2014 08:02:21 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XCrrI-0000yO-KN; Thu, 31 Jul 2014 15:01:32 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XCrrE-0000sO-NA for xen-devel@lists.xenproject.org; Thu, 31 Jul 2014 15:01:28 +0000 Received: from [85.158.143.35:24732] by server-3.bemta-4.messagelabs.com id FE/D8-06192-84A5AD35; Thu, 31 Jul 2014 15:01:28 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-10.tower-21.messagelabs.com!1406818887!12708943!1 X-Originating-IP: [209.85.212.174] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 31345 invoked from network); 31 Jul 2014 15:01:27 -0000 Received: from mail-wi0-f174.google.com (HELO mail-wi0-f174.google.com) (209.85.212.174) by server-10.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 31 Jul 2014 15:01:27 -0000 Received: by mail-wi0-f174.google.com with SMTP id d1so9564955wiv.1 for ; Thu, 31 Jul 2014 08:01:27 -0700 (PDT) X-Received: by 10.181.13.44 with SMTP id ev12mr18132090wid.57.1406818886974; Thu, 31 Jul 2014 08:01:26 -0700 (PDT) Received: from belegaer.uk.xensource.com ([185.25.64.249]) by mx.google.com with ESMTPSA id r20sm67128337wik.0.2014.07.31.08.01.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jul 2014 08:01:26 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Thu, 31 Jul 2014 16:00:50 +0100 Message-Id: <1406818852-31856-20-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1406818852-31856-1-git-send-email-julien.grall@linaro.org> References: <1406818852-31856-1-git-send-email-julien.grall@linaro.org> Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH v2 19/21] xen/arm: Reserve region in guest memory for device passthrough X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: This region will be split by the toolstack to allocate MMIO range for eac device. For now only reserve a 768MB region, this should be enought to passthrough multiple device at the same time. Signed-off-by: Julien Grall --- I can't allocate easily a range of 1GB in the current layout without shrink the first RAM bank. So I decided to use only 768MB. If in the future we need more, then we will have to choose at runtime the guest layout. Changes in v2: - Bump the reserved region from 512MB to 768MB --- 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..cebb349 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: 768MB @ 256MB*/ +#define GUEST_MMIO_BASE 0x10000000ULL +#define GUEST_MMIO_SIZE 0x30000000ULL + /* 16MB == 4096 pages reserved for guest to use as a region to map its * grant table in. */