Re: [PATCH, RFC 18/62] x86/mm: Implement syncing per-KeyID direct mappings

2019-06-17 Thread Kirill A. Shutemov
On Mon, Jun 17, 2019 at 04:51:58PM +0200, Peter Zijlstra wrote: > On Mon, Jun 17, 2019 at 05:43:28PM +0300, Kirill A. Shutemov wrote: > > On Mon, Jun 17, 2019 at 11:27:55AM +0200, Peter Zijlstra wrote: > > > > > > And yet I don't see anything in pageattr.c. > > > > > > > > You're right. I've

Re: [PATCH, RFC 18/62] x86/mm: Implement syncing per-KeyID direct mappings

2019-06-17 Thread Peter Zijlstra
On Mon, Jun 17, 2019 at 05:43:28PM +0300, Kirill A. Shutemov wrote: > On Mon, Jun 17, 2019 at 11:27:55AM +0200, Peter Zijlstra wrote: > > > > And yet I don't see anything in pageattr.c. > > > > > > You're right. I've hooked up the sync in the wrong place. > I think something like this should do

Re: [PATCH, RFC 18/62] x86/mm: Implement syncing per-KeyID direct mappings

2019-06-17 Thread Kirill A. Shutemov
On Mon, Jun 17, 2019 at 11:27:55AM +0200, Peter Zijlstra wrote: > On Sat, Jun 15, 2019 at 01:43:09AM +0300, Kirill A. Shutemov wrote: > > On Fri, Jun 14, 2019 at 11:51:32AM +0200, Peter Zijlstra wrote: > > > On Wed, May 08, 2019 at 05:43:38PM +0300, Kirill A. Shutemov wrote: > > > > For MKTME we

Re: [PATCH, RFC 18/62] x86/mm: Implement syncing per-KeyID direct mappings

2019-06-17 Thread Peter Zijlstra
On Sat, Jun 15, 2019 at 01:43:09AM +0300, Kirill A. Shutemov wrote: > On Fri, Jun 14, 2019 at 11:51:32AM +0200, Peter Zijlstra wrote: > > On Wed, May 08, 2019 at 05:43:38PM +0300, Kirill A. Shutemov wrote: > > > For MKTME we use per-KeyID direct mappings. This allows kernel to have > > > access to

Re: [PATCH, RFC 18/62] x86/mm: Implement syncing per-KeyID direct mappings

2019-06-14 Thread Kirill A. Shutemov
On Fri, Jun 14, 2019 at 11:51:32AM +0200, Peter Zijlstra wrote: > On Wed, May 08, 2019 at 05:43:38PM +0300, Kirill A. Shutemov wrote: > > For MKTME we use per-KeyID direct mappings. This allows kernel to have > > access to encrypted memory. > > > > sync_direct_mapping() sync per-KeyID direct

Re: [PATCH, RFC 18/62] x86/mm: Implement syncing per-KeyID direct mappings

2019-06-14 Thread Peter Zijlstra
On Wed, May 08, 2019 at 05:43:38PM +0300, Kirill A. Shutemov wrote: > For MKTME we use per-KeyID direct mappings. This allows kernel to have > access to encrypted memory. > > sync_direct_mapping() sync per-KeyID direct mappings with a canonical > one -- KeyID-0. > > The function tracks changes

[PATCH, RFC 18/62] x86/mm: Implement syncing per-KeyID direct mappings

2019-05-08 Thread Kirill A. Shutemov
For MKTME we use per-KeyID direct mappings. This allows kernel to have access to encrypted memory. sync_direct_mapping() sync per-KeyID direct mappings with a canonical one -- KeyID-0. The function tracks changes in the canonical mapping: - creating or removing chunks of the translation tree;