[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180306083851.g5yh6f66srvrtc5n@node.shutemov.name>
Date: Tue, 6 Mar 2018 11:38:51 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Dave Hansen <dave.hansen@...el.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
Tom Lendacky <thomas.lendacky@....com>,
Kai Huang <kai.huang@...ux.intel.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [RFC, PATCH 19/22] x86/mm: Implement free_encrypt_page()
On Mon, Mar 05, 2018 at 11:00:00AM -0800, Dave Hansen wrote:
> 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?
No. It is in "mm, rmap: Free encrypted pages once mapcount drops to zero".
But the call is optimized out since anon_vma_encrypted() is always false
so far.
--
Kirill A. Shutemov
Powered by blists - more mailing lists