qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 00/13] KVM: mm: fd-based approach for supporting KVM guest


From: Paolo Bonzini
Subject: Re: [PATCH v5 00/13] KVM: mm: fd-based approach for supporting KVM guest private memory
Date: Fri, 22 Apr 2022 13:06:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

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).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]