Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5143839pxj; Wed, 9 Jun 2021 10:06:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmgvgT5R5UkwdguxNNrwEN2YZr0Iv/EfDd0JZ2Hp0GZPzxvD//A+FxCuVsyp8BaxVBf9Kn X-Received: by 2002:aa7:c9c4:: with SMTP id i4mr419672edt.299.1623258394976; Wed, 09 Jun 2021 10:06:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623258394; cv=none; d=google.com; s=arc-20160816; b=Rx4NBpggBfw5/npmVpXWjtEYd6DlubZjilG8zFJg+Nmfb0VcngXbJOvssfyGNObiF+ ZVazTROjOnc5UgeiBdUhtn5JZCcCt9CiCaNo3IO2cBDUdLrZDfL3heGE7+1yumPBooNG kT+VrqSQ5K29LJkHOYjU6DIXskW0mVekYljDYCtTHZDMukOhbjFvjgVH+sBke5WIgUem mwPtrgCqGUr8ak1K+LMdPkFM1pyayZYMOSZGBQtFRM71uwpaQ38GOYYZVhMkEIQvbL2g GkL3Fjtqwpuu19lglWwOYqE7iGvl6/oT5M8pr1cEXFe1ZIN1VZ1/Gr42iAmMKr5Q0gD2 aAww== 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=bcJ/0L2SopZF17bdjgpigZpnuGXULMObBDHS5P2rwPw=; b=AiWLZDyJ9hD9um17Xiypa7MU/B7TXRf3eCi2/ifbUq//CnAIngfSmJMn/m8MZ0De/D 4JrV5Nb0CjH+HHIMGBKS8d0DO4HBo/vib6Z/JTW4DU7YXLsRNsPXRCwyN6ASpqsCOWj5 JOBj0cEEYgXL4ddM05PAxHqD4NxQKqCYfrALku6CfcMtQZbGdxm1MJqnq90Xu/j2sMv/ 2avmxjwThxmBP+yCRbpCVAUDgEveuEUn04x0r4oG5iHW5mB8EMLNCPomcqAKn8JxxyYJ fCJdq1Q8YUGKEV8SknVyD47dlYwv5Y+902HlZ2Y5oL45e+xPSP8gCjPzMI7VY9yOHJuw zERw== 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 n2si193195edb.238.2021.06.09.10.06.10; Wed, 09 Jun 2021 10:06:34 -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 S235366AbhFIEmq (ORCPT + 99 others); Wed, 9 Jun 2021 00:42:46 -0400 Received: from mga03.intel.com ([134.134.136.65]:50937 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231335AbhFIEmq (ORCPT ); Wed, 9 Jun 2021 00:42:46 -0400 IronPort-SDR: oX5rPxONy4qSXk4ezTPzeGTiToeeKg2BI/nCGZ+yf6UyQRKmgCQHusi8NNyjpHrr6GshpQ7TYo XztH+QuOAx9w== X-IronPort-AV: E=McAfee;i="6200,9189,10009"; a="205027067" X-IronPort-AV: E=Sophos;i="5.83,260,1616482800"; d="scan'208";a="205027067" 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 21:40:43 -0700 IronPort-SDR: CnHLeEBhcNgz2NyLL/DSIPWtc/cAx1WpIR7s09DMJ39lwswXLqZpARCXvJRTDwPxNXCVdqXheD jpN3aeGE56UQ== X-IronPort-AV: E=Sophos;i="5.83,260,1616482800"; d="scan'208";a="551856239" 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 21:40:43 -0700 Subject: Re: [RFC v2-fix-v4 1/1] x86/tdx: Skip WBINVD instruction for TDX guest To: Andy Lutomirski , "Williams, Dan J" , Sathyanarayanan Kuppuswamy Cc: "Peter Zijlstra (Intel)" , Dave Hansen , Tony Luck , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , Sean Christopherson , Linux Kernel Mailing List References: <20210609011030.751451-1-sathyanarayanan.kuppuswamy@linux.intel.com> <23418f34-7c03-7477-6fbf-1b36b4718cb9@kernel.org> <4e5ac34f-28cb-def6-0b87-e560fa42e5e5@linux.intel.com> From: Andi Kleen Message-ID: <390d6712-35b5-e52a-fb32-205844bad4ef@linux.intel.com> Date: Tue, 8 Jun 2021 21:40:42 -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: 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 >> KVM only turns it into a noop if there is no VT-d, because with VT-d you >> might need it to turn mappings into uncached and vice versa. > Wow, I found the kvm_arch_register_noncoherent_dma() stuff. That's horrifying. What's it for? e e.g. if you want to run a GPU it really needs some uncached memory. Same is true for other more complex devices. Now modern Linux of course will be preferring CLFLUSH instead for the conversion, but there are old versions that preferred WBINVD. I don't think it's a DoS, as long as you're not too picky about latencies on the host. -Andi