OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-dev] Memory sharing device




On Mon, Feb 18, 2019 at 11:12 PM Gerd Hoffmann <kraxel@redhat.com> wrote:
 Hi,

> slots by doing so. So for Vulkan, we rely on having one large host visible
> region on the host that is a single region of host shared memory. That, is
> then sub-allocated for the guest. So there is no Vulkan host pointer that

Yes, sub-allocating will be needed for reasonable performance.

> In general though, this means that the ideal usage of host pointers would
> be to set a few regions up front for certain purposes, then share that out
> amongst other device contexts. This also facilitates sharing the memory
> between guest processes, which is useful for implementing things like
> compositors.

Guest processes in the same VM or in different VMs?
Â
Â
The guest processes are in the same VM.
Are you also considering the usage in different VMs?
In that case, if we had to address it, we would rely on there being
an existing method on the host to map shared regions across processes,
similar to gralloc,
and use the fact that for each VM, they have a host pointer somehow,
and expose the relevant host pointer to the guest.

> This also features heavily for our "virtio userspace" thing.
> Since this is a common pattern, should this sharing concept be standardized
> somehow? I.e., should there be a standard way to send Shmid/offset/size to
> other devices, or have that be a standard struct in the hypervisor?

Same question: other devices of the same VM?

Yes, also, other devices of the same VM.
For different VMs, does the same scheme to send shmid/offset/size to other VMs work?
Shmid's could be different and alias a common shared memory on the host,
or additional metadata could be passed at some other level
about which memory is "actually" shared.


cheers,
 Gerd



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]