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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7882C433EF for ; Mon, 9 May 2022 14:14:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237045AbiEIOS0 (ORCPT ); Mon, 9 May 2022 10:18:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236931AbiEIOSV (ORCPT ); Mon, 9 May 2022 10:18:21 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0490022783A for ; Mon, 9 May 2022 07:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652105667; x=1683641667; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Oe24jF5S+737BHd5NL8BZuv8MDPXY+iO/QF978VXlH4=; b=QMIL7H4EO9s0Ohj77yE5hmp06VdhPAWrkcnq5h0OZtbcCQYEMLgC3eHH H1s2BiDTvY0R59JX7lqNI0Og8p83x2/ajhC87zaPOTPqun8QH6FhHWMrY xFW8cAITIiNa7q6K69mXB4TMO5wr76/D7Xl1NHk6xzTYxm0Pacab6RNwP vecYwglK9lwpxqLxEg752NXBOA1BkyIhCyUVPzEXWA6hdDShKLluv5WYN s4j+KEaJNvHtxzOT/9z3ppr1umODiCmJphu5Pe7Vfm6ztHIzExUHnNtNg Di5GUvPuk2KMJC9qEtVJWCONWfk/x8nepRX8jgmjaxcFL4vnMJQIRUd8k A==; X-IronPort-AV: E=McAfee;i="6400,9594,10342"; a="251107509" X-IronPort-AV: E=Sophos;i="5.91,211,1647327600"; d="scan'208";a="251107509" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2022 07:14:23 -0700 X-IronPort-AV: E=Sophos;i="5.91,211,1647327600"; d="scan'208";a="634043857" Received: from dmansurr-mobl.amr.corp.intel.com (HELO [10.212.251.158]) ([10.212.251.158]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2022 07:14:21 -0700 Message-ID: <4506e2c2-af4b-623d-5618-48269e65c295@intel.com> Date: Mon, 9 May 2022 07:14:20 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH v5 3/3] x86/tdx: Add Quote generation support Content-Language: en-US To: "Kirill A. Shutemov" , Kai Huang Cc: "Kirill A. Shutemov" , Sathyanarayanan Kuppuswamy , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Tony Luck , Andi Kleen , Wander Lairson Costa , Isaku Yamahata , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, linux-kernel@vger.kernel.org References: <20220503012721.ok7fbvxmnvsr6qny@box.shutemov.name> <58d07b2d-cef5-17ed-9c57-e12fe5665e04@intel.com> <40ccd0f0-35a1-5aa7-9e51-25ab196d79e5@linux.intel.com> <2ed5c9cc316950a5a47ee714715b7980f358a140.camel@intel.com> <20220507004236.5p5dyksftge7wwr3@black.fi.intel.com> <45d184273f1950320843f6696eb3071f7d354fd3.camel@intel.com> <20220509120927.7rg6v5pyc3f4pxsh@box.shutemov.name> From: Dave Hansen In-Reply-To: <20220509120927.7rg6v5pyc3f4pxsh@box.shutemov.name> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/9/22 05:09, Kirill A. Shutemov wrote: > Private->Shared conversion is destructive. You have to split SEPT, flush > TLB. Backward conversion even more costly. > > Rule of thumb is avoid conversion where possible. DMA API is there for > you. Kirill, I understand that the DMA API is a quick fix today. But is it _really_ the right long-term interface? There will surely come a time when TDX I/O devices won't be using fixed bounce buffers. What will the quote generation code do then? How will we know to come back around and fix this up? Does SEV or the s390 ultravisor need anything like this?