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 5833FC47082 for ; Tue, 8 Jun 2021 18:18:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A3A1613AC for ; Tue, 8 Jun 2021 18:18:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233990AbhFHSUE (ORCPT ); Tue, 8 Jun 2021 14:20:04 -0400 Received: from mga03.intel.com ([134.134.136.65]:5806 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232521AbhFHSUD (ORCPT ); Tue, 8 Jun 2021 14:20:03 -0400 IronPort-SDR: XduQUeL01uRYfR/tqmiAi3uw65J0pbR4Qgaio/DuP4ebUAtnEL+zNgWcq7s8JIDUp1ct8g7sb3 VkaZ5Wrz/qXA== X-IronPort-AV: E=McAfee;i="6200,9189,10009"; a="204930586" X-IronPort-AV: E=Sophos;i="5.83,259,1616482800"; d="scan'208";a="204930586" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 11:18:08 -0700 IronPort-SDR: oLWSWDovY6EX4fhKDWjYRH4gwvxj6M++fHPgwwbd2Ic4wnVhE9BwgGKGf4lJnRWFmTeugmcxSi C1lEdAszhcXg== X-IronPort-AV: E=Sophos;i="5.83,259,1616482800"; d="scan'208";a="551702593" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.24.11]) ([10.209.24.11]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 11:18:08 -0700 Subject: Re: [RFC v2 08/32] x86/traps: Add #VE support for TDX guest To: Dave Hansen , Sean Christopherson Cc: Kuppuswamy Sathyanarayanan , Peter Zijlstra , Andy Lutomirski , Dan Williams , Tony Luck , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , linux-kernel@vger.kernel.org References: <8a1d6930f784cb57c957cf20cea870947db91e05.1619458733.git.sathyanarayanan.kuppuswamy@linux.intel.com> <42f6b603-7c21-28fa-b6ec-e53268aa6ff7@intel.com> <3afaebee-77dc-83ff-c397-aa64991c52be@linux.intel.com> <4635488d-b98b-330f-1485-fecfcf6e72ff@intel.com> From: Andi Kleen Message-ID: Date: Tue, 8 Jun 2021 11:18:07 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <4635488d-b98b-330f-1485-fecfcf6e72ff@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/8/2021 11:15 AM, Dave Hansen wrote: > On 6/8/21 11:12 AM, Andi Kleen wrote: >> I believe neither does mmio/msr normally (except maybe >> ftrace+tp_printk, but that will likely work because it shouldn't >> recurse more than once due to ftrace's reentry protection) > Can it do MMIO: > >> +DEFINE_IDTENTRY(exc_virtualization_exception) >> +{ > =======> HERE >> + ret = tdg_get_ve_info(&ve); > Recursion isn't the problem. It would double-fault there, right? Yes that's right. tp_printk already has a lot of other corner cases that break though, so it's not a real issue. -Andi