Re: [PATCHv5 09/19] x86/mm: Preserve KeyID on pte_modify() and pgprot_modify()

2018-07-20 Thread Kirill A. Shutemov
On Wed, Jul 18, 2018 at 04:30:35PM -0700, Dave Hansen wrote: > On 07/17/2018 04:20 AM, Kirill A. Shutemov wrote: > > An encrypted VMA will have KeyID stored in vma->vm_page_prot. This way > > we don't need to do anything special to setup encrypted page table > > entries > > We don't do anything sp

Re: [PATCHv5 09/19] x86/mm: Preserve KeyID on pte_modify() and pgprot_modify()

2018-07-18 Thread Dave Hansen
On 07/17/2018 04:20 AM, Kirill A. Shutemov wrote: > An encrypted VMA will have KeyID stored in vma->vm_page_prot. This way > we don't need to do anything special to setup encrypted page table > entries We don't do anything special for protection keys, either. They just work too. > diff --git a/a

[PATCHv5 09/19] x86/mm: Preserve KeyID on pte_modify() and pgprot_modify()

2018-07-17 Thread Kirill A. Shutemov
An encrypted VMA will have KeyID stored in vma->vm_page_prot. This way we don't need to do anything special to setup encrypted page table entries and don't need to reserve space for KeyID in a VMA. This patch changes _PAGE_CHG_MASK to include KeyID bits. Otherwise they are going to be stripped fro