Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp3044481rwb; Sat, 6 Aug 2022 11:16:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR59F5MEijersAGYXG4G3W1NFe/deCAJH088LtBbZ8/vJuFXM/0+NeTfXdM0koFdVBmplD9X X-Received: by 2002:a05:6402:400b:b0:43d:b0a1:dee with SMTP id d11-20020a056402400b00b0043db0a10deemr11465663eda.223.1659809786650; Sat, 06 Aug 2022 11:16:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659809786; cv=none; d=google.com; s=arc-20160816; b=NHaE24VqFwrjBVnqwxJFTLweaFngDvuu0yvjM/rwzbukvEsP8eb21JhPgrECcMe/uv TnrgOzNGEgw2VCZyaxlZC0ZykYLXH52OVj6JbqTrhrZr7z3mA53C7XS9g7nVGvQr1gx6 zZgA/uJ51mAncEcLtJ9vwBeS0B0iQEs4e5VhfhAaoa6mRZs8ioUTrT3nPStit4WOHnya qMK0miCg6jw/44WpZh0snCmNe3eSPwZSpwSNOClfq88BMS+UZxqYUHkPL+ZxZz1/+Yk3 8smrOUlcvfLxAWU8NzyJpafIyPTAslXW+BZnBojdXkHMuZYmDkqv3L3C7U9BYeKNy6kD gp/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OJ0AxDDwFvHpYWcsRVHW6+uIL62MfvktTtK/nwHeUic=; b=dK2bPwv4IFDEb1gEIkaFWwjX9mw/V2oCHfu0ZhloDFigTsaINaSKEpXCC7VodREyI1 Jk88JEbI21Y/TVkknCyxQ0d8w3HMs0mdflct69ENXnljPiweKcTtPJwDrbxHlWbpqacZ X1iVUJXLgXHLcvIhWNhSW5RY87BeeCA100EUVsNW+hf39f+pNUoAro1Qh9fAwqXjIHYf 6oBVf8o6DJHIsyHOhGAZUQBY0Flken2l5V8rQYafJ/CxT+tuOUNIr/UCUp+zrdUeM8BU g9xDHa+g4WB12LCzhc8QJG2+Yz49Q+ID0NfAnHYU0y6/DB8rNteRsSlGvejRp2Wx9OcI +9ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gFgMuRn+; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb1-20020a170906b88100b007307fd1b9bbsi5389417ejb.589.2022.08.06.11.15.51; Sat, 06 Aug 2022 11:16:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gFgMuRn+; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231131AbiHFSPZ (ORCPT + 99 others); Sat, 6 Aug 2022 14:15:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231272AbiHFSPV (ORCPT ); Sat, 6 Aug 2022 14:15:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 380935F63; Sat, 6 Aug 2022 11:15:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BDF7D6120D; Sat, 6 Aug 2022 18:15:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BCA87C433C1; Sat, 6 Aug 2022 18:15:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659809719; bh=BY4p8tvAesSfXHOIklqi1YqTC0LMDLSpqbPlDu6FZHw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gFgMuRn+fh47VY2tmn9To+ifXShkp4IqH6Nr90jbeljoYgvrAeWY5UraRRdkghz+e xzm5L6LV2uQ0Zt6Tfstd436otgB9fsOpzavtO6V11LJPx8QZjr6yiIwvXe7IfDgPLO Hm12d0O2aiv1wK1rCumewu8MU7C7xVVDFRvHFkSPKnYJ0ztW9ayobWb4ThngMMUsG/ FFmeO0/syPaUu4/1siEHvZuCfZgPvlXtCQIIEUEyD6Tcqf/s3lHkeu1PDZS+9H7KsS rZn35vZ1g0y/ErJ7F4HA0CHSe42T168NrIai9tBMkxQZSLP6mUegUdi0WiK0UArnMj qpovbcbGeADVw== Date: Sat, 6 Aug 2022 21:15:16 +0300 From: Jarkko Sakkinen To: Harald Hoyer Cc: Tom Lendacky , Paolo Bonzini , Jarkko Sakkinen , Brijesh Singh , John Allen , Herbert Xu , "David S. Miller" , "open list:AMD CRYPTOGRAPHIC COPROCESSOR (CCP) DRIVER - SE..." , open list Subject: Re: [PATCH] crypto: ccp: Load the firmware twice when SEV API version < 1.43 Message-ID: References: <20220804010223.3619-1-jarkko@kernel.org> <58e8f9dc-a8d3-a2a5-2dd7-0783355e2567@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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-crypto@vger.kernel.org On Thu, Aug 04, 2022 at 03:37:20PM +0200, Harald Hoyer wrote: > Am 04.08.22 um 15:13 schrieb Tom Lendacky: > > On 8/3/22 20:02, Jarkko Sakkinen wrote: > > > From: Jarkko Sakkinen > > > > > > SEV-SNP does not initialize to a legit state, unless the firmware is > > > loaded twice, when SEP API version < 1.43, and the firmware is updated > > > to a later version. Because of this user space needs to work around > > > this with "rmmod && modprobe" combo. Fix this by implementing the > > > workaround to the driver. > > > > The SNP hypervisor patches are placing a minimum supported version > > requirement for the SEV firmware that exceeds the specified version > > above [1] (for the reason above, as well as some others), so this patch > > is not needed, NAK. > > As described in the "Milan Release Notes.txt" of the AMD firmware update package amd_sev_fam19h_model0xh_1.33.03.zip. > > "If upgrading to 1.33.01 or later from something older (picking up > CSF-1201), it is required that two Download Firmware commands be run to fix > the "Committed Version" across the firmware. CSF-1201 fixed a bug where the > committed version in the attestation report was incorrect. Performing a > single Download Firmware will upgrade the firmware, but performing a second > one will correct the committed version. This is a one-time upgrade issue. > " Reference should be part of the commit message. I'll update for the next iteration. Thanks for the remark. BR, Jarkko