Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4317643pxj; Tue, 8 Jun 2021 11:20:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhzdEemmk+8kS3hFt4BSXkWmwftYEKN0ZDvjaIjc5OfQq5V4h6dnceCHls43wtdH+GttFh X-Received: by 2002:a50:d64a:: with SMTP id c10mr13351067edj.199.1623176458222; Tue, 08 Jun 2021 11:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623176458; cv=none; d=google.com; s=arc-20160816; b=nX73xcm5L3FBj20oe5cpRefqUbl18HJjx1+PfZIpy0jPhXobd5VfpmPLgrKDdZMiae vaLAlNSKU5IfDQcAwjhYxVpHNneo454lY/wo79tJoO03BDTbFvZ0M3N0poi4VdYcYBmH QJD+Fs7MfpSNBtWCuRBYSlB5E8FmId66f7Hj6AtvnslCP9CH3voJ6ENBaxSFmEQuecpa nUKQ3OKF9wPWJyijdK4jBL/Jqa7DW+uzPSV/V72lk5PefwrLCBWD+5XS8lg88AK5H5qU qr2lLUHpTPKzbTyU/Fe7nYKDGGWe3ws2id6pMURZAsq0achng1GUY6QkbZM4tSY66a1t gp+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=QuIRMhcO0Z0lY8J6XzXP31iyKbkAbvZcJQ6gQGi6nt0=; b=wKLUGBq0V5paxxIwcqfWg1+eFZS915BWxIslJLyNQMcZtSg7gfQnkoh+ncRI+NRGPd z8m0TNk3KUNUSdT98U5lB0gegqAJiurbxvFeXxadmJ+JUdW6tCW228D/hMPJEKDIDDAr shIGkbIdUedWRSHCEP1vYs/qzyPnWPo/FUW5c8cw7GFrVHpD5uQG8lYOIwX3DomuMzkJ D1ScqeyCb2nbSrMK7owbncz3e3J6ODZ8P24DdghtcX4pvzNcaegmfKmQFp9uk/aK1k6b Ecxa78Kd2YAGLwj3dss1PLjgRCeSRLBB6tctMnMW+omXTxSzyGlYmrGU/W0PSpcCB5Wv fFNg== 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 l5si339066edr.217.2021.06.08.11.20.34; Tue, 08 Jun 2021 11:20:58 -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 S233934AbhFHSUD (ORCPT + 99 others); Tue, 8 Jun 2021 14:20:03 -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