From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3EF6C47082 for ; Tue, 8 Jun 2021 22:36:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 98C0E60FEA for ; Tue, 8 Jun 2021 22:36:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234596AbhFHWiZ (ORCPT ); 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