-
Notifications
You must be signed in to change notification settings - Fork 107
GuestRegionMmap: extend for supporting guest_memfd #315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi Matias! Yeah, I've thought about how/if vm-memory should deal with guest_memfds before, because I ran into the same awkwardness of having to store my guest_memfds separately from my guest memory regions. The idea I came up with was #312, which would allow the definition of some I'm not a huge fan of adding KVM/guest_memfd specific fields to GuestRegionMmap, for the same reason I'm not a huge fan of merging the Xen stuff into GuestRegionMmap, because it'll just end up as some hodge-podge god-object that tries to support a million different things at once and just becomes unmaintainable :/ - and I wish for vm-memory to have APIs that are extensible without strictly requiring changes in vm-memory itself (there's some related discussion earlier this week in #314). |
Hello Patrick and thanks for the response.
Yes, I think so. If I understand correctly, I could just use
That sounds good for me. |
Hi Matias, I encountered the same issue with you.
I think it is yes. Because in the scenario of using guest_memfd, we allocate the mmap memory region and guest_memfd separately. It is better to save only mmap memory information in But now #312 is not merged yet. The implementation of Thanks to roypat for #312 , hope it can be merged soon. |
Just adding some thoughts, this sounds reasonable to me. Since it can be managed through |
I see, thanks for the clarification.
Yes! Matias |
Probably I am missing a lot of things here, but I was wondering if it would be worth to extend GuestRegionMmap (see
vm-memory/src/mmap.rs
Line 107 in 3a0b31d
fd
resulting fromkvm_create_guest_memfd()
. The problem I have is that I keep a separatedVec<>
to store thefd
for each region created by usingkvm_userspace_memory_region2()
. I would like to have everything in the same structure. The mapping between fd and region is required when switching regions from private to shared and vice-versa.Any thoughts?
Thanks, Matias.
The text was updated successfully, but these errors were encountered: