From patchwork Wed May 3 10:45:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 9709343 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 1B19360351 for ; Wed, 3 May 2017 10:52:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D24C2015F for ; Wed, 3 May 2017 10:52:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01FFE285E8; Wed, 3 May 2017 10:52:32 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 75F182015F for ; Wed, 3 May 2017 10:52:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=tF1yLr/5g9KdKy4kS2LX0Z7MYjbrTU7il0X6HsgBcAU=; b=WTeqvgE7vXoTdkjRlykFVcCEpH b1UsIEHjNu3BaTNAgwdOD4Pf7BMYUn2XzQyGSHNs6HS3m4YBITJgbXm+ZltYP8Zq/fQavZre8qFTn HMPNe3FVBDqFZeboPWyeECooI/gh5zn07XroyV2Iq8AP7VIdKQkKtpDmq1GDDp/jBVgCNHzyq+D/z LU7f6halGnvtMwFL6rZlZGod0a5CvZpI+c0cjeDo7j7PJZAIYbXkaBdcjN2WwzmYaFpAtyQcl7y/w cOXpvsq5CVDkw7jM8jSYnsuatAKdsgHyQRSk7sG/QVG+SjffWpTw+XQJWWu266GXghBHX4njdXcRr +4+WkZ2Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d5rtW-0007QK-SM; Wed, 03 May 2017 10:52:30 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d5rob-0000NE-L8 for linux-arm-kernel@bombadil.infradead.org; Wed, 03 May 2017 10:47:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7zhY+MTSsTmQn1QsL716Jt1/FYv405zkXCdy3hvhSlk=; b=rdN/uxSxVZmSN30GaBuh5TS33 7Pj1SM8j7itavgErFD2h7mTCM30O2PJCxA3QiWrx6+iIvMK6N6ZmR0mHu230ovKlmF5/aa2cAdcoo 0iGHZ04mMhMuaPRXjFScv+HHkunMYHGqie7xu43ori54D41CparUmF5W/jpqO/QaE1KpDPbYmsGml f5+350YhZRjE6RpBD1ezQsHagyyNoMlaUDH01yWso634LrR/ytxsGelmnl91bHxTH99r7xsP8I07A R9nuG7sZJDR+wKouuFhIPWPT05Dnhqxe8o9yLImBH48E7hOAJiYI1kcx+V7E1ddeWhqt9XTgNnlfs a6ww334Cw==; Received: from foss.arm.com ([217.140.101.70]) by merlin.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d5roY-0003Ba-P5 for linux-arm-kernel@lists.infradead.org; Wed, 03 May 2017 10:47:24 +0000 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 9FEF11A3B; Wed, 3 May 2017 03:46:50 -0700 (PDT) Received: from approximate.cambridge.arm.com (approximate.cambridge.arm.com [10.1.207.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5922F3F4FF; Wed, 3 May 2017 03:46:49 -0700 (PDT) From: Marc Zyngier To: Christoffer Dall Subject: [PATCH 23/31] KVM: arm64: Enable GICv3 Group-0 sysreg trapping via command-line Date: Wed, 3 May 2017 11:45:58 +0100 Message-Id: <20170503104606.19342-24-marc.zyngier@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170503104606.19342-1-marc.zyngier@arm.com> References: <20170503104606.19342-1-marc.zyngier@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170503_064722_972676_EFC98461 X-CRM114-Status: UNSURE ( 8.31 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , kvm@vger.kernel.org, David Daney , Catalin Marinas , Robert Richter , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Now that we're able to safely handle Group-0 sysreg access, let's give the user the opportunity to enable it by passing a specific command-line option (vgic_v3.group0_trap). Signed-off-by: Marc Zyngier --- virt/kvm/arm/vgic/vgic-v3.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/virt/kvm/arm/vgic/vgic-v3.c b/virt/kvm/arm/vgic/vgic-v3.c index 812f179a6931..7c82c586d44a 100644 --- a/virt/kvm/arm/vgic/vgic-v3.c +++ b/virt/kvm/arm/vgic/vgic-v3.c @@ -327,6 +327,12 @@ int vgic_v3_map_resources(struct kvm *kvm) DEFINE_STATIC_KEY_FALSE(vgic_v3_cpuif_trap); +static int __init early_group0_trap_cfg(char *buf) +{ + return strtobool(buf, &group0_trap); +} +early_param("vgic_v3.group0_trap", early_group0_trap_cfg); + static int __init early_group1_trap_cfg(char *buf) { return strtobool(buf, &group1_trap);