Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3880154pxj; Mon, 24 May 2021 17:40:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7pTRWwvOsbJybWnni3Nb/Ar9alPMR+uqPdTfxraEJhJd5N4pPyU8osFaX0I3647pRkQfd X-Received: by 2002:a6b:e817:: with SMTP id f23mr16290518ioh.183.1621903244047; Mon, 24 May 2021 17:40:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621903244; cv=none; d=google.com; s=arc-20160816; b=waae0isil3LM9V3RKmozu54bPYkdympMRDb8sp0XK7ESf1pY8UFfsaQKN959vxLQdl WAJjdj+u/qxyZMUD1YIst6nY0LxrWUF3vMzGvKMsJCopx+MU4vCJa9bhqgGFGDmKKQcr WxILcJ8BN1zvPof8Qz+oghl/MhsZeCwCWOCsZrkhxHSSNdUL1U3lEZViXiUu5INiatKf Qa1E8de91AqTaNf/T0NYvxtOYqhIsQTfs2qex7i4LVsBXJUi0zAM+O9cvE11CFrcw+YJ S+yR+MoiL+LaujpV5NKbUW6fPRlwKHITQoLq4bv3s1ue80K2UkNWkC30VrfZO31IFFmQ W3cg== 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=a7CyA11yIeqU5JHB8GupYOGsnUm6qMtPkoEf5n0yWms=; b=VoDBOKbOgl5saicrLvYuECuSq8Mz0sw+GdochxmPlBvNuW0RUgojltK02zbTOkXby0 or6DpTXPwiku4NBKGFhbiwrbmPvVCU7UyXsRWsJcPMTIJtFsHChGCcMp7Viqx1UOxLVE im3Mzc+Gxbsn2iumCPjNl08Mlk/8LSfoqLCW06Uyja8dxmBPH0OGmQZKOgl935L5x5QO ++IWMtYaarN6WW1jSNYgEh5dzTPd/xiWEhhZh1QPv6BluIbWQwyGIL8GvYXlkG9fAbMw R0+mwPgo/mFGmSWa+MjvP6UHw1vV0bW1BI+qEkSwD6CoYVgqJ0/o719F6OPP4n+7f90S hzwQ== 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 b10si7601974ioj.35.2021.05.24.17.40.30; Mon, 24 May 2021 17:40:44 -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 S229547AbhEYAlS (ORCPT + 99 others); Mon, 24 May 2021 20:41:18 -0400 Received: from mga05.intel.com ([192.55.52.43]:65122 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbhEYAlR (ORCPT ); Mon, 24 May 2021 20:41:17 -0400 IronPort-SDR: FcWhXyZPCBUCnlXrmz8gOXqW8wzdHTpyxONcwt9Sk8Uo7JOhgweAVQUEVYfEYx1DTZQOtPshkd SimBFK0FWEUQ== X-IronPort-AV: E=McAfee;i="6200,9189,9994"; a="287636918" X-IronPort-AV: E=Sophos;i="5.82,327,1613462400"; d="scan'208";a="287636918" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2021 17:39:48 -0700 IronPort-SDR: upbQ6XMI6ZuLuP+RJi6KM+ECmBeBD80xGg1WcEn4o5tUJUaBEh+Gy35rWjSIesJojJMGrO53vE sRWxappGbp9w== X-IronPort-AV: E=Sophos;i="5.82,327,1613462400"; d="scan'208";a="546282116" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.212.195.214]) ([10.212.195.214]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2021 17:39:47 -0700 Subject: Re: [RFC v2-fix-v2 2/2] x86/tdx: Ignore WBINVD instruction for TDX guest To: Dave Hansen , Kuppuswamy Sathyanarayanan , Peter Zijlstra , Andy Lutomirski Cc: Tony Luck , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Dan Williams , Raj Ashok , Sean Christopherson , linux-kernel@vger.kernel.org References: <37ad50ca-f568-4c62-56e2-9e9b1f34084c@linux.intel.com> <20210524233211.802033-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20210524233211.802033-2-sathyanarayanan.kuppuswamy@linux.intel.com> <6d336ac9-72ad-aae5-0b4c-f30a695d198b@intel.com> From: Andi Kleen Message-ID: <76dcb466-225b-760b-525b-6aa8f5c8aae8@linux.intel.com> Date: Mon, 24 May 2021 17:39:47 -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: <6d336ac9-72ad-aae5-0b4c-f30a695d198b@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 5/24/2021 4:42 PM, Dave Hansen wrote: > On 5/24/21 4:32 PM, Kuppuswamy Sathyanarayanan wrote: >> Functionally only DMA devices can notice a side effect from >> WBINVD's cache flushing. > This seems to be trying to make some kind of case that the only visible > effects from WBINVD are for DMA devices. That's flat out wrong. It > might be arguable that none of the other cases exist in a TDX guest, but > it doesn't excuse making such a broad statement without qualification. We're describing a few sentences down that guests run with EPT IgnorePAT=1, which is the qualification. > > Just grep in the kernel for a bunch of reasons this is wrong. > > Where did this come from? Again the logic is very simple: TDX guest code is (mostly) about replacing KVM code with in kernel code, so we're just doing the same as KVM. You cannot get any more proven than that. -Andi