[PATCH v2 0/3] kvm: guest_memfd enhancement and fix for KVM_SET_USER_MEMORY_REGION2

Xiaoyao Li posted 3 patches 3 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250728115707.1374614-1-xiaoyao.li@intel.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>
accel/kvm/kvm-all.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
[PATCH v2 0/3] kvm: guest_memfd enhancement and fix for KVM_SET_USER_MEMORY_REGION2
Posted by Xiaoyao Li 3 months, 2 weeks ago
Patch 1 changes to check guest memfd CAP on VM instance.

Patch 2 is a fix for KVM_SET_USER_MEMORY_REGION2.

Patch 3 is an enhancement for guest_memfd_offset.

---
Changes in v2:
- Collect R-B tags;
- Use {} to zero out the struct instead of memset() in patch2;
- Initialize guest_memfd_offset at the original source in patch3;

Xiaoyao Li (3):
  accel/kvm: Switch to check KVM_CAP_GUEST_MEMFD and
    KVM_CAP_USER_MEMORY2 on VM
  accel/kvm: Zero out mem explicitly in kvm_set_user_memory_region()
  accel/kvm: Set guest_memfd_offset to non-zero value only when
    guest_memfd is valid

 accel/kvm/kvm-all.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

-- 
2.43.0
Re: [PATCH v2 0/3] kvm: guest_memfd enhancement and fix for KVM_SET_USER_MEMORY_REGION2
Posted by Paolo Bonzini 2 months ago
Queued, thanks.

Paolo
Re: [PATCH v2 0/3] kvm: guest_memfd enhancement and fix for KVM_SET_USER_MEMORY_REGION2
Posted by Xiaoyao Li 2 months ago
On 7/28/2025 7:57 PM, Xiaoyao Li wrote:
> Patch 1 changes to check guest memfd CAP on VM instance.
> 
> Patch 2 is a fix for KVM_SET_USER_MEMORY_REGION2.
> 
> Patch 3 is an enhancement for guest_memfd_offset.

Gentle ping.

> ---
> Changes in v2:
> - Collect R-B tags;
> - Use {} to zero out the struct instead of memset() in patch2;
> - Initialize guest_memfd_offset at the original source in patch3;
> 
> Xiaoyao Li (3):
>    accel/kvm: Switch to check KVM_CAP_GUEST_MEMFD and
>      KVM_CAP_USER_MEMORY2 on VM
>    accel/kvm: Zero out mem explicitly in kvm_set_user_memory_region()
>    accel/kvm: Set guest_memfd_offset to non-zero value only when
>      guest_memfd is valid
> 
>   accel/kvm/kvm-all.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>