From patchwork Wed Jan 24 14:35:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 125672 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp457015ljf; Wed, 24 Jan 2018 06:37:41 -0800 (PST) X-Google-Smtp-Source: AH8x2265kuJyapoJEFdqjzVFw6WWEtFku5ppSvuI/I4OGkT29/VEtuOE0+sShnRf8qiM26AwYPGP X-Received: by 10.107.141.83 with SMTP id p80mr8215517iod.97.1516804661758; Wed, 24 Jan 2018 06:37:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516804661; cv=none; d=google.com; s=arc-20160816; b=S5woiDbFvhAf39sQizCokDUgXTxDbejlTZCsENeqL2naNC6xVU6MVmCQXBOtc3JdfI LBgB6NuL4bNXiSCDxj8rU0+PEuEa5aPme+pK3p6Qg4mhDde/w25ZPzNMUOSnkw8l3jZN BNuoDxxKlAfwHl5PE/pdAXmTT/Ez2GjXfPEEYk+aUkObMHWa8gy8tQHTV7mGW8SMBvPy 361VzNvUPYQ5/0QxeynxER706TcFFeYeDmMX8yEILxQZ6W+jHXsU2LBeo4MpgqPPMZ+5 BvEP9v1BzRQdA/gzZIoRF9LoM+t1DhAcHWqG2cPi9OydbpW7HXE3g+n9n+bKA0LfF5G7 lY1A== 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:message-id:date:to:from:dkim-signature :arc-authentication-results; bh=+kj/DDeXtTEFuiGVwLyogU5GXrUIOvYS+WpWKrxSLVg=; b=PZn8pMawW/sUZTtgbyuEmYOvjLsBHA8h0Vf4W0crcE/95vqz500eFWhrklCqDAzwxb XhYKlLlDJekM+74I6t8dT8O5kS7XQAQqWTp4EvqO7s0XqEsLSt5c+EuSO1eF8Wt4NAPH JCQ8kA5Pqi70sD0NvBBROVmojrtLoHUnq7QSzJMxJnabDLh35VU4tZpgmSXfERWjxxzm JZBaUkZJNaUhO7vMMwmmeY6aabKwqGl/ylLP3se2s1LjKn5j9xw5ghsRYF+1p8aeW/c9 MO+V5EKYJgYXkpius1V3PIE/sVeLwjWwmxO0fg0NepVb40esY9vxujckyzPsGrcGr3g0 Zgfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=NtXhXTmE; 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 196si295400itz.9.2018.01.24.06.37.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2018 06:37:41 -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=NtXhXTmE; 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 1eeM90-000148-FW; Wed, 24 Jan 2018 14:35:18 +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 1eeM8z-00013m-1f for xen-devel@lists.xenproject.org; Wed, 24 Jan 2018 14:35:17 +0000 X-Inumbo-ID: c78113a8-0113-11e8-ba59-bc764e045a96 Received: from mail-wm0-x241.google.com (unknown [2a00:1450:400c:c09::241]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id c78113a8-0113-11e8-ba59-bc764e045a96; Wed, 24 Jan 2018 15:35:10 +0100 (CET) Received: by mail-wm0-x241.google.com with SMTP id 141so8961424wme.3 for ; Wed, 24 Jan 2018 06:35:14 -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; bh=dHs5l2wYLG7dRWAGRiHSDq84QXAmb6NP8EID7ykdzLY=; b=NtXhXTmEgiOlOF+tYL2ElAVu2uhbdwCz3OjyebYxLzpcopWwHFbhyV2LHvGpw3yEL8 z/Glp96iSC267zvk6zVT2xTkDDlEsAdQlW/A1jgEz0IUfBW+Wcx6B0uAUG95XYCt3fOI 2nzRoSpXzkljM4G4qDneGBl4ArLvzYGCa6/uw= 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; bh=dHs5l2wYLG7dRWAGRiHSDq84QXAmb6NP8EID7ykdzLY=; b=CF/wlMU5cGtGsVxPNu4+LLguWnEz0wjbfTCh3BC6Non+gFaJwMhwkRgDKImUGlWdwy 9KasBoM8Y9vJ8ZyKTX6RVui3h8/cEMwRvd86zJRKNK0dO/VrUUk0hX8g+22hSb9MtKKt +9OHNi7KZKPliUfGv/TUkcUeYgOlUMBzzT/FoVKOA2/DQszxsySgVJ2r0/81loHCquTE /3pOW9ws3KFV18VQw0EA1qOYYm13fj7kww8uPBqQFGA6ROC6GfGvToAf+HfmVqUt/LtU /BFaWXJ1OYYtRRJ8eTpjQ26sZSglLO2ZK6ANzKEpW51pLF7uXc1EFUtFPSbhaRKpavpf P1oA== X-Gm-Message-State: AKwxytd/U5HjeTudQIYWsytSnoy9SZ7RjI/wBgL1Gm0O9aNq/2YXQRvc rAOTB7ebMZqya76pLYtmKRtZTg== X-Received: by 10.28.67.194 with SMTP id q185mr4803922wma.76.1516804512790; Wed, 24 Jan 2018 06:35:12 -0800 (PST) Received: from e104803-lin.lan (mail.andrep.de. [217.160.17.100]) by smtp.gmail.com with ESMTPSA id l9sm3267923wrb.91.2018.01.24.06.35.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Jan 2018 06:35:12 -0800 (PST) From: Andre Przywara To: Stefano Stabellini , Julien Grall Date: Wed, 24 Jan 2018 14:35:10 +0000 Message-Id: <20180124143517.18469-1-andre.przywara@linaro.org> X-Mailer: git-send-email 2.14.1 Cc: xen-devel@lists.xenproject.org Subject: [Xen-devel] [PATCH 0/7] ARM: vGICv3: clean up optional DT properties 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" The GICv3 devicetree binding describes two optional properties (redistributor-stride and #redistributor-regions), which are meant to work around implementations which deviate from the architecture. By the nature of those they are only needed if the values are different from what the architecture describes (1 region with a stride of 128K for GICv3 and 256K for GICv4). While we need to fully parse and obey these properties for the hypervisor GIC driver, the visibility for guests should be very limited: * DomUs get to see an emulated interrupt controller and a constructed memory map, so don't need those properties at all. * Dom0 gets to see an emulated interrupt controller, but has to live with the host's memory map. That means we have to propagate multiple regions, but can (and should) use the architected stride. In the moment those properties get more attention in the code than they actually deserve: so far there seems to be only one platform using those, and ACPI actually doesn't have any provisions at all to describe those systems. This patch series cleans up the handling of these properties, underlining the workaround feature and helping to reduce a dependency between the GIC and the VGIC (which was the actual driver of this series). Patch 1 removes the redundant properties from DomU's device tree. Patch 2-4 clean up the handling of the regions property, using it only for Dom0, when needed. Patch 5-7 rework the handling of the stride parameter, by simplifying it for the host GICv3 driver, and removing it at all from the VGIC. Cheers, Andre Andre Przywara (7): tools: ARM: vGICv3: avoid inserting optional DT properties ARM: vGICv3: drop GUEST_GICV3_RDIST_REGIONS symbol ARM: GICv3: emit optional DT property only when necessary ARM: GICv3: use hardware GICv3 redistributor regions for Dom0 ARM: GICv3: simplify GICv3 redistributor stride handling ARM: vGICv3: always use architected redist stride ARM: vGICv3: remove rdist_stride from VGIC structure tools/libxl/libxl_arm.c | 8 ------ xen/arch/arm/gic-v3.c | 54 +++++++++++++++++++-------------------- xen/arch/arm/vgic-v3.c | 45 +++++++++++++------------------- xen/include/asm-arm/domain.h | 1 - xen/include/asm-arm/gic_v3_defs.h | 5 ++++ xen/include/asm-arm/vgic.h | 1 - xen/include/public/arch-arm.h | 3 --- 7 files changed, 49 insertions(+), 68 deletions(-)