Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3526325iog; Mon, 27 Jun 2022 18:57:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1si+zC7hSPNA3Li3MRD2WGhhawLGLjr6qIFUasHJM7sOYmjMhSi++AU3DZzexLuH66gEGs3 X-Received: by 2002:a63:84c6:0:b0:40d:4364:ca31 with SMTP id k189-20020a6384c6000000b0040d4364ca31mr15442107pgd.144.1656381458613; Mon, 27 Jun 2022 18:57:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656381458; cv=none; d=google.com; s=arc-20160816; b=PSmGY2lqtQtIn4dRhHytYofugD2gWCuRYwjPI2CpKd516FSvTCnm0k/uBE0U7KPZhq GlVtqzx6uLQpQ/LKDuDMv438zcroEUNPwM1SYPskIquy30r6DcU598XZaFF4woNRvtEK /l/B8l5iB4gp4keASXN1eE39RsbJrZAPafrbTfUKpFZY17NyhDW9MMJDoDHG/wcE6L+D culokz8pmoag0xBebgvGkAjw5i8MCUfF6+Ois8JMtB1jZEx3vBN6zHfW0d8mztujRN43 t/phI0Yjx6AuFz0TpNjh+o8HiOij+sKqTQWGHo7pbz4LerBCma0mIZSiyh8hRUOHA1tr X3Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=XHVsHi/wDH4GFM+PMUpXiLNYzzqSLV4ZDZvjiBZ5YKE=; b=LMaQrhXQx5EXzK1CWUL6KNfQFgB1eRCmzFqMH0w7EqUZBlMajzxSpDNuIrtvA2kdlw 9ta5MPvlbsz58MH7siPRe9CPSmNG0wFSOaqMgaP/k1t3g6P+daGIvZZCs/lmo2UTUCj9 URy9mpdHpRksw6pUVBLDaasvDPdBisiNL4BZFnqDQAtr2zyVuxwJRBxn0CawyRXMYYVH Lo24G3iywPQRn1LGUzz4Eac91VaGoPAT04LjEPHk/C/Yi1OLFxhC1U4rGIp2E7IEr4ls ReI4iq39oOfjqNDyVbSgiQoWFXhCpHEL+vM0n+tE4PscBK84zXqMhYHtecLt59AjaG1Q NdOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Re3KGsFh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n8-20020a170902f60800b001678ce90824si15098041plg.542.2022.06.27.18.57.26; Mon, 27 Jun 2022 18:57:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Re3KGsFh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242992AbiF1BPg (ORCPT + 99 others); Mon, 27 Jun 2022 21:15:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242981AbiF1BP2 (ORCPT ); Mon, 27 Jun 2022 21:15:28 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D367322B2E for ; Mon, 27 Jun 2022 18:15:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656378927; x=1687914927; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=g4aK040aBriUUhWE+Z8oUxYhPOJKeQMijUgvuZuOewk=; b=Re3KGsFhMzSJ+yZg5PQrx1jxHtQExEYkCpV7TZsFLborQbW/wpBGjesh xiAo2Drn2zIg0Ohk4yyUO9xJaVd4UCae4I0n5pojXz4jcLei+6oEht7RW 3GWVZFRv1b1PmV2Vc3og3J+mvrn16UlwTV/wRJR3hn4eYVli3JmilndMy AAAUXOIcuzLeGHn/+uyAoGEYdvfL8D0YyWS3GXVz0D1R0I8773jam5ebF QARWwQKyZExiqMwwqySh84rtOi7HRY3zJ4deS+6hhoYagOhxi1aAgSIjk H2S0Lj5NnJrcGr3I7OQt5uFFdx+M/Tr104qaUXPqaxd15rxYypxO5D0/O w==; X-IronPort-AV: E=McAfee;i="6400,9594,10391"; a="343291624" X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="343291624" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2022 18:15:27 -0700 X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="616997125" Received: from iiturbeo-mobl.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.212.89.183]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2022 18:15:23 -0700 Message-ID: <6b84f9058ce5e60fdf3e4abd075a2b8f591ccffc.camel@intel.com> Subject: Re: [PATCH v8 4/5] x86/mm: Add noalias variants of set_memory_*crypted() functions From: Kai Huang To: Dave Hansen , "Kirill A. Shutemov" Cc: Kuppuswamy Sathyanarayanan , 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 Date: Tue, 28 Jun 2022 13:15:21 +1200 In-Reply-To: References: <20220609025220.2615197-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20220609025220.2615197-5-sathyanarayanan.kuppuswamy@linux.intel.com> <20220627151257.fhynhvcnpk22kflw@black.fi.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.2 (3.44.2-1.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >=20 > I still don't like the idea of using the DMA API itself. But, maybe we > need some common infrastructure that the DMA API and this code use which > says, "get me some pages that I can safely make shared". Right. For instance any KVM PV feature would require shared memory, and DM= A API normally doesn't fit (taking 'struct kvm_steal_time' as example). Maybe we can reserve a CMA for this purpose. --=20 Thanks, -Kai