From patchwork Tue Apr 25 14:39:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 9698325 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 620C46020A for ; Tue, 25 Apr 2017 14:38:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45C1E28484 for ; Tue, 25 Apr 2017 14:38:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A95A2857D; Tue, 25 Apr 2017 14:38: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 CE6E428484 for ; Tue, 25 Apr 2017 14:38:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1948245AbdDYOiD (ORCPT ); Tue, 25 Apr 2017 10:38:03 -0400 Received: from foss.arm.com ([217.140.101.70]:42192 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1948217AbdDYOht (ORCPT ); Tue, 25 Apr 2017 10:37:49 -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 673591AED; Tue, 25 Apr 2017 07:37:47 -0700 (PDT) Received: from e104803-lin.lan (unknown [10.1.207.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 41C9F3F220; Tue, 25 Apr 2017 07:37:46 -0700 (PDT) From: Andre Przywara To: Will Deacon , Marc Zyngier Cc: Jean-Philippe Brucker , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [kvmtool PATCH v10 15/15] arm64: enable GICv3-ITS emulation Date: Tue, 25 Apr 2017 15:39:32 +0100 Message-Id: <20170425143932.17235-16-andre.przywara@arm.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170425143932.17235-1-andre.przywara@arm.com> References: <20170425143932.17235-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 d9c3175..9de6a9c 100644 --- a/arm/gic.c +++ b/arm/gic.c @@ -26,6 +26,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),