From patchwork Tue Nov 17 09:40:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 56717 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1824979lbb; Tue, 17 Nov 2015 01:43:11 -0800 (PST) X-Received: by 10.55.78.72 with SMTP id c69mr31367248qkb.76.1447753391137; Tue, 17 Nov 2015 01:43:11 -0800 (PST) Return-Path: Received: from lists.xen.org (lists.xenproject.org. [50.57.142.19]) by mx.google.com with ESMTPS id m68si24289959qgm.33.2015.11.17.01.43.10 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 17 Nov 2015 01:43:11 -0800 (PST) Received-SPF: neutral (google.com: 50.57.142.19 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=50.57.142.19; Authentication-Results: mx.google.com; spf=neutral (google.com: 50.57.142.19 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZyclP-00020y-VP; Tue, 17 Nov 2015 09:41:23 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZyclO-00020p-E6 for xen-devel@lists.xen.org; Tue, 17 Nov 2015 09:41:22 +0000 Received: from [85.158.137.68] by server-4.bemta-3.messagelabs.com id 6B/07-09570-146FA465; Tue, 17 Nov 2015 09:41:21 +0000 X-Env-Sender: shannon.zhao@linaro.org X-Msg-Ref: server-15.tower-31.messagelabs.com!1447753278!4196021!1 X-Originating-IP: [74.125.82.53] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.19.2; banners=-,-,- X-VirusChecked: Checked Received: (qmail 23650 invoked from network); 17 Nov 2015 09:41:19 -0000 Received: from mail-wm0-f53.google.com (HELO mail-wm0-f53.google.com) (74.125.82.53) by server-15.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 17 Nov 2015 09:41:19 -0000 Received: by wmec201 with SMTP id c201so17085537wme.1 for ; Tue, 17 Nov 2015 01:41:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Kwt62zctZSGxTbL7Rns8RbA7p3S2fuJKcBq/404+qJ8=; b=cHkNr0unIcKPigPr3MIet/IDyTcfuhZj4l3p1v94Q1JpfoNxBCkvBiTBhj9blTW64K DbvimCfrciaAYaCIPvgByhyckrbqeXX19O5zW0rl32Z1yGO2WfgLvtxq8+bqmsrelU8k vGykMEHefZEA3Htv6LkZIqXJGy9kt5KFtRJttCp0KH6xZKGPfXVWiICAxWrWBmBbta5m CK3pMmrgcIyaTPk+X4speYbuh25N5Hvi8guWqNPOhz4F6v/34G0FkJx/33BlFFHoAbyA DNx/iyofbujj/RFBIP7AcW9tVmIXtPcQ3sbm6RPO/PrZzBkdR/TIT57PX4tJ+qOtwHf+ J+CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Kwt62zctZSGxTbL7Rns8RbA7p3S2fuJKcBq/404+qJ8=; b=Oc1h+iIH0q83dqBNOF4nEO4Cta2LKZ46hk/xZ+knhG/kY5bSN/DkHRZyqyfeYHj9me xPoeduHGBXcKUOgR4hd+MQnEvdeUrBZzAM7dKK6A9UCCL7n33zUBExWPQuBEGye1d79Q NT5PTl8y3nhY2ii174YMRNWNzp8+ypEACjLjlZzMSwbcNRioYyvbhEFk0+WVl8tFDetM j7YuzteG2b532azMNmWx7Z60JqNb1sPQwuamkrSCx+JpMqNqPKLsGoGbZ1vc9pkw8CY/ ONM7pn8zK9rS3Kg4gLnsAHTbbeQyBB5oniiHfkqgkLEMhXUs8FjHBFQa/3uqi9MM8gOR 86XA== X-Gm-Message-State: ALoCoQmcPK3ReFpc7YNHKSzMzcB5vabvt4n/lCSG3t92MBF6Dxh2dSxkscrPMO9AyosgSxXCX/xy X-Received: by 10.194.23.33 with SMTP id j1mr48345908wjf.4.1447753278870; Tue, 17 Nov 2015 01:41:18 -0800 (PST) Received: from localhost ([78.129.251.54]) by smtp.gmail.com with ESMTPSA id uq3sm12423037wjc.10.2015.11.17.01.41.16 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 17 Nov 2015 01:41:17 -0800 (PST) From: shannon.zhao@linaro.org To: ian.campbell@citrix.com, stefano.stabellini@citrix.com, keir@xen.org, jbeulich@suse.com, andrew.cooper3@citrix.com, julien.grall@citrix.com, xen-devel@lists.xen.org Date: Tue, 17 Nov 2015 17:40:00 +0800 Message-Id: <1447753261-7552-2-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1447753261-7552-1-git-send-email-shannon.zhao@linaro.org> References: <1447753261-7552-1-git-send-email-shannon.zhao@linaro.org> Cc: mark.rutland@arm.com, hangaohuai@huawei.com, ard.biesheuvel@linaro.org, shannon.zhao@linaro.org, christoffer.dall@linaro.org, peter.huangpeng@huawei.com, david.vrabel@citrix.com, zhaoshenglong@huawei.com, linux-arm-kernel@lists.infradead.org, roger.pau@citrix.com Subject: [Xen-devel] [PATCH v3 01/62] Revert "xen/arm: vgic-v2: Drop cbase from arch_domain" X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion 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 From: Shannon Zhao This reverts commit 810a50db69703f715d199d6b3a5f08193155d48b. Signed-off-by: Shannon Zhao Conflicts: xen/arch/arm/vgic-v2.c --- xen/arch/arm/vgic-v2.c | 10 +++++----- xen/include/asm-arm/domain.h | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) -- 2.1.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel diff --git a/xen/arch/arm/vgic-v2.c b/xen/arch/arm/vgic-v2.c index f7d784b..ba7ddac 100644 --- a/xen/arch/arm/vgic-v2.c +++ b/xen/arch/arm/vgic-v2.c @@ -531,7 +531,7 @@ static int vgic_v2_vcpu_init(struct vcpu *v) static int vgic_v2_domain_init(struct domain *d) { int i, ret; - paddr_t cbase, csize; + paddr_t csize; paddr_t vbase; /* @@ -541,6 +541,7 @@ static int vgic_v2_domain_init(struct domain *d) if ( is_hardware_domain(d) ) { d->arch.vgic.dbase = vgic_v2_hw.dbase; + d->arch.vgic.cbase = vgic_v2_hw.cbase; /* * For the hardware domain, we always map the whole HW CPU * interface region in order to match the device tree (the "reg" @@ -548,13 +549,13 @@ static int vgic_v2_domain_init(struct domain *d) * Note that we assume the size of the CPU interface is always * aligned to PAGE_SIZE. */ - cbase = vgic_v2_hw.cbase; csize = vgic_v2_hw.csize; vbase = vgic_v2_hw.vbase; } else { d->arch.vgic.dbase = GUEST_GICD_BASE; + d->arch.vgic.cbase = GUEST_GICC_BASE; /* * The CPU interface exposed to the guest is always 8kB. We may * need to add an offset to the virtual CPU interface base @@ -562,7 +563,6 @@ static int vgic_v2_domain_init(struct domain *d) * region. */ BUILD_BUG_ON(GUEST_GICC_SIZE != SZ_8K); - cbase = GUEST_GICC_BASE; csize = GUEST_GICC_SIZE; vbase = vgic_v2_hw.vbase + vgic_v2_hw.aliased_offset; } @@ -571,8 +571,8 @@ static int vgic_v2_domain_init(struct domain *d) * Map the gic virtual cpu interface in the gic cpu interface * region of the guest. */ - ret = map_mmio_regions(d, paddr_to_pfn(cbase), csize / PAGE_SIZE, - paddr_to_pfn(vbase)); + ret = map_mmio_regions(d, paddr_to_pfn(d->arch.vgic.cbase), + csize / PAGE_SIZE, paddr_to_pfn(vbase)); if ( ret ) return ret; diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h index e7e40da..1e61f30 100644 --- a/xen/include/asm-arm/domain.h +++ b/xen/include/asm-arm/domain.h @@ -102,6 +102,7 @@ struct arch_domain struct pending_irq *pending_irqs; /* Base address for guest GIC */ paddr_t dbase; /* Distributor base address */ + paddr_t cbase; /* CPU base address */ #ifdef HAS_GICV3 /* GIC V3 addressing */ /* List of contiguous occupied by the redistributors */