Received: by 10.223.185.116 with SMTP id b49csp2934334wrg; Mon, 5 Mar 2018 11:01:21 -0800 (PST) X-Google-Smtp-Source: AG47ELsSUAuXRdF9qNCGacc48L85Y+zbMhEGaQ/m4Bc3ll32PtLkWrwspXgJSeIScvdbLJThQ4FU X-Received: by 2002:a17:902:22e:: with SMTP id 43-v6mr14149338plc.384.1520276481767; Mon, 05 Mar 2018 11:01:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520276481; cv=none; d=google.com; s=arc-20160816; b=jTHF6rYPyOrypcQaf5dS7Fra0/cWMTPN33F1/pIfvBewvT+rFMqN8WNGpNlsEVq3Ji cpZh3levxjtWti03D7hXMYzboq93IVs5jnG7nx60c4lgKUN8m5Lc+23L3iDVqNcxmSz1 4hE+YLvAwM3kedVB1ogjpJ6/80U7mppijMg64lE3o8wV/ZqHjAZxYhrhmCmt7I/8tL1F O/NOU/YQYJhqHg6L32UI0LMApocpTKXGBv+9vhZV3I43GXVQurNAngENRp08Vo0Xoq6l e+UHOW6lllIfYdGsPpoERw5fbAX+CHBmtrXI2CpAy52zRNnnhQ7WCXt4mfw/57YScFJW gMPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject:arc-authentication-results; bh=vkz2BQXzFcHKgbP8HQMbA5zMeVG0sAk8iCbVEcXO2I0=; b=klPn5tG9qV4GERSwpa/D2Cxs/MxeexIAKVjrYR4SQZb/VmU7a+wvhPqc6L+SL21ABs WKxrgiBfR37jeMOHpfpo/z2YM0rDf0e3GTLCSbwlA44sSCJBahhR5ldv1bsLZUqNONFA wGSmB0AjyAeBmGa8gdYgKO6z/kWc84eRJZ1zInyKH/avlrXPEtWmW8x+90DT4JhSjUVJ AZOt8bgIwRcIE6hV9ViDpvOjGsNoldy0BAOA8n1ynATEJh8mycxkxoTEOhl98Ne1V6Q/ sQ/t2gO1YF3vgZjUNl/ckVanQ9EKSZmdxEpD3N1GWYcqh2IshqT06KL9Jk78Qo4LXXje eqJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u25si8679651pgv.221.2018.03.05.11.01.05; Mon, 05 Mar 2018 11:01:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752586AbeCETAC (ORCPT + 99 others); Mon, 5 Mar 2018 14:00:02 -0500 Received: from mga04.intel.com ([192.55.52.120]:54159 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751311AbeCETAB (ORCPT ); Mon, 5 Mar 2018 14:00:01 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2018 11:00:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,428,1515484800"; d="scan'208";a="32572528" Received: from ray.jf.intel.com (HELO [10.7.201.16]) ([10.7.201.16]) by orsmga003.jf.intel.com with ESMTP; 05 Mar 2018 11:00:00 -0800 Subject: Re: [RFC, PATCH 19/22] x86/mm: Implement free_encrypt_page() To: "Kirill A. Shutemov" , Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Tom Lendacky References: <20180305162610.37510-1-kirill.shutemov@linux.intel.com> <20180305162610.37510-20-kirill.shutemov@linux.intel.com> Cc: Kai Huang , linux-kernel@vger.kernel.org, linux-mm@kvack.org From: Dave Hansen Message-ID: Date: Mon, 5 Mar 2018 11:00:00 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180305162610.37510-20-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/05/2018 08:26 AM, Kirill A. Shutemov wrote: > +void free_encrypt_page(struct page *page, int keyid, unsigned int order) > +{ > + int i; > + void *v; > + > + for (i = 0; i < (1 << order); i++) { > + v = kmap_atomic_keyid(page, keyid + i); > + /* See comment in prep_encrypt_page() */ > + clflush_cache_range(v, PAGE_SIZE); > + kunmap_atomic(v); > + } > +} Did you miss adding the call sites for this?