Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2539729pxb; Sun, 17 Oct 2021 18:18:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/Rf4itKP2AAJV7/7fsOiyofqjlDFVlDeUUJI8E69S4rDyLaHklWIZ4bJdZFqI2Pm4xwOn X-Received: by 2002:a17:90a:4306:: with SMTP id q6mr30302155pjg.17.1634519892186; Sun, 17 Oct 2021 18:18:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634519892; cv=none; d=google.com; s=arc-20160816; b=jmamQKGQJ27MyZc7FDIkUl3cRpqGz1FQlrWhrhlJH92pOcfh3UqKhn6Y7B5qiMZT0O lVEL1rjGgBFyuCbGF7pNKjplt5L8tgy932soreLM54kD1+t6gR58j6RNen95nkBP0ONN Xih2IadjLSD+OWidbO8VlNGMaawIoR5L4FdVJj4GaCJVzqpDFpsTjIqLlEefRe5EGwKx ExB+tRveipflPdjziVFuu2xva90bTKtagxygnEGgOyNd/GGc4RUQMmzs9eJbuTUiHhBN NBBojQQDQXq9UN7iEF0KY5qHhLBcNrpyjHTYU+B1bXwQ75FmCMq6btTtYiD0KcTiaoq8 SmzA== 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=aaCe1c/Il7mwzazLNOhBGe2zeoY0WJjHVx8W7f1BZpY=; b=jWlWduqxCtqG5HcIxjPmFOHjHEquVxxHT9OHd7JiAS0vmtc6BgSTP7Z/aweWDUkr/l /uCIKd9OoM8rrBDTCwuMHN/nj8nc1+sZUf41UrkMI80h4fMgXhWhsA/L1ZAiTEzCVFg9 k5n0051aZbTZsZnJIUJ+OzmtcMK7//PEDW939AkGAkcMpXKhLMoa1AoEwntzybzUSFIt OU1T6GTFcPQZyAijfdC29usDEZhMQOUg0FuaOIvE8PHKf0+tznWlmg1PFUAbIFjfJwjL 96KcZTBHjCKRwAZsMBqKdLAoNj8Y2JICPDeu3qd0sDxYr5d9Hw7dgpSwEXXI7ZKG1dUs T5WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=VHlnVWlZ; 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 q4si17518352pln.35.2021.10.17.18.17.59; Sun, 17 Oct 2021 18:18:12 -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=VHlnVWlZ; 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 S242957AbhJOU3l (ORCPT + 99 others); Fri, 15 Oct 2021 16:29:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238594AbhJOU3l (ORCPT ); Fri, 15 Oct 2021 16:29:41 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56C72C061764 for ; Fri, 15 Oct 2021 13:27:34 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id f21so7098562plb.3 for ; Fri, 15 Oct 2021 13:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=aaCe1c/Il7mwzazLNOhBGe2zeoY0WJjHVx8W7f1BZpY=; b=VHlnVWlZ/Pi2ld0Wgs4bKW4ri4LZhR1mLrjD69QcbOsw5z3yd7R0KP+xvCIFwoCuF6 45XI8i1uJ89nfB+II5BqxkkMe7Q5HyhfoIve+oqsATzlugEJXT8kZCH8NAuTpdVRpH23 IckZs4yOSQ3AGBE1qy6aZRWByu55YprOLoPFlSOodj4vA64qeuoxyqkZwXp2VJMbr1ys hm8/fjdTMe4NI1MsXOqsPhkmAqOl7Z69QZQc22mmlXVdI8SaBN5ZJyuIXb16u/BUK+vp p8jFDDinLpd1p6zcVEI04X9REwumzJqZgZ/8zPyCUeuieKdYE3KHSle5dIxhjLTV3xJj RFkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=aaCe1c/Il7mwzazLNOhBGe2zeoY0WJjHVx8W7f1BZpY=; b=CCLxSNfs+mQazKAT+RA9frigWgfN1gZumAHynN3HV2HC40VRSFBrCyIxbdCwtCPDqE QzTMFfjwXX5DNeerFHA/Ql/ll+uZMir+R5vNMBhwXQELgyofO1H6cb2WRFRF0mIJr9oB 30vLrRnoeKeN8KmTlRN006tjpu4Vb3vbIcKzhlACY26I9rwUmusYgwzjRwhfJKgh5Nuz qJJBh7nq4IipHmGm2/p4VKmgYqBuJnpre7dAKJhFlwI30g71sh+9pcyvYz8OT4/QmOMH HjPzwA8+NPcCSIHmtpiX62iM2OQaoEjZqhm3uVAQyB4fMCquaXjjrJRBs2ntXd/a61kN 1YDg== X-Gm-Message-State: AOAM533qrEGhIbnzzLk2NkFarOfnuqAdJ+PcMr9aHhiPBybKSzCKR4fa n0R7eIcYE6cW68XoO3qo4WQPYg== X-Received: by 2002:a17:90a:858e:: with SMTP id m14mr30194808pjn.1.1634329653554; Fri, 15 Oct 2021 13:27:33 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id i2sm12231684pjg.48.2021.10.15.13.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 13:27:32 -0700 (PDT) Date: Fri, 15 Oct 2021 20:27:29 +0000 From: Sean Christopherson To: Brijesh Singh Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Borislav Petkov , Michael Roth , Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH Part2 v5 05/45] x86/sev: Add helper functions for RMPUPDATE and PSMASH instruction Message-ID: References: <20210820155918.7518-1-brijesh.singh@amd.com> <20210820155918.7518-6-brijesh.singh@amd.com> <3fc1b403-73a1-cf2e-2990-66d2c1ecdfa3@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3fc1b403-73a1-cf2e-2990-66d2c1ecdfa3@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Oct 15, 2021, Brijesh Singh wrote: > On 10/15/21 1:05 PM, Sean Christopherson wrote: > > On Fri, Aug 20, 2021, Brijesh Singh wrote: > >> + if (!cpu_feature_enabled(X86_FEATURE_SEV_SNP)) > > Shouldn't this be a WARN_ON_ONCE()? > > Since some of these function are called while handling the PSC so I > tried to avoid using the WARN -- mainly because if the warn_on_panic=1 > is set on the host then it will result in the kernel panic. But why would KVM be handling PSC requests if SNP is disabled?