Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4293703pxb; Tue, 2 Nov 2021 07:24:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzJPii6qNrLGNUW+xShkDxvwyIu4mOzhjTqM0sYoKO8bo1B+qgTL74+dgVoBE0aYY9AhzH X-Received: by 2002:a05:6602:2b90:: with SMTP id r16mr26615441iov.66.1635863040409; Tue, 02 Nov 2021 07:24:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635863040; cv=none; d=google.com; s=arc-20160816; b=X9Vi+W5W9ZeUlthT7Qw8qJMAdhnkqGXSrfS7B1fvSs42DEa8s+N26DeXS1GRrgbHsG bYha1LnzC0q/6j2zD8oqqeErj1jIwyuhOkqRoD0jr2h3CFFa/XW5vUHmiYFQTbDJBkmZ p90mw+B476dm7dno92R3mR4cEjp1qKCMXwlOg+Nz1VZHEboR59j5sc1TP0UlgiMUMQ80 apR0uJdBR5auM3DtaF+Aa7aj778dqnvvN9FJ+jKjWLfxF7f/IMyYL1nIZWZaV+qbN4dL ZFGzOaT4xu8XU6OUd1CXo7g3sQMRsxzOc9j6B9myei9AJIdwB6jZBwLevrQXZen0FtOw n2TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=63IOB9jRdXUGAooHjzUqMr+AM+45Pd5GmDjRByI/XbI=; b=imIAg7k2Qa851wRCsD3XH5cEMqiDMwmCv45/8nIXPIhbC2ad6oRPt+Kx1GEWvuWsZ4 cbwoOAlGf6O6yZZWHHBibrF2mjTGaxLAioPml3nqNdiGIksIdC7WoEBHDAGhAhvSABGG Rn0dbypAZxweiccUSgt+rRJpbeu3KnF+H29l7SlQ99Csj8k0KYDho3Jg/vS7jOz2nC04 dmU07epoN40AmEjHE4djJS1AVHUkw0zzsUwb1GlKQ9EQiS+jJwQuli+qjgLWdEbN0Bqr rreeJXKGOdmfGE75SxcM6wsnvyLCZsS2pQiTy/ttQt57WqWf1r6pmJIlsdXbO9p7m0OH Tfow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qi4MgoYm; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t20si32362684iov.32.2021.11.02.07.23.47; Tue, 02 Nov 2021 07:24:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qi4MgoYm; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231347AbhKBO0S (ORCPT + 99 others); Tue, 2 Nov 2021 10:26:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbhKBO0J (ORCPT ); Tue, 2 Nov 2021 10:26:09 -0400 Received: from mail-pf1-x44a.google.com (mail-pf1-x44a.google.com [IPv6:2607:f8b0:4864:20::44a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD560C0613B9 for ; Tue, 2 Nov 2021 07:23:33 -0700 (PDT) Received: by mail-pf1-x44a.google.com with SMTP id j3-20020a628003000000b004811bc66186so3116188pfd.5 for ; Tue, 02 Nov 2021 07:23:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=63IOB9jRdXUGAooHjzUqMr+AM+45Pd5GmDjRByI/XbI=; b=qi4MgoYmDEaLYqbeJbKBcxSIcp/8i0isps5OLMCXixb4n3H16s6alormsch+ATl6Kn Z2pkLw95tCm6HK96SFLKo6IDh6coBNXhl8VIXccM2QK8YNpIEOuTbNAB4aHtklBylK3d gn1U3F0peJ3bvludQKGt5QJLvD3m/LZJ0ZFEb9MjS0c2YZONBgXLORkNxZYWZBIBJZfB dqPL+JovaI2bQMp9ya9sldwT3NZgFnXGiaZzZOiJB/aNLCoBbNWHLdfo0XIomiebZOet aP7TIGzfmU43Ozh/kfwl9b0hkofWDt3F+qowWRMQ4J5ecqDVkfCxKb9J2pfMJJQR/wFB OnKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=63IOB9jRdXUGAooHjzUqMr+AM+45Pd5GmDjRByI/XbI=; b=yphm+BoE8vGqd+tdQk5TUisO9Ai+s8xMIkEpNNqVeWtn0RK2o8oXcaKwhs+K6rWMCo 8gMm83/WhFzz0/LUF2hJ9+Mg8vcL9AUv5dLCdyLQL0mF4RgElU4kShE556FHzmcmZVHs kpg1W1RRXwNfVkSx1JVgn1GhAHt2y7osito3TRmuIfsMbtMt4hnAPDvo42rh5aqJc3pz AUx4I8eXsUE7fe3mlPxFTjQZsWEXiuzMEWJc5koirDhOD54tzzP/YxwrLtsLEpjv60o4 txKEZyPFQSkZ5dtHcDuSAy2TqP2md6yS4j8fJpdTMbA41UFCpAyt0HAXL9yUC0xoT8yf j6vQ== X-Gm-Message-State: AOAM531dxgE9vWnq9Y9A8jT7aZw6rhPxxoJWfjlmweWIMSG0uoN9Ugzo h+XwiWQiiOnxDpBinh3hAYclm+KEGqk= X-Received: from pgonda1.kir.corp.google.com ([2620:15c:29:204:3109:8497:f59d:9150]) (user=pgonda job=sendgmr) by 2002:a63:83c6:: with SMTP id h189mr13190826pge.126.1635863013160; Tue, 02 Nov 2021 07:23:33 -0700 (PDT) Date: Tue, 2 Nov 2021 07:23:27 -0700 Message-Id: <20211102142331.3753798-1-pgonda@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.33.1.1089.g2158813163f-goog Subject: [PATCH V3 0/4] Add SEV_INIT_EX support From: Peter Gonda To: thomas.lendacky@amd.com Cc: Peter Gonda , Marc Orr , David Rientjes , Brijesh Singh , Joerg Roedel , Herbert Xu , John Allen , "David S. Miller" , Paolo Bonzini , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org SEV_INIT requires users to unlock their SPI bus for the PSP's non volatile (NV) storage. Users may wish to lock their SPI bus for numerous reasons, to support this the PSP firmware supports SEV_INIT_EX. INIT_EX allows the firmware to use a region of memory for its NV storage leaving the kernel responsible for actually storing the data in a persistent way. This series adds a new module parameter to ccp allowing users to specify a path to a file for use as the PSP's NV storage. The ccp driver then reads the file into memory for the PSP to use and is responsible for writing the file whenever the PSP modifies the memory region. Signed-off-by: Peter Gonda Reviewed-by: Marc Orr Acked-by: David Rientjes Cc: Tom Lendacky Cc: Brijesh Singh Cc: Marc Orr Cc: Joerg Roedel Cc: Herbert Xu Cc: David Rientjes Cc: John Allen Cc: "David S. Miller" Cc: Paolo Bonzini Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org David Rientjes (1): crypto: ccp - Add SEV_INIT_EX support Peter Gonda (3): crypto: ccp - Fix SEV_INIT error logging on init crypto: ccp - Move SEV_INIT retry for corrupted data crypto: ccp - Refactor out sev_fw_alloc() .../virt/kvm/amd-memory-encryption.rst | 6 + drivers/crypto/ccp/sev-dev.c | 226 +++++++++++++++--- include/linux/psp-sev.h | 21 ++ 3 files changed, 221 insertions(+), 32 deletions(-) -- 2.33.1.1089.g2158813163f-goog