Re: [RFC 07/16] KVM: mm: Introduce VM_KVM_PROTECTED

2020-05-26 Thread Kirill A. Shutemov
On Mon, May 25, 2020 at 11:40:01PM -0700, John Hubbard wrote: > On 2020-05-22 05:52, Kirill A. Shutemov wrote: > ... > > @@ -2773,6 +2780,7 @@ struct page *follow_page(struct vm_area_struct *vma, > > unsigned long address, > > #define FOLL_LONGTERM 0x1 /* mapping lifetime is indefinite:

Re: [RFC 07/16] KVM: mm: Introduce VM_KVM_PROTECTED

2020-05-26 Thread Kirill A. Shutemov
On Tue, May 26, 2020 at 09:15:52AM +0300, Mike Rapoport wrote: > On Fri, May 22, 2020 at 03:52:05PM +0300, Kirill A. Shutemov wrote: > > The new VMA flag that indicate a VMA that is not accessible to userspace > > but usable by kernel with GUP if FOLL_KVM is specified. > > > > The FOLL_KVM is only

Re: [RFC 07/16] KVM: mm: Introduce VM_KVM_PROTECTED

2020-05-25 Thread John Hubbard
On 2020-05-22 05:52, Kirill A. Shutemov wrote: ... @@ -2773,6 +2780,7 @@ struct page *follow_page(struct vm_area_struct *vma, unsigned long address, #define FOLL_LONGTERM 0x1 /* mapping lifetime is indefinite: see below */ #define FOLL_SPLIT_PMD0x2 /* split huge pmd before re

Re: [RFC 07/16] KVM: mm: Introduce VM_KVM_PROTECTED

2020-05-25 Thread Mike Rapoport
On Fri, May 22, 2020 at 03:52:05PM +0300, Kirill A. Shutemov wrote: > The new VMA flag that indicate a VMA that is not accessible to userspace > but usable by kernel with GUP if FOLL_KVM is specified. > > The FOLL_KVM is only used in the KVM code. The code has to know how to > deal with such pages

[RFC 07/16] KVM: mm: Introduce VM_KVM_PROTECTED

2020-05-22 Thread Kirill A. Shutemov
The new VMA flag that indicate a VMA that is not accessible to userspace but usable by kernel with GUP if FOLL_KVM is specified. The FOLL_KVM is only used in the KVM code. The code has to know how to deal with such pages. Signed-off-by: Kirill A. Shutemov --- include/linux/mm.h | 8