lkml.org 
[lkml]   [2022]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v5 00/13] KVM: mm: fd-based approach for supporting KVM guest private memory
From
On 4/22/22 12:56, Chao Peng wrote:
> /* memfile notifier flags */
> #define MFN_F_USER_INACCESSIBLE 0x0001 /* memory allocated in the file is inaccessible from userspace (e.g. read/write/mmap) */
> #define MFN_F_UNMOVABLE 0x0002 /* memory allocated in the file is unmovable */
> #define MFN_F_UNRECLAIMABLE 0x0003 /* memory allocated in the file is unreclaimable (e.g. via kswapd or any other pathes) */

You probably mean BIT(0/1/2) here.

Paolo

> When memfile_notifier is being registered, memfile_register_notifier will
> need check these flags. E.g. for MFN_F_USER_INACCESSIBLE, it fails when
> previous mmap-ed mapping exists on the fd (I'm still unclear on how to do
> this). When multiple consumers are supported it also need check all
> registered consumers to see if any conflict (e.g. all consumers should have
> MFN_F_USER_INACCESSIBLE set). Only when the register succeeds, the fd is
> converted into a private fd, before that, the fd is just a normal (shared)
> one. During this conversion, the previous data is preserved so you can put
> some initial data in guest pages (whether the architecture allows this is
> architecture-specific and out of the scope of this patch).

\
 
 \ /
  Last update: 2022-04-22 13:07    [W:0.171 / U:1.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site