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 514F8C433ED for ; Wed, 31 Mar 2021 22:29:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1848E61076 for ; Wed, 31 Mar 2021 22:29:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232611AbhCaW3Y (ORCPT ); Wed, 31 Mar 2021 18:29:24 -0400 Received: from mga12.intel.com ([192.55.52.136]:65505 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232356AbhCaW3B (ORCPT ); Wed, 31 Mar 2021 18:29:01 -0400 IronPort-SDR: JcedoJInlTVCj0BsNXI2e7scTy29Fqo8AcSJZjlIQ2IiiDdirf/ej2PUl5EP22rLgb1MRl8cDD Carzr3NlERAg== X-IronPort-AV: E=McAfee;i="6000,8403,9940"; a="171519342" X-IronPort-AV: E=Sophos;i="5.81,295,1610438400"; d="scan'208";a="171519342" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2021 15:29:00 -0700 IronPort-SDR: rggyjLaZ054D0F0Tf3SJWQaFT5jD6r/HD0fsEAPJqBJ1TnF3qP+gciBG23FlV2gYGvIczOgMLH Iqv/OljLYUew== X-IronPort-AV: E=Sophos;i="5.81,295,1610438400"; d="scan'208";a="394233606" Received: from sjard-mobl.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.212.174.17]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2021 15:29:00 -0700 Subject: Re: [PATCH v4 1/1] x86/tdx: Handle MWAIT, MONITOR and WBINVD To: Dave Hansen , Sean Christopherson Cc: Peter Zijlstra , Andy Lutomirski , Andi Kleen , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Dan Williams , Raj Ashok , linux-kernel@vger.kernel.org References: <2FE32855-EA5D-44E4-AACC-25E9B1476547@amacapital.net> <5d961c25-3dee-4a5d-4bba-a97d157a5a49@intel.com> From: "Kuppuswamy, Sathyanarayanan" Message-ID: Date: Wed, 31 Mar 2021 15:28:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 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 3/31/21 3:11 PM, Dave Hansen wrote: > On 3/31/21 3:06 PM, Sean Christopherson wrote: >> I've no objection to a nice message in the #VE handler. What I'm objecting to >> is sanity checking the CPUID model provided by the TDX module. If we don't >> trust the TDX module to honor the spec, then there are a huge pile of things >> that are far higher priority than MONITOR/MWAIT. > > In other words: Don't muck with CPUID or the X86_FEATURE at all. Don't > check it to comply with the spec. If something doesn't comply, we'll > get a #VE at *SOME* point. We don't need to do belt-and-suspenders > programming here. > > That sounds sane to me. But I think there are cases (like MCE) where SEAM does not disable them because there will be future support for it. We should at-least suppress such features in kernel. > -- Sathyanarayanan Kuppuswamy Linux Kernel Developer