Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7006133rwb; Mon, 12 Dec 2022 08:57:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf7IeZc8umA/4p8cSkY04M+f/IXako+dYv6cbGYT5tfflA3QlPotA+FEX2FRn7tVrZH1GGbD X-Received: by 2002:a05:6402:1d8c:b0:46c:c16b:b4c9 with SMTP id dk12-20020a0564021d8c00b0046cc16bb4c9mr15199858edb.7.1670864266910; Mon, 12 Dec 2022 08:57:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670864266; cv=none; d=google.com; s=arc-20160816; b=FFUX3Py6U4DIxA/LSamWTJOckZVFIwUDiFWBKscyHKvwcsQhwHoVUCez5Cldqx9fRj vW0UnpGDX/ZCNwFqoa3HG+mqTD+VwFxnbsAa0249k2yQsWv+m4ZlTnW1I03nkLFFNolW jE/CI1MZ8ycW/m3t6yqbBDcWIz3Z9kErg5Q1iUMRUNUO3X9rjTVGx+H2vYCSsrcZoTep iWQBuvuXrNiFJdCd/bKKhDWc69JkkwESnd2kdDTUwmzwUmq9ba7cgs3GTRJScpA3dxke 3jLowF4GD/NXjoEaFXZJ4v510g8gNtMeoBYoUi9VZB2lPst6ss21KOojE1woxY2xwgyp 8jgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=zIaJGVBwKMafDz7JS3GKLIt4jqM6IUdR1Lvs94cbnj4=; b=QsAcZF58xkkpXLOjF6QFPbqnlzLRR90XqjnYr84aru45M4jfsWprrAecuKK3Oy+q8i oMFK0QBWFt0FFZsBmXkfEoNDFMxxfHe/OCgqW7R2XKVvwjIVPyrpyJlqGYxUFQQr6Lvf NoPiiY+Zcnd/C8LcYUMn/BhKkfKc4/sLwvj8wB8qXLn17oPuA7rUsh2EzQoI8+DmxXtC 3RIhSeqQ5DEZPLTWybAjBMD3Oprudc5PGofy2luWYdRRDs4Ou4t3t5/u1AErdW3ppKcP Z0A7pkW17ve+LWL8vSIjfl5keNUqqSBSlg04P+qHxlbQusJJkVp0M1ASVTriy1qtqg+z I++w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BZZAVN5s; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w20-20020aa7dcd4000000b0046187ab5c1bsi7391502edu.512.2022.12.12.08.57.29; Mon, 12 Dec 2022 08:57:46 -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; dkim=pass header.i=@intel.com header.s=Intel header.b=BZZAVN5s; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231194AbiLLQKV (ORCPT + 74 others); Mon, 12 Dec 2022 11:10:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232589AbiLLQKS (ORCPT ); Mon, 12 Dec 2022 11:10:18 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B67432660 for ; Mon, 12 Dec 2022 08:10:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670861416; x=1702397416; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=CSivnj4EN1Y5ag/z4ECT81ZO0sOSCFPcf5f3ESOg+0c=; b=BZZAVN5s89GU4aLppUjTRsSWXyoH9C8CJ9nDHlTSdFEKB2e+T2ms8lXc bklMrlktP3OxYNNdJxxahv7PeSKIK85F0Uq7p65+iTrCSfqvARX5XJInY 2ClJmioIZyBL9zGrBXrIGoh5b7P/wVMrAPEY8jQg/r+5MSaF3YwlM+OnK 6IxJU8Se2OyFeuZ6gS6/AKo0QYAHRcxQfcOAE/S+VIQAOGpVVbUyBYxsN qde69Tnl7pATMcfu4KIAu/mnfMZTG6cmZksdr/pRniS3ZGb8uE3Qc2GOy 7EP4E2vn+WBUhjTfF3FyoIA2epxia/geVv/3J5/60J3g/RjkMrevEqnqm w==; X-IronPort-AV: E=McAfee;i="6500,9779,10559"; a="305534535" X-IronPort-AV: E=Sophos;i="5.96,238,1665471600"; d="scan'208";a="305534535" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2022 08:10:15 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10559"; a="790546298" X-IronPort-AV: E=Sophos;i="5.96,238,1665471600"; d="scan'208";a="790546298" Received: from iprasad-mobl.amr.corp.intel.com (HELO [10.212.182.78]) ([10.212.182.78]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2022 08:10:14 -0800 Message-ID: Date: Mon, 12 Dec 2022 08:10:14 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH 2/4] x86/tdx: Use ReportFatalError to report missing SEPT_VE_DISABLE Content-Language: en-US To: Sathyanarayanan Kuppuswamy , "Kirill A. Shutemov" Cc: "Kirill A. Shutemov" , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , Elena Reshetova , x86@kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org References: <20221209132524.20200-1-kirill.shutemov@linux.intel.com> <20221209132524.20200-3-kirill.shutemov@linux.intel.com> <20221209170647.r32yjyc3hsqtnffo@box.shutemov.name> <2e305bb5-9595-3531-6134-24344ff5c797@linux.intel.com> From: Dave Hansen In-Reply-To: <2e305bb5-9595-3531-6134-24344ff5c797@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE 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 On 12/9/22 12:51, Sathyanarayanan Kuppuswamy wrote: >>>> + while (1) { >>>> + __tdx_hypercall(&args, 0); >>>> + } >>> Instead of an infinite loop, I'm wondering if the guest should panic after >>> retrying for few times. >> Hm. What difference would it make? > IIUC, the goal of this patch is to report the fatal error to VMM and panic. > But, if VMM does not terminate the guest as we expect, rather than trying > continuously, isn't it better to panic ourselves? That way the behavior > will be similar to what we have currently. What does "panic ourselves" mean exactly? What is the current behavior which that would match?