[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: RFC: virtio-hostmem (+ Continuation of discussion from [virtio-dev] Memory sharing device)
> Michael: OK so who allocates memory out of the PCI region? > Response: > > Allocation will be split by guest address space versus host address space. > > Guest address space: The guest driver determines the offset into the BAR in which to allocate the new region. The implementation of the allocator itself may live on the host (while guest triggers such allocations via the config virtqueue messages), but the ownership of region offsets and sizes will be in the guest. This allows for the easy use of existing guest ref-counting mechanisms such as last close() calling release() to clean up the memory regions in the guest. > > Host address space: The backing of such memory regions is considered completely optional. The host may service a guest region with a memory of its choice that depends on the usage of the device. The time this servicing happens may be any time after the guest communicates the message to create a memory region, but before the guest destroys the memory region. In the meantime, some examples of how the host may respond to the allocation request: Should we note here what happens if a guest releases (a user process dies) the region without asking the host to un-back it? Regards, Roman.