Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-02-05 Thread Michael S. Tsirkin
On Wed, Jan 11, 2023 at 10:12:38PM +0100, Halil Pasic wrote: > On Wed, 11 Jan 2023 19:08:53 +0800 > Xuan Zhuo wrote: > > > > > +The device shares memory to the driver based on shared memory regions exposes memory to the driver btw. "share" is already overused in this text. > > > >

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-20 Thread Halil Pasic
On Thu, 12 Jan 2023 20:31:24 +0800 Xuan Zhuo wrote: > > > Shmid is used to define what this sharing memory is used to do, not its > > > unique > > > identifier. > > > > As far as I can tell the shmid is supposed to uniquely identify a single > > shared memory region! > > > > " A device may

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-13 Thread Michael S. Tsirkin
On Fri, Jan 13, 2023 at 02:24:14PM +0800, Xuan Zhuo wrote: > On Fri, 13 Jan 2023 10:29:49 +0800, Jason Wang wrote: > > On Fri, Jan 13, 2023 at 9:59 AM Xuan Zhuo > > wrote: > > > > > > On Thu, 12 Jan 2023 16:41:32 +0100, Halil Pasic > > > wrote: > > > > On Thu, 12 Jan 2023 15:30:58 +0100 > > >

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-12 Thread Jason Wang
On Fri, Jan 13, 2023 at 9:59 AM Xuan Zhuo wrote: > > On Thu, 12 Jan 2023 16:41:32 +0100, Halil Pasic wrote: > > On Thu, 12 Jan 2023 15:30:58 +0100 > > Cornelia Huck wrote: > > > > > >> > > > >> I like that: we don't want to talk about hosts/VMMs/etc. as we > > > >> fundamentally deal with

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-12 Thread Xuan Zhuo
On Thu, 12 Jan 2023 16:41:32 +0100, Halil Pasic wrote: > On Thu, 12 Jan 2023 15:30:58 +0100 > Cornelia Huck wrote: > > > >> > > >> I like that: we don't want to talk about hosts/VMMs/etc. as we > > >> fundamentally deal with devices and drivers, but sharing between guests > > >> is of course the

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-12 Thread Cornelia Huck
On Thu, Jan 12 2023, Halil Pasic wrote: > On Thu, 12 Jan 2023 15:30:58 +0100 > Cornelia Huck wrote: > >> >> >> >> I like that: we don't want to talk about hosts/VMMs/etc. as we >> >> fundamentally deal with devices and drivers, but sharing between guests >> >> is of course the obvious use case.

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-12 Thread Halil Pasic
On Thu, 12 Jan 2023 15:30:58 +0100 Cornelia Huck wrote: > >> > >> I like that: we don't want to talk about hosts/VMMs/etc. as we > >> fundamentally deal with devices and drivers, but sharing between guests > >> is of course the obvious use case. > >> > >> I'm just wondering how best to express

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-12 Thread Cornelia Huck
On Thu, Jan 12 2023, Xuan Zhuo wrote: > On Thu, 12 Jan 2023 09:42:05 +0100, Cornelia Huck wrote: >> On Thu, Jan 12 2023, "Michael S. Tsirkin" wrote: >> >> > On Thu, Jan 12, 2023 at 10:01:25AM +0800, Jason Wang wrote: >> >> On Wed, Jan 11, 2023 at 11:11 PM Halil Pasic wrote: >> >> > >> >> > On

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-12 Thread Halil Pasic
On Thu, 12 Jan 2023 01:56:14 -0500 "Michael S. Tsirkin" wrote: > I think fundamentally from spec POV memory is shared between devices. Right, but with the gid stuff and the corresponding rules shared between two or more arbitrary virtio-ism devices won't do. We need to find a way to express the

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-12 Thread Cornelia Huck
On Thu, Jan 12 2023, "Michael S. Tsirkin" wrote: > On Thu, Jan 12, 2023 at 10:01:25AM +0800, Jason Wang wrote: >> On Wed, Jan 11, 2023 at 11:11 PM Halil Pasic wrote: >> > >> > On Wed, 11 Jan 2023 19:08:53 +0800 >> > Xuan Zhuo wrote: >> > >> > > > > +ISM(Internal Shared Memory) device provides

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-11 Thread Michael S. Tsirkin
On Wed, Jan 11, 2023 at 10:12:38PM +0100, Halil Pasic wrote: > On Wed, 11 Jan 2023 19:08:53 +0800 > Xuan Zhuo wrote: > > > > > +The device shares memory to the driver based on shared memory regions > > > > +\ref{sec:Basic Facilities of a Virtio Device / Shared Memory Regions}. > > > > +However,

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-11 Thread Michael S. Tsirkin
On Thu, Jan 12, 2023 at 10:01:25AM +0800, Jason Wang wrote: > On Wed, Jan 11, 2023 at 11:11 PM Halil Pasic wrote: > > > > On Wed, 11 Jan 2023 19:08:53 +0800 > > Xuan Zhuo wrote: > > > > > > > +ISM(Internal Shared Memory) device provides the ability to share > > > > > memory between > > > > >

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-11 Thread Jason Wang
On Wed, Jan 11, 2023 at 11:11 PM Halil Pasic wrote: > > On Wed, 11 Jan 2023 19:08:53 +0800 > Xuan Zhuo wrote: > > > > > +ISM(Internal Shared Memory) device provides the ability to share > > > > memory between > > > > +different VMs launched from the same entity. > > > > > > Launched by instead

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-11 Thread Halil Pasic
On Wed, 11 Jan 2023 19:08:53 +0800 Xuan Zhuo wrote: > > > +The device shares memory to the driver based on shared memory regions > > > +\ref{sec:Basic Facilities of a Virtio Device / Shared Memory Regions}. > > > +However, it does not need to allocate physical memory during > > >

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-11 Thread Halil Pasic
On Wed, 11 Jan 2023 19:08:53 +0800 Xuan Zhuo wrote: > > > +\subsection{Permissions}\label{sec:Device Types / Network Device / > > > Device Operation / Permission} > > > + > > > +The permissions of a ism region determine whether this ism region can be > > > +attached and the read and write

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-11 Thread Halil Pasic
On Wed, 11 Jan 2023 19:08:53 +0800 Xuan Zhuo wrote: > > > +\begin{description} > > > +\item[\field{ev_type}] The type of event, the driver can get the size of > > > the > > > +structure based on this. > > > + > > > +\item[\field{offset}] The offset of ism regions with the event. > > > >

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-11 Thread Halil Pasic
On Wed, 11 Jan 2023 19:08:53 +0800 Xuan Zhuo wrote: > > > > > +Large shared memories are divided into multiple chunks, and one > > > time > > > > "Memories" sounds wrong here. I guess what you used to call "regions" > > you now call "chunks". But I may be wrong. > > A ism region

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-11 Thread Halil Pasic
On Wed, 11 Jan 2023 19:08:53 +0800 Xuan Zhuo wrote: > > > +ISM(Internal Shared Memory) device provides the ability to share memory > > > between > > > +different VMs launched from the same entity. > > > > Launched by instead of from? Maybe introduce a catchy name for the > > "entity that

Re: [virtio-dev] [PATCH v2 1/1] virtio-ism: introduce new device virtio-ism

2023-01-10 Thread Halil Pasic
On Fri, 23 Dec 2022 16:13:54 +0800 Xuan Zhuo wrote: > The virtio ism device provides and manages many memory ism regions in > host. These ism regions can be alloc/attach/detach by driver. Every [..] Hi Xuan Zhou! Some words in advance. While I'm supportive of the general idea, I find the