• Sean Christopherson's avatar
    KVM: selftests: Introduce VM "shape" to allow tests to specify the VM type · 672eaa35
    Sean Christopherson authored
    Add a "vm_shape" structure to encapsulate the selftests-defined "mode",
    along with the KVM-defined "type" for use when creating a new VM.  "mode"
    tracks physical and virtual address properties, as well as the preferred
    backing memory type, while "type" corresponds to the VM type.
    
    Taking the VM type will allow adding tests for KVM_CREATE_GUEST_MEMFD
    without needing an entirely separate set of helpers.  At this time,
    guest_memfd is effectively usable only by confidential VM types in the
    form of guest private memory, and it's expected that x86 will double down
    and require unique VM types for TDX and SNP guests.
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <20231027182217.3615211-30-seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    672eaa35
kvm_util_base.h 28.6 KB