Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1992534pxp; Thu, 10 Mar 2022 16:57:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwt0raqJBQMGciKenvpa6OhSfdxFUCpfZUl7jvtBXocungJ9nQpicuqo3p2CxO2ngq155VD X-Received: by 2002:a05:6402:5304:b0:413:8a0c:c54a with SMTP id eo4-20020a056402530400b004138a0cc54amr6753275edb.172.1646960272757; Thu, 10 Mar 2022 16:57:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646960272; cv=none; d=google.com; s=arc-20160816; b=wgi+qpEIMxw6R89j7wW2HaSK7NVWVGI1ldBNDtI6rfdFRoNTXNTnY0fWUyXThPzEZX Oo2wHqzMGqfOize3hmuXnUTgEFa89uRYe4BzF3oZGXl2NFdLQ/Jw3mq9cSDPxG5fI9pH 4l7NB/R5oU1HopSYh5dps1Ka9d01R9Y32h8jYfNjuEPZWRwUwfk14iQh5qsT9iMYD6xZ wBWS3UyRh6DbEkzpHJZ2ViQlZFlrBoeGHYsgJnOXZqB14ttB7GCRt7ikf1zbIGzDznqq YEJTqbwP2DCAwMqiyJ3WSO2gtAQAWIrPsYGbq/gNzVGW9Fly76LxdMSPHTdIr2eTKGyh ll3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=naO0Q7fFs5A43HqF1DllSaKvbw+zfa5soYL+wIW00vo=; b=JgqeMOiKmr/QQ8wiCftqh9UYoY0SPc3v3H1iijFlJlHJCNOMLRabHTXKdyvLhStDBT R482ianmwZGG1IBqhqTKonBMrSPP9wFUI0GP43/F57EzxPbZYubWF+Wl0KAjI3+7Ou5z wqbiPu/Ft9dQvj1DRQSg6iW8OXijdQFMg9g4U0yDqyuoTUJ+a4FYKbhKQo+T4ioHb+X0 7bD27NMyAqL5WIHC2B6LhDt1uLFJ4Z3p5H7/vTiLR4nwmCbX6nR8/exEN4m/SUSwn9Db NdHCNxc+J/LN+JG6wuwtratS5JPwqBuK3lXcnsUYUWByC+IolLJRFLUjjZlqPCh9m55b 3Q9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb21-20020a170907961500b006d8fa778e5asi4680701ejc.149.2022.03.10.16.57.27; Thu, 10 Mar 2022 16:57:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344893AbiCJXuG (ORCPT + 99 others); Thu, 10 Mar 2022 18:50:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244700AbiCJXuE (ORCPT ); Thu, 10 Mar 2022 18:50:04 -0500 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 450C615FC85; Thu, 10 Mar 2022 15:49:02 -0800 (PST) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 096F91C0B7F; Fri, 11 Mar 2022 00:49:01 +0100 (CET) Date: Fri, 11 Mar 2022 00:48:59 +0100 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Catalin Marinas , James Morse Subject: Re: [PATCH 5.10 38/58] KVM: arm64: Allow indirect vectors to be used without SPECTRE_V3A Message-ID: <20220310234858.GB16308@amd> References: <20220310140812.869208747@linuxfoundation.org> <20220310140813.956533242@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rS8CxjVDS/+yyDmU" Content-Disposition: inline In-Reply-To: <20220310140813.956533242@linuxfoundation.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NEUTRAL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --rS8CxjVDS/+yyDmU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! What is going on here? > commit 5bdf3437603d4af87f9c7f424b0c8aeed2420745 upstream. Upstream commit 5bdf is very different from this. In particular, > arch/arm64/kvm/hyp/smccc_wa.S | 66 ++++++++++++++++++++++++++++++++= +++++++ I can't find smccc_wa.S, neither in mainline, nor in -next. And it looks buggy. I suspect loop_k24 should loop 24 times, but it does 8 loops AFAICT. Same problem with loop_k32. Best regards, Pavel > --- a/arch/arm64/kvm/hyp/smccc_wa.S > +++ b/arch/arm64/kvm/hyp/smccc_wa.S > + > + .global __spectre_bhb_loop_k24 > +SYM_DATA_START(__spectre_bhb_loop_k24) > + esb > + sub sp, sp, #(8 * 2) > + stp x0, x1, [sp, #(8 * 0)] > + mov x0, #8 > +2: b . + 4 > + subs x0, x0, #1 > + b.ne 2b > + dsb nsh > + isb > + ldp x0, x1, [sp, #(8 * 0)] > + add sp, sp, #(8 * 2) > +1: .org __spectre_bhb_loop_k24 + __SPECTRE_BHB_LOOP_SZ > + .org 1b > +SYM_DATA_END(__spectre_bhb_loop_k24) > + > + .global __spectre_bhb_loop_k32 > +SYM_DATA_START(__spectre_bhb_loop_k32) > + esb > + sub sp, sp, #(8 * 2) > + stp x0, x1, [sp, #(8 * 0)] > + mov x0, #8 > +2: b . + 4 > + subs x0, x0, #1 > + b.ne 2b > + dsb nsh > + isb > + ldp x0, x1, [sp, #(8 * 0)] > + add sp, sp, #(8 * 2) > +1: .org __spectre_bhb_loop_k32 + __SPECTRE_BHB_LOOP_SZ > + .org 1b > +SYM_DATA_END(__spectre_bhb_loop_k32) >=20 --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --rS8CxjVDS/+yyDmU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmIqjmoACgkQMOfwapXb+vKocgCfaskmbakMG67jBcUrKypKGRW5 7uAAniypC4Uhk0lyTS6P8Ecd55ECxKhK =yE8B -----END PGP SIGNATURE----- --rS8CxjVDS/+yyDmU--