On 3/20/24 09:39, Michael Roth wrote:
@@ -1842,6 +1842,17 @@ static void ram_block_add(RAMBlock *new_block, Error
**errp)
}
}
+if (kvm_enabled() && (new_block->flags & RAM_GUEST_MEMFD)) {
+assert(new_block->guest_memfd < 0);
+
+new_block->guest_memfd = kvm
Add KVM guest_memfd support to RAMBlock so both normal hva based memory
and kvm guest memfd based private memory can be associated in one RAMBlock.
Introduce new flag RAM_GUEST_MEMFD. When it's set, it calls KVM ioctl to
create private guest_memfd during RAMBlock setup.
Allocating a new RAM_GUEST