rust-vmm / kvm-ioctls

Apache License 2.0
255 stars 103 forks source link

Add KVM_SET_USER_MEMORY_REGION2 and KVM_CREATE_GUEST_MEMFD #262

Open MatiasVara opened 1 month ago

MatiasVara commented 1 month ago

Hello, I need these two ioctls, but they are not currently supported. Do you think I should add them via PR?

Thanks

roypat commented 1 month ago

Hi @MatiasVara, yes, generally we're accepting new ioctls via PRs! However, in this specific case, we'll need to update kvm-bindings first, since currently it is generated from 6.2 (and the whole guest_memfd machinery only made it into 6.8 or 6.9 iirc). There is a PR open for updating the bindings already (https://github.com/rust-vmm/kvm-bindings/pull/106), but it needs to preparatory work for testing reasons (since it also adds risc-v bindings). If your need is urgent, we'd probably also accept a PR that splits up the update of x86 and arm bindings to 6.9 into its own PR, and not block it on the risc-v bindings though :)

MatiasVara commented 1 month ago

Hello @roypat, thanks for the answer! I do not need them urgently so I can wait for the update of kvm-bindings. However, I can submit the PR to begin the review process. It's likely that I made some mistakes. WDYT?

roypat commented 1 month ago

Hello @roypat, thanks for the answer! I do not need them urgently so I can wait for the update of kvm-bindings. However, I can submit the PR to begin the review process. It's likely that I made some mistakes. WDYT?

Yes, that is fine!