Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4896860pxj; Wed, 9 Jun 2021 04:43:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrodclcriqMzoSycXEDq4LBu9jpDWS27W5KmlD2/gHpDKxqFmqkEUozpXAmw9AQ8JEKlXp X-Received: by 2002:a17:907:2a8c:: with SMTP id fl12mr27843115ejc.160.1623239026623; Wed, 09 Jun 2021 04:43:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623239026; cv=none; d=google.com; s=arc-20160816; b=DV7Ylu61Fb9ytPn9Zz2Akr3UIg9duMkmXKlWczRIxygQWMw/boSqhnrd3DBlT5PFLt iSmOazMr8bRAlrk8sWGZLv2ln4yY+GPDbAPuH/WcZc+l877opVzQk4mN1N5INALfu5Lo kXC42DLiri9XEAOQ5bVTLidU4vZkHt6h6Dg3nZOinlrKbcbxmOSxBkCefeFq4++91Xcx PFMUdKkq7n9PIznxnjVp0yNPy5AUw2ejlNSbsxKbK7hDlDVs/zpZpo099c0F4rk7gigA yyhql0oI6iNP7phyatMOEjczq5ffMA2b/P0rcNxqobx6nFoeTzuTSRPRND95B2nac4FH rvEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=v8tmh6VCe8anabk5E042AJd9iM12pNMipya8sGTIyo8=; b=AzZ9+zjlJ3V6uanPOY27xzWgYWe8qNKfdeFoocpCuziZCf3Z864jTKzNt9/laEuySC HAkm+1l42sLig0Y7U98BtFDaKukzW5na7r/qI/o7j4QhXvjQTx+SKQ3Dh8JPwKyA+RZh Vx2EyamPVZvQGWID05nx7puxNPsPCgml5yLXBwlrJAe7IW1gF4tIghyNDkFmxu2UDELl qPhr9DEZq+C4V9+AA3Ss9II+haXXSSFoUJ5G1ENmhKniR9OI2exwpH/13mt8ED7b4ooS bnZ2mUe3w/V7pjcxlcJehXrpJuThJE89gX8fNjktX8c703M7QWj7ZjczOMvQ2hwkGfTM puDw== 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 v18si2083306ejy.223.2021.06.09.04.43.23; Wed, 09 Jun 2021 04:43:46 -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 S234267AbhFHWiZ (ORCPT + 99 others); Tue, 8 Jun 2021 18:38:25 -0400 Received: from mga03.intel.com ([134.134.136.65]:25785 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbhFHWiY (ORCPT ); Tue, 8 Jun 2021 18:38:24 -0400 IronPort-SDR: o/vO/02tAaL7fz1egTZT1eUaFPG2LPFuAR34d1mE2JcS9VlEumtP6cEaR8qE6Lk/tUDPqy0TIJ sNpvpcxPDdnA== X-IronPort-AV: E=McAfee;i="6200,9189,10009"; a="204982494" X-IronPort-AV: E=Sophos;i="5.83,259,1616482800"; d="scan'208";a="204982494" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 15:36:30 -0700 IronPort-SDR: xJ1qcAElwWGhEWhcM5fXsZS1nHvrSVWAPejfMHtuqUT7GWyKf4WAKi1149DFrP9qGfERCG7QSB T97+Wkv/Tr8A== X-IronPort-AV: E=Sophos;i="5.83,259,1616482800"; d="scan'208";a="402231124" Received: from dabarred-mobl1.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.254.185.80]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 15:36:29 -0700 Subject: Re: [RFC v2-fix-v3 1/1] x86/tdx: Skip WBINVD instruction for TDX guest To: Dave Hansen , Peter Zijlstra , Andy Lutomirski , Tony Luck , Dan Williams Cc: Andi Kleen , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , Sean Christopherson , linux-kernel@vger.kernel.org References: <20210608213527.739474-1-sathyanarayanan.kuppuswamy@linux.intel.com> From: "Kuppuswamy, Sathyanarayanan" Message-ID: Date: Tue, 8 Jun 2021 15:36:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/8/21 3:17 PM, Dave Hansen wrote: > On 6/8/21 2:35 PM, Kuppuswamy Sathyanarayanan wrote: >> Persistent memory is also currently not supported. Another code >> path that uses WBINVD is the MTRR driver, but EPT/virtualization >> always disables MTRRs so those are not needed. This all implies >> WBINVD is not needed with current TDX. > > It's one thing to declare something unsupported. It's quite another to > declare it unsupported and then back it up with code to ensure that any > attempted use is thwarted. Only audited and supported drivers will be allowed to enumerate after device filter support patch is merged. Till we merge that patch, If any of these unsupported features (with WBINVD usage) are enabled in TDX, it will lead to sigfault (due to unhandled #VE). In this patch we only create exception for ACPI sleep driver code. If commit log is confusing, I can remove information about other unsupported feature (with WBINVD usage). > > This patch certainly shows us half of the solution. But, to be > complete, we also need to see the other half: where is the patch or > documentation for why it is not *possible* to encounter persistent > memory in a TDX guest? > > BTW, "persistent memory" is much more than Intel Optane DCPMM. > -- Sathyanarayanan Kuppuswamy Linux Kernel Developer