From patchwork Mon Mar 5 16:04:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 130688 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp2854325lja; Mon, 5 Mar 2018 08:07:32 -0800 (PST) X-Google-Smtp-Source: AG47ELuC45kvBKToF6PZeLMq6opQcLxmEryQhGnKfGO4Czettb+1Wm4QATYxI7Gp+s8aAk/tqOBi X-Received: by 10.36.2.75 with SMTP id 72mr14368110itu.83.1520266052260; Mon, 05 Mar 2018 08:07:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520266052; cv=none; d=google.com; s=arc-20160816; b=Jq60YdopBmNdRIf2lttL8XLrPlSqBXiSi8XY+uZdnx4q69dU7kSmvDDISjIMTtJhxe M8lrI5B5LFud6vbF/4OmjJjiDZPYovkMUgSSztCf7Hl8fD58ix14BaY5cMjEJoCG8U6S fTCV7e/cOQOFEI9nczF/nTd5D6BDuCjIPLMLoFn1sAKjwtY00iLFnFWMTCGZvPo1qI31 /0r6LIBE8EM52BqjbCbrjHOea4VR6OUqqstWZhuNGz9dpv7qO7eJVoRT1nLJz1ucxqSv 0MhQ6Of9ATAlrgne0VQszwnN+Fx5P8WZ/ADFq5bNFlQJKtRXOvGF4+51+E0IGJov8aYH vmgA== 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=nz71jaeAw9Yds48R7bLCOzGMZMURcrCoxrEd6t2cHI8=; b=zUf753hBByQ1VShdyzipJrkoasL8o2nRQTdpL2dgaBSaz2LcxVWL0dyFtB6s3DK5g9 cD6U4amMKdr/d/0ccu7RkluDmzgleVyRCw9kW1yjTQrflJFAPj/9UsMTyJWUcJ/UMN5H dQiDiS+d6dILt3OcrkGcu576kNFB5aaApSS2zkCOQOcm3F/VaPmvjT95IyfkA8eRDe75 HLr8PpaPNA0TAm5nSf0qQfR0WOXEeso7W5y3hF09bw0w2Qa1ui7NGjRo6djdD8JvDYc8 8aZnP6Xc12ye/J2mlizgPYhtUW2MJstTasvPmA0jqyexDupxt1uOBvGoTJyZ9khlTdM5 rgSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=WDfe+rdo; 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 q126si8902896iod.28.2018.03.05.08.07.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Mar 2018 08:07: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=WDfe+rdo; 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 1essc8-00017r-Hf; Mon, 05 Mar 2018 16:05:24 +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 1essc6-000105-ON for xen-devel@lists.xenproject.org; Mon, 05 Mar 2018 16:05:22 +0000 X-Inumbo-ID: da1aff8f-208e-11e8-ba59-bc764e045a96 Received: from mail-wm0-x242.google.com (unknown [2a00:1450:400c:c09::242]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id da1aff8f-208e-11e8-ba59-bc764e045a96; Mon, 05 Mar 2018 17:04:15 +0100 (CET) Received: by mail-wm0-x242.google.com with SMTP id s206so13875596wme.0 for ; Mon, 05 Mar 2018 08:05:21 -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=/LaP02xgy0YgZG/jYST1x7VySZMBujg0ahJT1PfxERQ=; b=WDfe+rdoiu0xl7EBlH0q7AORVsHf+ZWxBTgWzSTnSZROLM4NDBtweeMmyrxoLoEtIp H0yvtJ27oWeOc9aS/osNohEMprC7b/LQRxLMoEyZPq0lEntgL5zSC4MYOpCp1o+pW1ZQ NOsica/1Tlgufzoq8uWg9v9KpfwKy9wMakNvo= 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=/LaP02xgy0YgZG/jYST1x7VySZMBujg0ahJT1PfxERQ=; b=Lu1TofK0hEwzTdgedup1LEi/ehhmgeCayaindVq4Yf/5FpGtRC6GJXKvco3//6Mpxl t3vxwH+2CiNGyOMrukxMQcYKheeeqxX4fF53Ahhh9g8Y/zF1b7L1TxP6M2lwMzYZK5gz OQcEObNueojerDCHFa+L6v8ET7ZbbE8rT9XiIDwux0r8ioScvLgtHZ6o9NMVOtXa25ad RnB9NjbpbZCJaugwZbJbYriTCqGPk/3/td+eqxrw5+8YPyHlGqgeLdDVrCFuhgkoUV7n YV2G+2R5X5owJ/IuUXx6ggUoZFicl/h3nqv09DQY2EK9ady3tvrwieMEWDjD+fcuqAoW mNGw== X-Gm-Message-State: AElRT7ElP4pxMh36rCCTcmcDd4wO+/OoUzns3p/TmqglrQj7XV/nTiW+ MTNkiv6wSIG/Ad3LeyDN9iiTk5j0aZA= X-Received: by 10.28.87.75 with SMTP id l72mr8094995wmb.48.1520265920396; Mon, 05 Mar 2018 08:05:20 -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.05.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Mar 2018 08:05:19 -0800 (PST) From: Andre Przywara To: Julien Grall , Stefano Stabellini Date: Mon, 5 Mar 2018 16:04:15 +0000 Message-Id: <20180305160415.16760-58-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 57/57] 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 --- Changelog RFC ... v1: - no changes 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 f42092fec3..f7b4779a71 100644 --- a/xen/arch/arm/vgic/vgic.c +++ b/xen/arch/arm/vgic/vgic.c @@ -978,6 +978,14 @@ unsigned int domain_max_vcpus(const struct domain *d) return min_t(unsigned int, MAX_VIRT_CPUS, vgic_vcpu_limit); } +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