From patchwork Mon Mar 5 16:03:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 130662 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp2853649lja; Mon, 5 Mar 2018 08:07:03 -0800 (PST) X-Google-Smtp-Source: AG47ELuVN4p/QkQPm0qjYIa6NNnzmMyfUhwPspJynV/OryaAUVYy3ZXGNcxn3BLzIOAUSup4c78U X-Received: by 10.36.157.16 with SMTP id f16mr14164081itd.83.1520266023558; Mon, 05 Mar 2018 08:07:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520266023; cv=none; d=google.com; s=arc-20160816; b=n8xqlOCXkst1Fw3flY63hrqOjiT2lwFQIDIQaKcOFu7Yn7cw/NSYbpY1v0fCgKAK69 F2nx9fSMEc8SqOd518QAC3t1rD73xab7l3DN3JZo7TDFEtlXo41exlI5M9r8r49VIItR m3rDwmqNcCtjOY6UGsQXhNuvtZlDhbrRYtZnB6z+UH09RhcmWr3l6D7nw17np3w27LNc +gALXsRXCDfWJIQY9jxWaP1yOJXCcKbzhiCWDiJazDJ8DJOSTfuCc+7fygqjpEfONPoZ mWT+8NfcGOSiGntVvgKj7UOaUuefAv8OwsB/yGVNLaCNfm5o+VWLicKSYYUIzD1mc8Nt rLnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:dkim-signature:arc-authentication-results; bh=dZwe0GUzKQgCKtMy2/cm1JkmWY5SNodtbux6Dd3Kyqk=; b=GyrNo4Jpmh6Kz0Nh9hlgtg9/Cu0MEq3zCAdtH82iiBKBJ/Iy2Ap3WYXW3vlSTePUBb u0E9lzos/aBY1ByocepviuZHmMILdOglEQGa1dZEmhjkZK2Ucsh4QDuDP01ZpXr2ENCR G5oKB4KsVBO6z7dVdEncYHz1ccce/fIEIkLGHoDROEVXa8ZVq8tio+54q/efVp7t1s8V 2+fIXIBTRZRbTctF+MkZWZEj/OuC9q+CGQD6aDzdC+x/a5n37SoE13FDi1s0htjXR4BT latVVTazahyss5DeZDM6HMto8qPaEUcGXgbrGGXeKfo1fbb/QF9M6wFQMErUyQ4d/2Bj OcfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Exuobkb+; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id r15si6015505ite.147.2018.03.05.08.07.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Mar 2018 08:07:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Exuobkb+; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1essbD-00075o-Lh; Mon, 05 Mar 2018 16:04:27 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1essbC-00075L-C0 for xen-devel@lists.xenproject.org; Mon, 05 Mar 2018 16:04:26 +0000 X-Inumbo-ID: b8cdebee-208e-11e8-ba59-bc764e045a96 Received: from mail-wr0-x243.google.com (unknown [2a00:1450:400c:c0c::243]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id b8cdebee-208e-11e8-ba59-bc764e045a96; Mon, 05 Mar 2018 17:03:20 +0100 (CET) Received: by mail-wr0-x243.google.com with SMTP id n7so17838460wrn.5 for ; Mon, 05 Mar 2018 08:04:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1Y1UG90+s/69I1pqxbjE6+oxVVCivS71NHnwaFGq0lY=; b=Exuobkb+eU5I2wOitPJUFBc3X70OADk1IQ06/Ekj1RxZ9RWty7si79Y4IgNdooEWw+ 7TwDQoZrJVI7wvNOrMunhs6HOiIi2ocffmx61z44WQCAMhgfHvJSeSTAxZv9Vzb21E9t 5tFE11Nptr2lMHKbPPTrvSAOLFLFu01CcjsnQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1Y1UG90+s/69I1pqxbjE6+oxVVCivS71NHnwaFGq0lY=; b=PBKK6d3q0d5jws1cJSCKM/2StBD5jPZdkfDm/geqjmWAO3rE51kU5P1w+pKQCytl2y 8atasY+OMGAfVp7glPI+i6zuSdX2R2Twfibj42mIDWKMGgl5CBc/aY/SP07E2rapoIRD dlLaHl812zmh5CN1Zfoaio85Yrs9nueA/UfykhAcMX3PV0TgJ5w5tlaWxJP0D0spjN7l hs4Kl61elB9vGuNngncmA1Cn7Fmlem8pWVpkrgLalcqatpRNd33CWGUvgEFyjEBfcFgl Fd0Gb36EIY1ybOQNcVlGXNREKYv0fKfOA9Yt4MbsVYb1jsgjoWEsWoKnzCpzn8zjcatN ABPw== X-Gm-Message-State: APf1xPDypBEl/hrV6uY/O1pFKqof0GoJQ46B8Y+/6lxC8lMXYd0yxvVI bQHoXlFFGL9vTgqcqsuSPuerOw== X-Received: by 10.223.208.196 with SMTP id z4mr12567606wrh.104.1520265864554; Mon, 05 Mar 2018 08:04:24 -0800 (PST) Received: from e104803-lin.lan (mail.andrep.de. [217.160.17.100]) by smtp.gmail.com with ESMTPSA id y6sm6574381wmy.14.2018.03.05.08.04.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Mar 2018 08:04:23 -0800 (PST) From: Andre Przywara To: Julien Grall , Stefano Stabellini Date: Mon, 5 Mar 2018 16:03:20 +0000 Message-Id: <20180305160415.16760-3-andre.przywara@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180305160415.16760-1-andre.przywara@linaro.org> References: <20180305160415.16760-1-andre.przywara@linaro.org> Cc: xen-devel@lists.xenproject.org Subject: [Xen-devel] [PATCH 02/57] ARM: vGICv3: clarify on GUEST_GICV3_RDIST_REGIONS symbol X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Normally there is only one GICv3 redistributor region, and we use that for DomU guests using a GICv3. Explain the background in a comment and why we need to keep the number of hardware regions for Dom0. Signed-off-by: Andre Przywara Acked-by: Julien Grall --- Changelog RFC ... v1: - Keep GUEST_GICV3_RDIST_REGIONS symbol around, just extend comments xen/arch/arm/vgic-v3.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c index 2ad8a6be62..d5b34a7d0f 100644 --- a/xen/arch/arm/vgic-v3.c +++ b/xen/arch/arm/vgic-v3.c @@ -1632,6 +1632,16 @@ static int vgic_v3_vcpu_init(struct vcpu *v) static inline unsigned int vgic_v3_rdist_count(struct domain *d) { + /* + * Normally there is only one GICv3 redistributor region. + * The GICv3 DT binding provisions for multiple regions, since there are + * platforms out there which need those (multi-socket systems). + * For Dom0 we have to live with the MMIO layout the hardware provides, + * so we have to copy the multiple regions - as the first region may not + * provide enough space to hold all redistributors we need. + * However DomU get a constructed memory map, so we can go with + * the architected single redistributor region. + */ return is_hardware_domain(d) ? vgic_v3_hw.nr_rdist_regions : GUEST_GICV3_RDIST_REGIONS; } @@ -1692,7 +1702,7 @@ static int vgic_v3_domain_init(struct domain *d) { d->arch.vgic.dbase = GUEST_GICV3_GICD_BASE; - /* XXX: Only one Re-distributor region mapped for the guest */ + /* A single Re-distributor region is mapped for the guest. */ BUILD_BUG_ON(GUEST_GICV3_RDIST_REGIONS != 1); d->arch.vgic.rdist_stride = GUEST_GICV3_RDIST_STRIDE;