Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4317295pxj; Tue, 8 Jun 2021 11:20:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuSYFV3nY60XzG0zsMKN4AuU2MpOSffXuzlQa5zTd+Roszm3QBIt65/dxzb2XCfBoMuorJ X-Received: by 2002:a17:906:c141:: with SMTP id dp1mr25474838ejc.87.1623176422186; Tue, 08 Jun 2021 11:20:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623176422; cv=none; d=google.com; s=arc-20160816; b=mbmy3fq4+bXKfS0NiX5la/B6iGsjH9DbieGjAwC5YnDZymMQ/ew5vQFrK/yixmOH/A SZPvSNuP3ajF/lRd3EfE9qWp6pJbSGlEhYyHHKIqwzjVjSLh80LWSm65/ZNGs5r+Sxw+ atDYNg7wG2MHijJOdRMtG+PbFY6NwcNwlGxD3rcvokm62C9bGAyZlI8JloonP1HRMLxC rPIBtAHHkSR4S/DNKW0KPCxEA59b27UzdQCdWcoccPcgzcYMD5oH6tsfk0xQb+ODreQW pnnv5F/R5wWOZDo4T2wzfzbhDh4tGmFLJlteHmNOGVB6V5O8kbgdEJtl/MmAecEYkf4i 2GUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:dkim-signature; bh=EiKnL3EK3DmnzvlIq10tByLm4KmqPVAHbANsa9c4Z78=; b=bsStDllWmheqP+st8GK7Ln9DOoXl3sAUHvdppb9JjMwIgXIaXItFMkvzBSvLynHhOI mXSTwnxAfNOCPIrKUUroJBweVQaTD808JF8lWHDAev7euA8jGUgd3Oyq92LkEpWKRXvi 1FJDl7r9WnSYEGOONZjGnV4niofeA1cNIZQrMrNFo3EQjIMbAEy7MI/6v189ENcWrzos WzGqFYhG/hOYNQ5ydfyFnhNLyVYmLdMLdZnaucb5tDt+1IYAKEWLGcbyR+C6twp1vDze +rQ2OKRoIAxEcfJk/NTGoG8ymrvWvcdy8/Z3onXW7XnjTFS5nT4k2B1aG9wyyahxYtMZ RXZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T83dI8Xm; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n2si356864edr.39.2021.06.08.11.19.58; Tue, 08 Jun 2021 11:20:22 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T83dI8Xm; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234015AbhFHSUF (ORCPT + 99 others); Tue, 8 Jun 2021 14:20:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:51576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232521AbhFHSUF (ORCPT ); Tue, 8 Jun 2021 14:20:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EBE796136D; Tue, 8 Jun 2021 18:18:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623176291; bh=jk14c85Uu/xNVdtsyfXmX2URMOAC3QI2bPvUzbgknHk=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=T83dI8Xm2fJ+4dW391/OmdJv2DLOJ73cws0jQufETNcgJ7X9cgTXBaKPPEXPOLyt3 aS6XnHIdsZE92okQEPn6SkH5+ZZ4UIzx6bpIFM4M7kmNNyhoXu+GE7n9j1dXybX8x5 96nCf3s4DcLKDRqyCn12ojN9WjLnf2OQFl1YaXN0B7KmXklDqBXFQdc0PjG6YBlfSk Jc1fSJ6Xg7fDgxMdL85E1QF38FUvwZeJtbXQb63UNq13ZzmDVr9K3C8F7J5Uv0hPzA qdZ9acAq8WxjFsR2PUSzkVW2MjSjZoe7jVTpjt3fY/g7cVnLng7mjheWvIeHwL2M5a kI8ZyHKuLn4+w== Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailauth.nyi.internal (Postfix) with ESMTP id D5EF627C0054; Tue, 8 Jun 2021 14:18:09 -0400 (EDT) Received: from imap21 ([10.202.2.71]) by compute2.internal (MEProxy); Tue, 08 Jun 2021 14:18:09 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedtledguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedftehn ugihucfnuhhtohhmihhrshhkihdfuceolhhuthhosehkvghrnhgvlhdrohhrgheqnecugg ftrfgrthhtvghrnheptdfhheettddvtedvtedugfeuuefhtddugedvleevleefvdetleff gfefvdekgeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheprghnugihodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudeiudek heeifedvqddvieefudeiiedtkedqlhhuthhopeepkhgvrhhnvghlrdhorhhgsehlihhnuh igrdhluhhtohdruhhs X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id ABAD551C0060; Tue, 8 Jun 2021 14:18:08 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-519-g27a961944e-fm-20210531.001-g27a96194 Mime-Version: 1.0 Message-Id: In-Reply-To: <4635488d-b98b-330f-1485-fecfcf6e72ff@intel.com> 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> Date: Tue, 08 Jun 2021 11:17:47 -0700 From: "Andy Lutomirski" To: "Dave Hansen" , "Andi Kleen" , "Sean Christopherson" Cc: "Sathyanarayanan Kuppuswamy" , "Peter Zijlstra (Intel)" , "Williams, Dan J" , "Tony Luck" , "Kirill Shutemov" , "Kuppuswamy Sathyanarayanan" , "Raj Ashok" , "Linux Kernel Mailing List" Subject: Re: [RFC v2 08/32] x86/traps: Add #VE support for TDX guest Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 8, 2021, at 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? > We should do the get_ve_info in a noinstr region.