[virtio-dev] RE: [virtio-comment] [PATCH v4 00/20] Split device spec to its individual files

2023-01-13 Thread Parav Pandit
Hi Michael,

> From: Michael S. Tsirkin 
> Sent: Friday, January 13, 2023 6:42 AM
> >
> > This LGTM now.
> >
> > Michael: did you check whether redlining works as expected?
> 
> I have successfully generated a diff from 1.1 and did some manual spot
> checking. Looks ok to me.  I really expect contributors to do this too :)

Can you please share command/example for this check so that I can do it next 
time? 

-
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org



[virtio-dev] Re: [PATCH v4 00/20] Split device spec to its individual files

2023-01-13 Thread David Hildenbrand

On 12.01.23 22:22, Parav Pandit wrote:

Relatively several of the recent device specifications are maintained
in their own specification file. Such separate files enables better
maintenance of the specification overall.
However, several of the initial virtio device specifications
are located in single file.

Hence, split them into their individual files.

Additionally, each device's driver and device conformance is
present in one giant conformance file all together.

As Michael suggest's move this device and driver conformance
section adjacent to device specification in each device specific
directory. This further makes device specification self-contained.



Yeah, that looks much cleaner now, thanks!

--
Thanks,

David / dhildenb


-
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org



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
> > > > 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 the uniqueness scope, is it 
> > > > > >> per
> > > > > >> (ISM) device?
> > > > > >
> > > > > > No, each vm has at least one separate device. The devices in a host 
> > > > > > form
> > > > > > an uniqueness scope.
> > > > >
> > > > > Should we call it a 'group', then? A host would be an example of such 
> > > > > a
> > > > > group.
> > > >
> > > > How about 'communication domain'? Devices within a single communication
> > > > domain may be able to speak to each other via SMC and may not have the
> > > > same device_id. Two devices from different communication domains can't
> > > > communicate via ISM, but may have the same device_id.
> > >
> > > I agree.
> > >
> > > >
> > > > I don't like group because it is very generic, and may sound like
> > > > the grouping can be done arbitrarily. E.g. with a shared memory based
> > > > implementation akin to the PoC putting devices on different hosts into
> > > > the same 'group' should be illegal.
> >
> > Any reason why this is illegal?
> 
> The ism device must on the same host.

Fundamentally the limitation is that
the devices must have access to the same memory.
This is what we care about not who runs the VMs there's
no need to mention that at all.


But I feel a bigger question is whether we can avoid making ISM
a migration blocker? E.g.:
- a lone vm is migrated, it's disconnected from memory on source
- a lone vm is migrated, it's connected to memory on destination
- a group of vms is migrated, the memory is migrated with them
  and they remain connected to it

I feel the switch to virtio is a good time to address these
issues, if we don't address this straight away then users
using virtio-ism will have no way to know whether their
VM is migrateable or not.


> >
> > > >
> > > > On the other hand there is also the following question. If we move away
> > > > form the one ID per host model ("The device MUST ensure that the gid on
> > > > the same entity i same and different from the gid on other entity.") 
> > > > then
> > > > we could also allow having more than one communication domains on a
> > > > single host (to limit what entities can use ISM to communicate).
> >
> > Yes, but I think it might not be necessary to say how gid is actually
> > implemented, I can think most of the time it should be provisioned by
> > the the management stack which is probably out of the scope of the
> > spec.
> 
> Imagine that the VMs from two different cloud manufacturers may have the same
> GID (Host-Id). They believed that they can communicate based on ISM Device. 
> This
> is wrong.
> 
> Thanks.

Let's leave all this talk about entities out it just serves to
confuse. Same as with previous discussion, explain the
limitation: two devices can access the same shared memory if and
only if they have the same gid. And give an example of a host
running multiple VMs.


> 
> >
> > Thanks
> >
> > >
> > > Yes, this is a good idea.
> > >
> > > Thanks.
> > >
> > > >
> > > > Regards,
> > > > Halil
> > > >
> > >
> >


-
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org



[virtio-dev] Re: [virtio-comment] [PATCH v4 00/20] Split device spec to its individual files

2023-01-13 Thread Michael S. Tsirkin
On Thu, Jan 12, 2023 at 11:22:34PM +0200, Parav Pandit wrote:
> Relatively several of the recent device specifications are maintained
> in their own specification file. Such separate files enables better
> maintenance of the specification overall.
> However, several of the initial virtio device specifications
> are located in single file.
> 
> Hence, split them into their individual files.
> 
> Additionally, each device's driver and device conformance is
> present in one giant conformance file all together.
> 
> As Michael suggest's move this device and driver conformance
> section adjacent to device specification in each device specific
> directory. This further makes device specification self-contained.
> 
> Added patch to fix spelling errors in network device
> specification which was inherited from its previous file
> location.
> 
> Patches do not change any part of the specification outcome
> except fixing the spelling errors.
> It only changes how the specification is maintained.


Don't see any problems here.
Acked-by: Michael S. Tsirkin 

Let's give people a bit of time to review and then start voting.

> patch summary:
> -
> patch 1 to 7 creates new files for moving devices spec out of
> content and conformance files.
> patch 8 to 20 move existing dedicated file spec to new directory
> and creates per device,driver conformance file for each device.
> 
> changelog:
> --
> v3->v4:
> - renamed mem-balloon directory to just balloon
> - renamed network to net, block to blk
> - fixed several hunks placed in wrong patches
> - dropped virtio- prefix from the directories
> v2->v3:
> - file name changed from device.tex to description.tex
> - use input instead of import to insert a file
> v1->v2:
> - removed extra blank lines in network and block device files
> - added missing device conformance link for rpmb, sound, i2c and
>   gpio devices
> v0->v1:
> - move device spec to their own directory
> - added split files for conformance and placed them adjacent to
>   device spec
> - added patch to fix spelling errors in network device
> 
> 
> Parav Pandit (20):
>   virtio-net: Maintain network device spec in separate directory
>   virtio-net: Fix spelling errors
>   virtio-blk: Maintain block device spec in separate directory
>   virtio-console: Maintain console device spec in separate directory
>   virtio-entropy: Maintain entropy device spec in separate directory
>   virtio-mem-balloon: Maintain mem balloon device spec in separate
> directory
>   virtio-scsi: Maintain scsi host device spec in separate directory
>   virtio-gpu: Maintain gpu device spec in separate directory
>   virtio-input: Maintain input device spec in separate directory
>   virtio-crypto: Maintain crypto device spec in separate directory
>   virtio-vsock: Maintain socket device spec in separate directory
>   virtio-fs: Maintain file system device spec in separate directory
>   virtio-rpmb: Maintain rpmb device spec in separate directory
>   virtio-iommu: Maintain iommu device spec in separate directory
>   virtio-sound: Maintain sound device spec in separate directory
>   virtio-mem: Maintain memory device spec in separate directory
>   virtio-i2c: Maintain i2c device spec in separate directory
>   virtio-scmi: Maintain scmi device spec in separate directory
>   virtio-gpio: Maintain gpio device spec in separate directory
>   virtio-pmem: Maintain pmem device spec in separate directory
> 
>  conformance.tex   |  456 +-
>  content.tex   | 4561 +
>  device-types/balloon/description.tex  |  634 +++
>  device-types/balloon/device-conformance.tex   |   12 +
>  device-types/balloon/driver-conformance.tex   |   12 +
>  device-types/blk/description.tex  | 1313 +
>  device-types/blk/device-conformance.tex   |8 +
>  device-types/blk/driver-conformance.tex   |8 +
>  device-types/console/description.tex  |  231 +
>  device-types/console/device-conformance.tex   |8 +
>  device-types/console/driver-conformance.tex   |8 +
>  .../crypto/description.tex|0
>  device-types/crypto/device-conformance.tex|   13 +
>  device-types/crypto/driver-conformance.tex|   14 +
>  device-types/entropy/description.tex  |   42 +
>  device-types/entropy/device-conformance.tex   |7 +
>  device-types/entropy/driver-conformance.tex   |7 +
>  .../fs/description.tex|0
>  device-types/fs/device-conformance.tex|9 +
>  device-types/fs/driver-conformance.tex|   10 +
>  .../gpio/description.tex  |0
>  device-types/gpio/device-conformance.tex  |9 +
>  device-types/gpio/driver-conformance.tex  |9 +
>  .../gpu/description.tex   |0
>  device-types/gpu/device-conformance.tex   |8 +
>  .../i2c/description.tex   |0
>  device-types/i2c/device-conformance

[virtio-dev] Re: [virtio-comment] [PATCH v4 00/20] Split device spec to its individual files

2023-01-13 Thread Michael S. Tsirkin
On Fri, Jan 13, 2023 at 11:19:52AM +0100, Cornelia Huck wrote:
> On Thu, Jan 12 2023, Parav Pandit  wrote:
> 
> > Relatively several of the recent device specifications are maintained
> > in their own specification file. Such separate files enables better
> > maintenance of the specification overall.
> > However, several of the initial virtio device specifications
> > are located in single file.
> >
> > Hence, split them into their individual files.
> >
> > Additionally, each device's driver and device conformance is
> > present in one giant conformance file all together.
> >
> > As Michael suggest's move this device and driver conformance
> > section adjacent to device specification in each device specific
> > directory. This further makes device specification self-contained.
> >
> > Added patch to fix spelling errors in network device
> > specification which was inherited from its previous file
> > location.
> >
> > Patches do not change any part of the specification outcome
> > except fixing the spelling errors.
> > It only changes how the specification is maintained.
> >
> > patch summary:
> > -
> > patch 1 to 7 creates new files for moving devices spec out of
> > content and conformance files.
> > patch 8 to 20 move existing dedicated file spec to new directory
> > and creates per device,driver conformance file for each device.
> 
> This LGTM now.
> 
> Michael: did you check whether redlining works as expected?

I have successfully generated a diff from 1.1 and did some manual
spot checking. Looks ok to me.  I really expect contributors to
do this too :)


-
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org



[virtio-dev] Re: [PATCH v4 06/20] virtio-mem-balloon: Maintain mem balloon device spec in separate directory

2023-01-13 Thread David Hildenbrand

On 12.01.23 22:22, Parav Pandit wrote:

Move virtio memory balloon device specification to its own file
similar to recent virtio devices.
While at it, place device specification, its driver and device
conformance into its own directory to have self contained device
specification.

Fixes: https://github.com/oasis-tcs/virtio-spec/issues/153
Signed-off-by: Parav Pandit 


Nit: Subject s/virtio-mem-balloon/virtio-balloon/

Thanks!

--
Thanks,

David / dhildenb


-
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org



[virtio-dev] Re: [virtio-comment] [PATCH v4 11/20] virtio-vsock: Maintain socket device spec in separate directory

2023-01-13 Thread Stefano Garzarella

On Thu, Jan 12, 2023 at 11:22:45PM +0200, Parav Pandit wrote:

Place device specification, its driver and device
conformance into its own directory to have self contained device
specification.

Fixes: https://github.com/oasis-tcs/virtio-spec/issues/153
Signed-off-by: Parav Pandit 
---
changelog:
v3->v4:
- rename device-types/virtio-vsock to device-types/vsock
v2->v3:
- file name changed from device.tex to description.tex
- use input instead of import to insert a file
v0->v1:
- new patch
---
conformance.tex   | 23 ++-
content.tex   |  2 +-
.../vsock/description.tex |  0
device-types/vsock/device-conformance.tex |  9 
device-types/vsock/driver-conformance.tex | 10 
5 files changed, 22 insertions(+), 22 deletions(-)
rename virtio-vsock.tex => device-types/vsock/description.tex (100%)
create mode 100644 device-types/vsock/device-conformance.tex
create mode 100644 device-types/vsock/driver-conformance.tex


LGTM:

Reviewed-by: Stefano Garzarella 



diff --git a/conformance.tex b/conformance.tex
index 970ef12..527949c 100644
--- a/conformance.tex
+++ b/conformance.tex
@@ -142,17 +142,7 @@ \section{Conformance Targets}\label{sec:Conformance / 
Conformance Targets}
\input{device-types/scsi/driver-conformance.tex}
\input{device-types/input/driver-conformance.tex}
\input{device-types/crypto/driver-conformance.tex}
-
-\conformance{\subsection}{Socket Driver Conformance}\label{sec:Conformance / 
Driver Conformance / Socket Driver Conformance}
-
-A socket driver MUST conform to the following normative statements:
-
-\begin{itemize}
-\item \ref{drivernormative:Device Types / Socket Device / Feature bits}
-\item \ref{drivernormative:Device Types / Socket Device / Device Operation / 
Buffer Space Management}
-\item \ref{drivernormative:Device Types / Socket Device / Device Operation / 
Receive and Transmit}
-\item \ref{drivernormative:Device Types / Socket Device / Device Operation / 
Device Events}
-\end{itemize}
+\input{device-types/vsock/driver-conformance.tex}

\conformance{\subsection}{File System Driver Conformance}\label{sec:Conformance 
/ Driver Conformance / File System Driver Conformance}

@@ -328,16 +318,7 @@ \section{Conformance Targets}\label{sec:Conformance / 
Conformance Targets}
\input{device-types/gpu/device-conformance.tex}
\input{device-types/input/device-conformance.tex}
\input{device-types/crypto/device-conformance.tex}
-
-\conformance{\subsection}{Socket Device Conformance}\label{sec:Conformance / 
Device Conformance / Socket Device Conformance}
-
-A socket device MUST conform to the following normative statements:
-
-\begin{itemize}
-\item \ref{devicenormative:Device Types / Socket Device / Feature bits}
-\item \ref{devicenormative:Device Types / Socket Device / Device Operation / 
Buffer Space Management}
-\item \ref{devicenormative:Device Types / Socket Device / Device Operation / 
Receive and Transmit}
-\end{itemize}
+\input{device-types/vsock/device-conformance.tex}

\conformance{\subsection}{File System Device Conformance}\label{sec:Conformance 
/ Device Conformance / File System Device Conformance}

diff --git a/content.tex b/content.tex
index 2ee50d3..a154822 100644
--- a/content.tex
+++ b/content.tex
@@ -3012,7 +3012,7 @@ \chapter{Device Types}\label{sec:Device Types}
\input{device-types/gpu/description.tex}
\input{device-types/input/description.tex}
\input{device-types/crypto/description.tex}
-\input{virtio-vsock.tex}
+\input{device-types/vsock/description.tex}
\input{virtio-fs.tex}
\input{virtio-rpmb.tex}
\input{virtio-iommu.tex}
diff --git a/virtio-vsock.tex b/device-types/vsock/description.tex
similarity index 100%
rename from virtio-vsock.tex
rename to device-types/vsock/description.tex
diff --git a/device-types/vsock/device-conformance.tex 
b/device-types/vsock/device-conformance.tex
new file mode 100644
index 000..93b0c4d
--- /dev/null
+++ b/device-types/vsock/device-conformance.tex
@@ -0,0 +1,9 @@
+\conformance{\subsection}{Socket Device Conformance}\label{sec:Conformance / 
Device Conformance / Socket Device Conformance}
+
+A socket device MUST conform to the following normative statements:
+
+\begin{itemize}
+\item \ref{devicenormative:Device Types / Socket Device / Feature bits}
+\item \ref{devicenormative:Device Types / Socket Device / Device Operation / 
Buffer Space Management}
+\item \ref{devicenormative:Device Types / Socket Device / Device Operation / 
Receive and Transmit}
+\end{itemize}
diff --git a/device-types/vsock/driver-conformance.tex 
b/device-types/vsock/driver-conformance.tex
new file mode 100644
index 000..988b0c3
--- /dev/null
+++ b/device-types/vsock/driver-conformance.tex
@@ -0,0 +1,10 @@
+\conformance{\subsection}{Socket Driver Conformance}\label{sec:Conformance / 
Driver Conformance / Socket Driver Conformance}
+
+A socket driver MUST conform to the following normative statements:
+
+\begin{itemize}
+\item \ref{drivernormative:Dev

[virtio-dev] Re: [virtio-comment] [PATCH v4 00/20] Split device spec to its individual files

2023-01-13 Thread Cornelia Huck
On Thu, Jan 12 2023, Parav Pandit  wrote:

> Relatively several of the recent device specifications are maintained
> in their own specification file. Such separate files enables better
> maintenance of the specification overall.
> However, several of the initial virtio device specifications
> are located in single file.
>
> Hence, split them into their individual files.
>
> Additionally, each device's driver and device conformance is
> present in one giant conformance file all together.
>
> As Michael suggest's move this device and driver conformance
> section adjacent to device specification in each device specific
> directory. This further makes device specification self-contained.
>
> Added patch to fix spelling errors in network device
> specification which was inherited from its previous file
> location.
>
> Patches do not change any part of the specification outcome
> except fixing the spelling errors.
> It only changes how the specification is maintained.
>
> patch summary:
> -
> patch 1 to 7 creates new files for moving devices spec out of
> content and conformance files.
> patch 8 to 20 move existing dedicated file spec to new directory
> and creates per device,driver conformance file for each device.

This LGTM now.

Michael: did you check whether redlining works as expected?


-
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org