Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1566627pxf; Fri, 2 Apr 2021 14:33:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNnzK4T9lOdc+iVdZyZiY/nL+6rZ1WDfxudMdnJjwWYp7B0r+l9MDljg8BbgE1k6URwGUi X-Received: by 2002:a05:6402:304b:: with SMTP id bu11mr16970711edb.157.1617399206958; Fri, 02 Apr 2021 14:33:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617399206; cv=none; d=google.com; s=arc-20160816; b=ODGOjyObW8nXiNH12Smdcxj57TJ0IPdI6asWQQWlrMdJaGoKIH/fWoDkeaXGLeW4vt dif6604s2IC8EhG6IlUQJOfZqdd0L3zu95SBpLd0x3zMSRPsPUVAoiYwzGCJ6Yrs07eE mwyp6HjlrtPqHnnloxWY1Ocx2SC7/Hf31tU2nL8+I1bmzzKG4x+vRLuv7jp+5M60rgcN Ho6Op2jcrhxuYPN5sQ6TuICmmn1a0ARxB4rCwz5Bp6dqEtOyA2TKzC42rlZhdALHTaTs qsJ35nK0aLi3DORcUV0yFej2sKtonwyHDBP8043kWfVosiMvyceijJCC5PrGXom7Nuf0 5rFw== 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:ironport-sdr :ironport-sdr; bh=L/aIYeSMGSUqvHdafNTtxqlWd3igp25TGb/khvDTJis=; b=hCp3Wh+Pn2l2ugxkqkw2FGur5I5dnBhoIB+vYkxqVRo03Rzx2+U9bARlLl24hTUdfF kgiGn5m3VkN/j4mEL8cySCNYZeszetrS7Pa8Cl5ZydE9DijBHLrkR1qnY8ZXRZWycEBJ 5SdCN1smNhg6D2n3xJkJlyiBnsZWA17URcmTLgGz5fXgaCSIhrkumWDkqW/mw7Qk7XAF Nr/WMr/sJwoeVMelcr16Z6rTLzzkqUcCxbRcog7vLVxmdbgB4R7nmWdFqMdOeoOgKln1 Wb18X4swH1vKh8LaRRWHmKlTL4MrTg36yB9MUt77rxNlOqDCt7RMpR1VTm7g1gUGWuC5 Bx+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si7264451edn.317.2021.04.02.14.33.02; Fri, 02 Apr 2021 14:33:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235241AbhDBVcY (ORCPT + 99 others); Fri, 2 Apr 2021 17:32:24 -0400 Received: from mga09.intel.com ([134.134.136.24]:26210 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231577AbhDBVcX (ORCPT ); Fri, 2 Apr 2021 17:32:23 -0400 IronPort-SDR: RKpoHlX0iX+CgIZ+UKJsyMIF7Xm1/M5Zb0VMoX7u9kCEcwHH6x7KfKUtsRnRjzgQ+UuH6OHFC/ l0yNGq3gYFOA== X-IronPort-AV: E=McAfee;i="6000,8403,9942"; a="192640760" X-IronPort-AV: E=Sophos;i="5.81,300,1610438400"; d="scan'208";a="192640760" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2021 14:32:21 -0700 IronPort-SDR: vwzfe4oGMKxq040CuMrVtAUkUSOXaHDWevG0dFNC0y11lb4NDsxJ0TtTrFxMi6QoyZpBbnY6C9 LyR+bZ5n9T/Q== X-IronPort-AV: E=Sophos;i="5.81,300,1610438400"; d="scan'208";a="456574638" Received: from tassilo.jf.intel.com ([10.54.74.11]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2021 14:32:21 -0700 Date: Fri, 2 Apr 2021 14:32:19 -0700 From: Andi Kleen To: Dave Hansen Cc: Kuppuswamy Sathyanarayanan , Peter Zijlstra , Andy Lutomirski , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Dan Williams , Raj Ashok , Sean Christopherson , linux-kernel@vger.kernel.org Subject: Re: [RFC v1 00/26] Add TDX Guest Support Message-ID: <20210402213219.GM1285835@tassilo.jf.intel.com> References: <95e97456-478b-c6a2-f851-3b19ce794262@intel.com> <20210402024852.GK1285835@tassilo.jf.intel.com> <9bfa74a5-6a56-a2e0-7432-d35766099d54@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9bfa74a5-6a56-a2e0-7432-d35766099d54@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > If we go this route, what are the rules and restrictions? Do we have to > say "no MMIO in #VE"? All we have to say is "No MMIO in #VE before getting thd TDVEINFO arguments" After that it can nest without problems. If you nest before that the TDX will cause a triple fault. The code that cannot do it is a few lines in the early handler which runs with interrupts off. The TDX module also makes sure to not inject NMIs while we're in that region, so NMIs are of no concern. That was the whole point of avoiding the system call gap problem. We don't need to make it IST, so it can nest. I'm not aware of any other special rules. > Which brings up another related point: How do you debug TD guests? Does > earlyprintk work? Today it works actually because serial ports are allowed. But I expect it to be closed eventually because serial code is a lot of code to audit. But you can always disable the filtering with a command line option and then it will always work for debugging. -Andi