Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp142761pxp; Wed, 16 Mar 2022 02:26:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywp0Llp9tp3YbWagKhfEmhYwHJUg1kYCSBHEPfnHxVBC9Qkv3rDzf99RNMzNcOm9iGAS5m X-Received: by 2002:a63:7e45:0:b0:374:2e45:5b51 with SMTP id o5-20020a637e45000000b003742e455b51mr27433619pgn.454.1647422773212; Wed, 16 Mar 2022 02:26:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647422773; cv=none; d=google.com; s=arc-20160816; b=zxnQifhpGcnaNrchtSPxHr4RU+zPTTFLx1GBrtea215CPeuAOp01lVnHzmHhyqNX38 mk3hcIk1TyRpDebRPowfiHc0eIcyP1lJ8WrA93GmLXE1VF9khSURlsrEFURNHYPWCkJu QSBlmv+KaymwmZBWQmxxh0Y9QNE7zGvMaWeJyuWY90AEwsSdi9kMkmvXtpSl2D5tzOr3 uhr6/fGoaYM29nN2afDWlzBcAKN3X6SeTKJS0H/6E154FOmP5vv9cyFg6xvuZx643pXd xvwaLHCwJUZVbR3/nwVzrm4qpiVFNL/YaPbUBoPKSVKEWMK2+kyg9YkKckamUqoCvXSA CFdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=93pRayrnKkiDMif18d0TRkfSw4dj6sljnvo6tugIgJ0=; b=CxCn+n7e8nXHNXMojXXAzJlyDhDxvEhjhI+EWWFQd1Lil/cgn6XcwadxIFyyIQtyMX CwI13f4GUhkxy8tFVzrumOtVDlItUn77myhiE+WVUSZcz2Y1MOjdsidIu92eimnd3mya yhC8jx/E+fIXmeKkJG16NwgfY3j7g5ntbvkJoaDB/apeJsMpKWzsR6Q7M8qAJTTUfVzU wp7/C3PXq10OVEHvwiGG2e/XponsTc1MtUo7F8j//nh3hGKyU7WbFFw52YTp6R3Vj+9d 4Flv/511AonhQ5iL+P2ab4yPIdatUBMaTPDe1QnxUr3WcoXqaBB1BghTLXFOMjfFFuKA hjdw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i27-20020a63541b000000b0038178a5d022si1527872pgb.439.2022.03.16.02.25.53; Wed, 16 Mar 2022 02:26:13 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348194AbiCOMVu (ORCPT + 99 others); Tue, 15 Mar 2022 08:21:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241209AbiCOMVt (ORCPT ); Tue, 15 Mar 2022 08:21:49 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 828AB522DC; Tue, 15 Mar 2022 05:20:37 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 218971474; Tue, 15 Mar 2022 05:20:37 -0700 (PDT) Received: from [10.57.90.210] (unknown [10.57.90.210]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4BF293F66F; Tue, 15 Mar 2022 05:20:36 -0700 (PDT) Subject: Re: [PATCH 5.10 38/58] KVM: arm64: Allow indirect vectors to be used without SPECTRE_V3A To: Greg Kroah-Hartman , Pavel Machek Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Catalin Marinas References: <20220310140812.869208747@linuxfoundation.org> <20220310140813.956533242@linuxfoundation.org> <20220310234858.GB16308@amd> From: James Morse Message-ID: Date: Tue, 15 Mar 2022 12:20:31 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi guys, On 3/11/22 6:42 AM, Greg Kroah-Hartman wrote: > On Fri, Mar 11, 2022 at 12:48:59AM +0100, Pavel Machek wrote: >> 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. Yup, that's a bug. Thanks for spotting it! I'll post a replacement for this patch. I only have A57 I can test this on, guess what its K value is. > The kvm portion of these patches is the "trickiest" portions. I'll let > James explain them, as he did so to me when sending the backports. KVM gets re-written fairly frequently. Earlier kernels don't have any of the infrastructure for generating the vectors at compile time and selecting a pre-built vector at boot. Instead, kernels of this vintage have bunch of empty vectors, and some templates they use to create the appropriate vector at boot. See commit b881cdce77b4. I've looked at backporting all that - its about 60 patches. I don't think its a good idea. Thanks, James