From patchwork Fri Feb 9 14:39:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 127859 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp680114ljc; Fri, 9 Feb 2018 06:42:32 -0800 (PST) X-Google-Smtp-Source: AH8x224ZzrI/qeJsyQP+uiGWZIvlc1HbIxO5oo5734QKXq35V3XZxDst7TMlHPLIxY2SbPGkGscw X-Received: by 10.36.47.78 with SMTP id j75mr3640087itj.129.1518187352643; Fri, 09 Feb 2018 06:42:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518187352; cv=none; d=google.com; s=arc-20160816; b=XTFpXMrpRiOwgn1Nlk33GTMW9oarkYnByg8wMlwWdvGKxuKKhjAJ4gDYhxUJI3wWCt KiDYy280YhLqFcH/HlUPMZcUyMQsOdn1x9Uh1HpRRZF1nWoAg5pLXdwa9KvJ8vwgykv2 Oe/RldDViqa68QD3xLBJqH+HVs0SmchvULv5SUhK3oChnYpXXsejuqv8fUJU+Q7jj/xA yHAvVxa3zE3nyO/F/WNc9p3oi/+OlerbkSFyOCyF2ZLz3A4jWttKXu/hGkHWEl4ZW0FM ffHIgstTaFg/kS9qvzBTag/C38vw7zhF8LUZXpt0KiQwiD3Xy7xJvR9jAsll/1fvdqrP Fqzw== 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:references:in-reply-to:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=EgzE8yBf7IzXJ/oFx/y7YxbOd2+2aNJROSOHJZIbkdo=; b=ifbLKpFaoD1R95Tz6lPNjCul7lk0TL1NnNujlJa0AMqC4l6MvSFGOYDn5VUHD3r7A9 daQ8xcDppp7QrZmucekkBRDfiCI5Ge9w1gZgJB4tQiz4/ImBdxoW9EeOFWSxNPb3s+/N HKGkq15YjBmcZxPHhfyJcBi/zWsVA1EoTG2CzJOGPwYo2k9ATut+bTnrxlBVsqM3oWTp oGWjllhtWa3UXnyDWpx+cupRsWBZVq7lBFArhMn3OiRMAzgZt5IgTch9whFIoB1Gisgn 8GXuAo3p3V97SThle/I8UtDQeyjHO9tB82NpMb0Q1PCd/pWkdoISHURPSVMP2R+77Ygr sjhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Nu/JYKwj; 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 v66si1757898iof.268.2018.02.09.06.42.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Feb 2018 06:42:32 -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=Nu/JYKwj; 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 1ek9qy-0002J9-Bu; Fri, 09 Feb 2018 14:40:40 +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 1ek9qx-0002Dk-6a for xen-devel@lists.xenproject.org; Fri, 09 Feb 2018 14:40:39 +0000 X-Inumbo-ID: 20c0937c-0da7-11e8-ba59-bc764e045a96 Received: from mail-wr0-x242.google.com (unknown [2a00:1450:400c:c0c::242]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 20c0937c-0da7-11e8-ba59-bc764e045a96; Fri, 09 Feb 2018 15:40:10 +0100 (CET) Received: by mail-wr0-x242.google.com with SMTP id 111so5589326wrb.13 for ; Fri, 09 Feb 2018 06:40:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=e38F1IMQN5NZdOkxpyVsSK7uZN3fIVvhNOW6NnBhV38=; b=Nu/JYKwj/3OFKqxFO/Ww3ATsLVoNikB8qG/Ne3a7sDPKxQpKqHuVH/+/8hCjDXOeKu va/1nd2w9UQK/Sl3PGeBHcDeJTm7Krz4js66DHXQsB0Blj5nRC+ukmNaNJ0YIMOijpXV 1K2dL84+ss6iz0/5Qxem7iYi+LkIRsSZCj9ho= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=e38F1IMQN5NZdOkxpyVsSK7uZN3fIVvhNOW6NnBhV38=; b=DlCooHe0hOUNfZcQIZ/SmqC67ncVfqaaYb/Y6kkm6CF5WeZJgRhutV27vl1e1QhaHg 4223czy/RD4cga58BNwIz6lqWaKpW6aUrSLQHFay/ZbxaMvSEh7JYcMI8Zbm3+6DlClS Tc/dxaeWmN6Dw7W6lXQkR/Q+wB3voMFQN37Glz77QcEARWH634aUoAshl+xsraz/V0Ey WGkKMiWqiJ/RbKe+AtU2XEdDSCoRD4TmQy+DqLiKHTpLZYEoVkWlwGG0xahbzORynv2h 0TBI4BzIh5bl0CkdiXuz3YR8TBCriBO2SlztKOS6I0DHmP+5v7KUX9nXdqQPZx1iOv0d sABg== X-Gm-Message-State: APf1xPDDB2cYq2HJApQY9VvLWxFAsAr/kGyE5tmonojdVeGZ5afLPfaM LzSYkkWVJ3hcmRDKh9JxFe8bNF+9LWI= X-Received: by 10.223.171.24 with SMTP id q24mr2734784wrc.206.1518187237295; Fri, 09 Feb 2018 06:40:37 -0800 (PST) Received: from e104803-lin.lan (mail.andrep.de. [217.160.17.100]) by smtp.gmail.com with ESMTPSA id b35sm2552229wra.13.2018.02.09.06.40.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Feb 2018 06:40:36 -0800 (PST) From: Andre Przywara To: Stefano Stabellini , Julien Grall , xen-devel@lists.xenproject.org Date: Fri, 9 Feb 2018 14:39:37 +0000 Message-Id: <20180209143937.28866-50-andre.przywara@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180209143937.28866-1-andre.przywara@linaro.org> References: <20180209143937.28866-1-andre.przywara@linaro.org> Subject: [Xen-devel] [RFC PATCH 49/49] ARM: VGIC: wire new VGIC(-v2) files into Xen build system 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" Now that we have both the old VGIC prepared to cope with a sibling and the code for the new VGIC in place, lets add a Kconfig option to enable the new code and wire it into the Xen build system. This will add a compile time option to use either the "old" or the "new" VGIC. In the moment this is restricted to a vGIC-v2. To make the build system happy, we provide a temporary dummy implementation of vgic_v3_setup_hw() to allow building for now. Signed-off-by: Andre Przywara --- xen/arch/arm/Kconfig | 6 +++++- xen/arch/arm/Makefile | 10 +++++++++- xen/arch/arm/vgic/vgic.c | 8 ++++++++ xen/common/Makefile | 1 + 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig index 2782ee6589..aad19927ce 100644 --- a/xen/arch/arm/Kconfig +++ b/xen/arch/arm/Kconfig @@ -48,7 +48,11 @@ config HAS_GICV3 config HAS_ITS bool prompt "GICv3 ITS MSI controller support" if EXPERT = "y" - depends on HAS_GICV3 + depends on HAS_GICV3 && !NEW_VGIC + +config NEW_VGIC + bool + prompt "Use new VGIC implementation" config SBSA_VUART_CONSOLE bool "Emulated SBSA UART console support" diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 41d7366527..2a3ec94a18 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -16,7 +16,6 @@ obj-y += domain_build.o obj-y += domctl.o obj-$(EARLY_PRINTK) += early_printk.o obj-y += gic.o -obj-y += gic-vgic.o obj-y += gic-v2.o obj-$(CONFIG_HAS_GICV3) += gic-v3.o obj-$(CONFIG_HAS_ITS) += gic-v3-its.o @@ -47,10 +46,19 @@ obj-y += sysctl.o obj-y += time.o obj-y += traps.o obj-y += vcpreg.o +ifeq ($(CONFIG_NEW_VGIC),y) +obj-y += vgic/vgic.o +obj-y += vgic/vgic-v2.o +obj-y += vgic/vgic-mmio.o +obj-y += vgic/vgic-mmio-v2.o +obj-y += vgic/vgic-init.o +else +obj-y += gic-vgic.o obj-y += vgic.o obj-y += vgic-v2.o obj-$(CONFIG_HAS_GICV3) += vgic-v3.o obj-$(CONFIG_HAS_ITS) += vgic-v3-its.o +endif obj-y += vm_event.o obj-y += vtimer.o obj-$(CONFIG_SBSA_VUART_CONSOLE) += vpl011.o diff --git a/xen/arch/arm/vgic/vgic.c b/xen/arch/arm/vgic/vgic.c index 77fa756329..690ae892e0 100644 --- a/xen/arch/arm/vgic/vgic.c +++ b/xen/arch/arm/vgic/vgic.c @@ -853,6 +853,14 @@ int vgic_connect_hw_irq(struct domain *d, struct vcpu *vcpu, return ret; } +void vgic_v3_setup_hw(paddr_t dbase, + unsigned int nr_rdist_regions, + const struct rdist_region *regions, + unsigned int intid_bits) +{ + /* Dummy implementation to allow building without actual vGICv3 support. */ +} + /* * Local variables: * mode: C diff --git a/xen/common/Makefile b/xen/common/Makefile index 3a349f478b..92a1d1fa58 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -19,6 +19,7 @@ obj-y += keyhandler.o obj-$(CONFIG_KEXEC) += kexec.o obj-$(CONFIG_KEXEC) += kimage.o obj-y += lib.o +obj-$(CONFIG_NEW_VGIC) += list_sort.o obj-$(CONFIG_LIVEPATCH) += livepatch.o livepatch_elf.o obj-y += lzo.o obj-$(CONFIG_HAS_MEM_ACCESS) += mem_access.o