From patchwork Fri Nov 4 17:32:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 9412981 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 F1E4B60723 for ; Fri, 4 Nov 2016 17:32:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E317F2ADFB for ; Fri, 4 Nov 2016 17:32:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D80352B138; Fri, 4 Nov 2016 17:32:02 +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 81C8D2B126 for ; Fri, 4 Nov 2016 17:32:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936537AbcKDRb7 (ORCPT ); Fri, 4 Nov 2016 13:31:59 -0400 Received: from foss.arm.com ([217.140.101.70]:36682 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935042AbcKDRb6 (ORCPT ); Fri, 4 Nov 2016 13:31:58 -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 277391715; Fri, 4 Nov 2016 10:31:58 -0700 (PDT) Received: from e104803-lin.lan (unknown [10.1.207.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 02E563F318; Fri, 4 Nov 2016 10:31:56 -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 15/16] arm64: enable GICv3-ITS emulation Date: Fri, 4 Nov 2016 17:32:02 +0000 Message-Id: <20161104173203.21168-16-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 With everything in place for the ITS emulation add a new option to the --irqchip parameter to allow the user to specify --irqchip=gicv3-its to enable the ITS emulation. This will trigger creating the FDT node and an ITS register frame to tell the kernel we want ITS emulation in the guest. Signed-off-by: Andre Przywara --- arm/gic.c | 2 ++ arm/include/arm-common/kvm-config-arch.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arm/gic.c b/arm/gic.c index c422e36..cd4f518 100644 --- a/arm/gic.c +++ b/arm/gic.c @@ -43,6 +43,8 @@ int irqchip_parser(const struct option *opt, const char *arg, int unset) *type = IRQCHIP_GICV2; } else if (!strcmp(arg, "gicv3")) { *type = IRQCHIP_GICV3; + } else if (!strcmp(arg, "gicv3-its")) { + *type = IRQCHIP_GICV3_ITS; } else { pr_err("irqchip: unknown type \"%s\"\n", arg); return -1; diff --git a/arm/include/arm-common/kvm-config-arch.h b/arm/include/arm-common/kvm-config-arch.h index ed626b5..b48e720 100644 --- a/arm/include/arm-common/kvm-config-arch.h +++ b/arm/include/arm-common/kvm-config-arch.h @@ -27,7 +27,7 @@ int irqchip_parser(const struct option *opt, const char *arg, int unset); "Force virtio devices to use PCI as their default " \ "transport"), \ OPT_CALLBACK('\0', "irqchip", &(cfg)->irqchip, \ - "[gicv2|gicv3]", \ + "[gicv2|gicv3|gicv3-its]", \ "Type of interrupt controller to emulate in the guest", \ irqchip_parser, NULL),