On Tue, Aug 5, 2008 at 4:41 PM, Daniel Godás <[EMAIL PROTECTED]> wrote: > Hi, > > i've playing with libkvm.c and tried to make register_slot a bit more > intelligent. The code in the repository always creates a new slot when > register_slot is called but to give memory management more flexibility > it could detect adjacent slots and merge them automatically. I attach > a patch that illustrates what i want to do. With something like this > implemented in kernel space too, memory management could be made much > more flexible as memory holes could be created and modified on the > run.
Hi Right now, I'm trying to completely rewrite the memory registration (if needed), to reduce the impact of kvm specific code in qemu. Do you have any specific use case that led you to this patch ? > > Sample scenario: > > 1) kvm_create_phys_mem creates a big memory chunk > 2) kvm_create_mem_hole makes a hole that will redirect accesses to io > emulation (starting at userspace address ADDR) > 3) kvm_register_userspace_phys_ > mem re-registers the hole as user memory by passing it a pointer to ADDR > > The patch will not work by its own without more changes, its just for > illustrative purposes. > > Cheers !!! > -- Glauber Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act." -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
