lkml.org 
[lkml]   [2022]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 26/28] KVM: selftests: Split out helper to allocate guest mem via memfd
From
Date
On Sat, 2022-02-26 at 00:15 +0000, Sean Christopherson wrote:
> Extract the code for allocating guest memory via memfd out of
> vm_userspace_mem_region_add() and into a new helper, kvm_memfd_alloc().
> A future selftest to populate a guest with the maximum amount of guest
> memory will abuse KVM's memslots to alias guest memory regions to a
> single memfd-backed host region, i.e. needs to back a guest with memfd
> memory without a 1:1 association between a memslot and a memfd instance.
>
> No functional change intended.
>
> Signed-off-by: Sean Christopherson <seanjc@google.com>

While we're at it, please can we make the whole thing go away and just
return failure #ifndef MFD_CLOEXEC, instead of breaking the build on
older userspace?
[unhandled content-type:application/pkcs7-signature]
\
 
 \ /
  Last update: 2022-03-01 00:37    [W:0.359 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site