From patchwork Fri Nov 4 17:32:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 9412983 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D318A6022E for ; Fri, 4 Nov 2016 17:32:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C45202B126 for ; Fri, 4 Nov 2016 17:32:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B79EA2B13B; Fri, 4 Nov 2016 17:32:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F15D2B126 for ; Fri, 4 Nov 2016 17:32:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935042AbcKDRcB (ORCPT ); Fri, 4 Nov 2016 13:32:01 -0400 Received: from foss.arm.com ([217.140.101.70]:36688 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936544AbcKDRb7 (ORCPT ); Fri, 4 Nov 2016 13:31:59 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8576019BF; Fri, 4 Nov 2016 10:31:59 -0700 (PDT) Received: from e104803-lin.lan (unknown [10.1.207.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 611623F318; Fri, 4 Nov 2016 10:31:58 -0700 (PDT) From: Andre Przywara To: Will Deacon Cc: Marc Zyngier , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Vladimir Murzin Subject: [PATCH v8 16/16] arm: add support for vGICv3 and vITS Date: Fri, 4 Nov 2016 17:32:03 +0000 Message-Id: <20161104173203.21168-17-andre.przywara@arm.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161104173203.21168-1-andre.przywara@arm.com> References: <20161104173203.21168-1-andre.przywara@arm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Vladimir Murzin KVM/arm got support for vGICv3 and vITS recently, so make use of it. Signed-off-by: Vladimir Murzin Signed-off-by: Andre Przywara --- arm/aarch32/arm-cpu.c | 2 +- arm/aarch32/include/kvm/kvm-arch.h | 3 --- arm/aarch64/include/kvm/kvm-arch.h | 3 --- arm/include/arm-common/kvm-arch.h | 2 ++ 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/arm/aarch32/arm-cpu.c b/arm/aarch32/arm-cpu.c index 27a8e17..16bba55 100644 --- a/arm/aarch32/arm-cpu.c +++ b/arm/aarch32/arm-cpu.c @@ -12,7 +12,7 @@ static void generate_fdt_nodes(void *fdt, struct kvm *kvm) { int timer_interrupts[4] = {13, 14, 11, 10}; - gic__generate_fdt_nodes(fdt, IRQCHIP_GICV2); + gic__generate_fdt_nodes(fdt, kvm->cfg.arch.irqchip); timer__generate_fdt_nodes(fdt, kvm, timer_interrupts); } diff --git a/arm/aarch32/include/kvm/kvm-arch.h b/arm/aarch32/include/kvm/kvm-arch.h index 1632e3c..cd31e72 100644 --- a/arm/aarch32/include/kvm/kvm-arch.h +++ b/arm/aarch32/include/kvm/kvm-arch.h @@ -1,9 +1,6 @@ #ifndef KVM__KVM_ARCH_H #define KVM__KVM_ARCH_H -#define ARM_GIC_DIST_SIZE 0x1000 -#define ARM_GIC_CPUI_SIZE 0x2000 - #define ARM_KERN_OFFSET(...) 0x8000 #define ARM_MAX_MEMORY(...) ARM_LOMAP_MAX_MEMORY diff --git a/arm/aarch64/include/kvm/kvm-arch.h b/arm/aarch64/include/kvm/kvm-arch.h index 4925736..9de623a 100644 --- a/arm/aarch64/include/kvm/kvm-arch.h +++ b/arm/aarch64/include/kvm/kvm-arch.h @@ -1,9 +1,6 @@ #ifndef KVM__KVM_ARCH_H #define KVM__KVM_ARCH_H -#define ARM_GIC_DIST_SIZE 0x10000 -#define ARM_GIC_CPUI_SIZE 0x20000 - #define ARM_KERN_OFFSET(kvm) ((kvm)->cfg.arch.aarch32_guest ? \ 0x8000 : \ 0x80000) diff --git a/arm/include/arm-common/kvm-arch.h b/arm/include/arm-common/kvm-arch.h index 0f5fb7f..c83c45f 100644 --- a/arm/include/arm-common/kvm-arch.h +++ b/arm/include/arm-common/kvm-arch.h @@ -18,6 +18,8 @@ #define ARM_GIC_DIST_BASE (ARM_AXI_AREA - ARM_GIC_DIST_SIZE) #define ARM_GIC_CPUI_BASE (ARM_GIC_DIST_BASE - ARM_GIC_CPUI_SIZE) #define ARM_GIC_SIZE (ARM_GIC_DIST_SIZE + ARM_GIC_CPUI_SIZE) +#define ARM_GIC_DIST_SIZE 0x10000 +#define ARM_GIC_CPUI_SIZE 0x20000 #define ARM_IOPORT_SIZE (ARM_MMIO_AREA - ARM_IOPORT_AREA) #define ARM_VIRTIO_MMIO_SIZE (ARM_AXI_AREA - (ARM_MMIO_AREA + ARM_GIC_SIZE))