Skip to content
Snippets Groups Projects
Commit ba5808f5 authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov
Browse files

KVM: selftests: Split out helper to allocate guest mem via memfd

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2074832



commit a4187c9b
Author: Sean Christopherson <seanjc@google.com>
Date:   Sat Feb 26 00:15:44 2022 +0000

    KVM: selftests: Split out helper to allocate guest mem via memfd

    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: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <20220226001546.360188-27-seanjc@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>

Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
parent 52798888
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment