From patchwork Thu Oct 4 09:29:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 10625771 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1067413BB for ; Thu, 4 Oct 2018 09:40:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E541028AD9 for ; Thu, 4 Oct 2018 09:40:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9CED28AF3; Thu, 4 Oct 2018 09:40:46 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 6C87D28AD9 for ; Thu, 4 Oct 2018 09:40:46 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=XEDlYN0mp5SqehVND2p4wtgipNaM82kncmKbt3veY7Q=; b=tlSwxEQ6dJepug UdrQG92jYxt8N0s1PS8SfkphexDA+CCWP0Lt9lWMoI3DSR8jP8CKVxcMcJIGDwcJZQRhx5YJVmL8M WRiv7d2JUHG3p410Wqq9mmsSlglIYaQFfIBqzlDj/32bzyGNuWWufKPzkkuW5H26Z5o0wZenc67CF 6QCZysGqbZf6KagqRwwy7rbWQOjsqF/NiiUo288AZkZfZ2Qbd4Hm9CuK7Z57CD/JkFkekVltNKqC1 4ba/D34+5EswRwlVUmHbB/GPYWzjuLcOUOY+6SbpMzYTXllk4ikIsbHPbvLOwrjC+36tUBU1Z+/3m sny5IM2p9yMxv3bT2z+Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g807e-0003fX-1l; Thu, 04 Oct 2018 09:40:42 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g807a-0002F8-9U for linux-arm-kernel@bombadil.infradead.org; Thu, 04 Oct 2018 09:40:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=WYWFmQokG6PK4EBAilOURxGmJihAM6422aJ3qzrj8j8=; b=GZunppfja+eNt+JksVuqzhZRXH brc193QAX/VZnfugA7s+oup/zPHjev3XogvAhAI+ACPpJGV/lIHD2P5hjs9no7QQZ4ZpnoQVmuWSS sYnf4LtsS4+xcCd0hedCk0VY8hioZz7JFvSVTW7lrsxVgJSk55I0150y4tzezMVJhxnttOLc/mPFf Dk1ty7RF/wHB+WwO5kEM9uFhsnL8EGN5nuceMNPom5QeYFtkeP2vnRSActkweQR7ZhcoRBLmekvgH KQsv1FwIZFizvcuhDxthKKlRoKRyYO2gHgaw2oPzKA6jtB09OapPr742bwGQMIKY8L+XBjoc1NZyE T3SZmTGg==; Received: from foss.arm.com ([217.140.101.70]) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g7zxU-0006aM-4B for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2018 09:30:14 +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 8C18080D; Thu, 4 Oct 2018 02:29:59 -0700 (PDT) Received: from filthy-habits.Emea.Arm.com (filthy-habits.emea.arm.com [10.4.13.99]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 28FCF3F5D3; Thu, 4 Oct 2018 02:29:58 -0700 (PDT) From: Marc Zyngier To: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= Subject: [PATCH] ARM: KVM: Correctly order SGI register entries in the cp15 array Date: Thu, 4 Oct 2018 10:29:46 +0100 Message-Id: <20181004092946.59836-1-marc.zyngier@arm.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181004_103012_307995_24C6A1B4 X-CRM114-Status: GOOD ( 12.28 ) 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: linux-arm-kernel@lists.infradead.org, Florian Fainelli , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Christoffer Dall 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 The ICC_ASGI1R and ICC_SGI0R register entries in the cp15 array are not correctly ordered, leading to a BUG() at boot time. Move them to their natural location. Fixes: 3e8a8a50c7ef ("KVM: arm: vgic-v3: Add support for ICC_SGI0R and ICC_ASGI1R accesses") Reported-by: Florian Fainelli Signed-off-by: Marc Zyngier Tested-by: Florian Fainelli --- Paolo, Radim, Could you please send this patch directly to Greg so that it makes it into 4.19? I thought I had it fixed long before the merge window, and obviously didn't... Thanks, M. arch/arm/kvm/coproc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/kvm/coproc.c b/arch/arm/kvm/coproc.c index 450c7a4fbc8a..cb094e55dc5f 100644 --- a/arch/arm/kvm/coproc.c +++ b/arch/arm/kvm/coproc.c @@ -478,15 +478,15 @@ static const struct coproc_reg cp15_regs[] = { /* ICC_SGI1R */ { CRm64(12), Op1( 0), is64, access_gic_sgi}, - /* ICC_ASGI1R */ - { CRm64(12), Op1( 1), is64, access_gic_sgi}, - /* ICC_SGI0R */ - { CRm64(12), Op1( 2), is64, access_gic_sgi}, /* VBAR: swapped by interrupt.S. */ { CRn(12), CRm( 0), Op1( 0), Op2( 0), is32, NULL, reset_val, c12_VBAR, 0x00000000 }, + /* ICC_ASGI1R */ + { CRm64(12), Op1( 1), is64, access_gic_sgi}, + /* ICC_SGI0R */ + { CRm64(12), Op1( 2), is64, access_gic_sgi}, /* ICC_SRE */ { CRn(12), CRm(12), Op1( 0), Op2(5), is32, access_gic_sre },