From nobody Mon May 6 05:19:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1609873576; cv=none; d=zohomail.com; s=zohoarc; b=cuUDU4rni2fFsQFAhmmSZIx72FM/R7LcbELVU76dntv4m3S0GwyzW9ba/widBlCDKERbhSZ9+JVPj7gmNKcCGaBA2xummVZe5UKak/epJQGfB9e+US+5czvzSsIeugviqP5xjXfQGT9VHvbsDfyKt20SAqr/4JSDaN2/WqxcvQw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609873576; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=YN3XI7FmJqTvgYzbmtV/NA/ZwEIalOnLutjdkx+rcHU=; b=TPOV3Nb7qHUFe3YpgECbhROCCW7GEI+0pxvhumfyeUJ8L5IeKr0T9fcf2Gm+Ksymc3ZGWBfXhoCMj2UuYtomYac044fQjELC9CBBH5TF+vgnATPqfT2z4hKBh1ZlI2aD4oSGxBfFpe5Ld2pfMk2d+wlcoCUyq6GjjXQhwqy719Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1609873576638270.24714261771487; Tue, 5 Jan 2021 11:06:16 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.62171.109924 (Exim 4.92) (envelope-from ) id 1kwreS-0005vC-QY; Tue, 05 Jan 2021 19:05:52 +0000 Received: by outflank-mailman (output) from mailman id 62171.109924; Tue, 05 Jan 2021 19:05:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kwreS-0005v5-NU; Tue, 05 Jan 2021 19:05:52 +0000 Received: by outflank-mailman (input) for mailman id 62171; Tue, 05 Jan 2021 19:05:51 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kwreR-0005v0-TI for xen-devel@lists.xenproject.org; Tue, 05 Jan 2021 19:05:51 +0000 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id c05a6b15-3cc9-495a-bcc4-30a589dab2f4; Tue, 05 Jan 2021 19:05:51 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 597E322D04; Tue, 5 Jan 2021 19:05:50 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c05a6b15-3cc9-495a-bcc4-30a589dab2f4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609873550; bh=fikjhuChmZH9iH0tunznwz6zhLKEPb/ejQXwAbh5M94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JFgeQqRox7EwNHoNyAHaf2yg4CrAUGid+uJ8iHsOimOWDOaylih8KflN5FrBFUFRx JJWBmmlINQVC3iwP6VqIKj+yVBHOQZhLD8+ewEnxF3k/EaTU/iXP9PvzZAIMNJ1RHH 92Sv2JT9kDG18dQHSCGoDdfdPe3hSNsg+f3b0vXxWC+S7+zKkZDroEMyb3ALc+o5hV J57vv2P5DHVzl+CK3l8R7kEfs+pSC2qzn12ziJeTrZWvAh7lmNM3unuFJ30QQlnp+G mq/SEMoH2vnfJ8RchodkVy8jyXC98+5zE6PFEnFS9DvTVO7aihgK1a5hbMN1fwsmLJ EWet7ugVQeUmA== From: Stefano Stabellini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, julien@xen.org, bertrand.marquis@arm.com, iwj@xenproject.org, Andrew.Cooper3@citrix.com, Volodymyr_Babchuk@epam.com, Stefano Stabellini Subject: [PATCH] xen/arm: do not read MVFR2 on arm32 Date: Tue, 5 Jan 2021 11:05:48 -0800 Message-Id: <20210105190548.13677-1-sstabellini@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ZohoMail-DKIM: pass (identity @kernel.org) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" MVFR2 is not available on arm32. Don't try to read it. Make MVFR2 arm64 only. Fixes: 9cfdb489af81 ("xen/arm: Add ID registers and complete cpuinfo") Signed-off-by: Stefano Stabellini --- xen/arch/arm/cpufeature.c | 2 ++ xen/include/asm-arm/cpufeature.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/cpufeature.c b/xen/arch/arm/cpufeature.c index 1f6a85aafe..9e3377eae3 100644 --- a/xen/arch/arm/cpufeature.c +++ b/xen/arch/arm/cpufeature.c @@ -150,7 +150,9 @@ void identify_cpu(struct cpuinfo_arm *c) =20 c->mvfr.bits[0] =3D READ_SYSREG(MVFR0_EL1); c->mvfr.bits[1] =3D READ_SYSREG(MVFR1_EL1); +#ifdef CONFIG_ARM_64 c->mvfr.bits[2] =3D READ_SYSREG(MVFR2_EL1); +#endif } =20 /* diff --git a/xen/include/asm-arm/cpufeature.h b/xen/include/asm-arm/cpufeat= ure.h index 6058744c18..fa20cb493a 100644 --- a/xen/include/asm-arm/cpufeature.h +++ b/xen/include/asm-arm/cpufeature.h @@ -272,7 +272,7 @@ struct cpuinfo_arm { } isa32; =20 struct { - register_t bits[3]; + register_t bits[2 + IS_ENABLED(CONFIG_ARM_64)]; } mvfr; }; =20 --=20 2.17.1