Re: [virtio-dev] Re: [PATCH v8 08/16] packed virtqueues: more efficient virtqueue layout

2018-02-28 Thread Michael S. Tsirkin
On Tue, Feb 27, 2018 at 09:49:28AM +0800, Tiwei Bie wrote: > struct { > __le16 desc_event_off : 15, > desc_event_wrap : 1; > __le16 desc_event_flags : 2; > }; I decided on this format in the end. Thanks for the suggestion! -- MST

[virtio-dev] [PATCH] introduction: document bitfield notation

2018-02-28 Thread Michael S. Tsirkin
Bitfields are a useful and familiar way to specify sub-byte structure layout. The only issue is that bitfield order isn't portable across architectures. Document that we list bitfields from least to most significant one, and warn about portability issues. Signed-off-by: Michael S. Tsirkin

[virtio-dev] Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-28 Thread Michael S. Tsirkin
On Wed, Feb 28, 2018 at 08:25:01PM +0100, Jiri Pirko wrote: > Wed, Feb 28, 2018 at 04:45:39PM CET, m...@redhat.com wrote: > >On Wed, Feb 28, 2018 at 04:11:31PM +0100, Jiri Pirko wrote: > >> Wed, Feb 28, 2018 at 03:32:44PM CET, m...@redhat.com wrote: > >> >On Wed, Feb 28, 2018 at 08:08:39AM +0100,

[virtio-dev] Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-02-28 Thread Alexander Duyck
On Wed, Feb 28, 2018 at 2:59 PM, Alex Williamson wrote: > On Wed, 28 Feb 2018 09:49:21 -0800 > Alexander Duyck wrote: > >> On Tue, Feb 27, 2018 at 2:25 PM, Alexander Duyck >> wrote: >> > On Tue, Feb 27, 2018 at

Re: [virtio-dev] Re: [virtio] Re: [PATCH v8 08/16] packed virtqueues: more efficient virtqueue layout

2018-02-28 Thread Michael S. Tsirkin
On Tue, Feb 27, 2018 at 06:03:01PM +0100, Halil Pasic wrote: > > > On 02/27/2018 03:11 PM, Michael S. Tsirkin wrote: > >> [..] > > + > > +\devicenormative{\subsection}{The Virtqueue Descriptor Table}{Basic > > Facilities of a Virtio Device / Packed Virtqueues / The Virtqueue >

[virtio-dev] Re: [virtio] Re: [virtio-dev] Re: [PATCH v8 08/16] packed virtqueues: more efficient virtqueue layout

2018-02-28 Thread Michael S. Tsirkin
On Wed, Feb 28, 2018 at 02:59:51PM +0100, Halil Pasic wrote: > > > On 02/28/2018 02:42 PM, Jens Freimann wrote: > > On Tue, Feb 27, 2018 at 12:29:11PM +0100, Halil Pasic wrote: > >> > >> > >> On 02/27/2018 11:23 AM, Jens Freimann wrote: > >>> On Mon, Feb 26, 2018 at 11:05:14PM +0200, Michael S.

[virtio-dev] Re: [virtio] Re: [virtio-dev] Re: [PATCH v8 08/16] packed virtqueues: more efficient virtqueue layout

2018-02-28 Thread Michael S. Tsirkin
On Tue, Feb 27, 2018 at 12:29:11PM +0100, Halil Pasic wrote: > > > On 02/27/2018 11:23 AM, Jens Freimann wrote: > > On Mon, Feb 26, 2018 at 11:05:14PM +0200, Michael S. Tsirkin wrote: > >> On Mon, Feb 26, 2018 at 06:19:21PM +0100, Halil Pasic wrote: > >>> > +   

[virtio-dev] [PATCH v9 10/16] packed virtqueues: more efficient virtqueue layout

2018-02-28 Thread Michael S. Tsirkin
Performance analysis of this is in my kvm forum 2016 presentation. The idea is to have a r/w descriptor in a ring structure, replacing the used and available ring, index and descriptor buffer. This is also easier for devices to implement than the 1.0 layout. Several more enhancements will be

[virtio-dev] [PATCH v9 01/16] introduction: document bitfield notation

2018-02-28 Thread Michael S. Tsirkin
Bitfields are a useful and familiar way to specify sub-byte structure layout. The only issue is that bitfield order isn't portable across architectures. Document that we list bitfields from least to most significant one, and warn about portability issues. Signed-off-by: Michael S. Tsirkin

[virtio-dev] [PATCH v9 07/16] content: generalize rest of text

2018-02-28 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- content.tex | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/content.tex b/content.tex index 9fc9673..5634c7d 100644 --- a/content.tex +++ b/content.tex @@

[virtio-dev] [PATCH v9 13/16] split-ring: in order feature

2018-02-28 Thread Michael S. Tsirkin
For a split ring, require that drivers use descriptors in order too. This allows devices to skip reading the available ring. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck Reviewed-by: Stefan Hajnoczi --- split-ring.tex |

[virtio-dev] [PATCH v9 04/16] content: move virtqueue operation description

2018-02-28 Thread Michael S. Tsirkin
virtqueue operation description is specific to the virtqueue format. Move it out to split-ring.tex and update all references. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- conformance.tex | 4 +- content.tex | 171

[virtio-dev] [PATCH v9 00/16] packed ring layout spec

2018-02-28 Thread Michael S. Tsirkin
This addresses comments on v8. Thanks a lot to all reviewers of v8 - I hope we are finally there or almost there. A compiled version can be found under https://github.com/oasis-tcs/virtio-docs.git virtio-v1.1-packed-wd09-diff.pdf virtio-v1.1-packed-wd09.pdf for redline and clean versions,

[virtio-dev] [PATCH v9 02/16] content: move 1.0 queue format out to a separate section

2018-02-28 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- content.tex | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/content.tex b/content.tex index c7ef7fd..4483a4b 100644 --- a/content.tex +++

[virtio-dev] [PATCH v9 05/16] content: len -> used length, used ring -> vq

2018-02-28 Thread Michael S. Tsirkin
Document buffer used len and use that terminology everywhere in the generic section. Further, drop the 'used ring' terminology and just say virtqueue. Reviewed-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin --- content.tex | 39

[virtio-dev] [PATCH v9 14/16] VIRTIO_F_NOTIFICATION_DATA: extra data to devices

2018-02-28 Thread Michael S. Tsirkin
Motivation for the new feature is included in the text. Signed-off-by: Michael S. Tsirkin --- content.tex | 141 --- introduction.tex | 4 +- notifications.c | 3 ++ 3 files changed, 140 insertions(+), 8 deletions(-)

[virtio-dev] [PATCH v9 03/16] content: move ring text out to a separate file

2018-02-28 Thread Michael S. Tsirkin
Will be easier to manage this way. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- content.tex| 499 + split-ring.tex | 498

[virtio-dev] [PATCH v9 06/16] content: generalize transport ring part naming

2018-02-28 Thread Michael S. Tsirkin
Replace descriptor table/available ring/used ring with descriptor area/driver area/device area in all transports. Document what's in which area. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- content.tex| 61

[virtio-dev] [PATCH v9 15/16] makediff: update to show diff from master

2018-02-28 Thread Michael S. Tsirkin
Down the road, when we are close to releasing v1.1 we will want to show diff from cs04. But for now, it's handy to generate the diff from master, this way each new feature is redlined separately. Signed-off-by: Michael S. Tsirkin --- makediff.sh | 3 +-- 1 file changed, 1

[virtio-dev] [PATCH v9 08/16] split-ring: generalize text

2018-02-28 Thread Michael S. Tsirkin
Update generic text to talk about available/used buffers, not rings. Move some split-ring specific text to the correct section. Update conformance section with link to the new conformance clause. Signed-off-by: Michael S. Tsirkin --- conformance.tex | 1 + content.tex |

[virtio-dev] [PATCH v9 12/16] packed-ring: add in order support

2018-02-28 Thread Michael S. Tsirkin
Support in-order requests for packed rings. This allows selective write-out of used descriptors. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck Reviewed-by: Stefan Hajnoczi --- packed-ring.tex | 24

[virtio-dev] [PATCH v9 09/16] split-ring: typo: aligment

2018-02-28 Thread Michael S. Tsirkin
--- split-ring.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/split-ring.tex b/split-ring.tex index a594d41..87ecee2 100644 --- a/split-ring.tex +++ b/split-ring.tex @@ -23,7 +23,7 @@ Each virtqueue consists of three parts: where each part is physically-contiguous in

[virtio-dev] [PATCH v9 11/16] content: in-order buffer use

2018-02-28 Thread Michael S. Tsirkin
Using descriptors in-order is sometimes beneficial. Add an option for that - per-format detail allowing more optimizations will be added by follow-up patches. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck Reviewed-by: Stefan Hajnoczi

[virtio-dev] Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-28 Thread Michael S. Tsirkin
On Wed, Feb 28, 2018 at 08:08:39AM +0100, Jiri Pirko wrote: > Tue, Feb 27, 2018 at 10:41:49PM CET, kubak...@wp.pl wrote: > >On Tue, 27 Feb 2018 13:16:21 -0800, Alexander Duyck wrote: > >> Basically we need some sort of PCI or PCIe topology mapping for the > >> devices that can be translated into

Re: [virtio-dev] Re: [PATCH v8 08/16] packed virtqueues: more efficient virtqueue layout

2018-02-28 Thread Jens Freimann
On Tue, Feb 27, 2018 at 12:29:11PM +0100, Halil Pasic wrote: On 02/27/2018 11:23 AM, Jens Freimann wrote: On Mon, Feb 26, 2018 at 11:05:14PM +0200, Michael S. Tsirkin wrote: On Mon, Feb 26, 2018 at 06:19:21PM +0100, Halil Pasic wrote: > +?? vq->driver_event.flags

Re: [virtio-dev] Re: [virtio] Re: [PATCH v8 08/16] packed virtqueues: more efficient virtqueue layout

2018-02-28 Thread Jens Freimann
On Tue, Feb 27, 2018 at 06:03:01PM +0100, Halil Pasic wrote: On 02/27/2018 03:11 PM, Michael S. Tsirkin wrote: [..] + +\devicenormative{\subsection}{The Virtqueue Descriptor Table}{Basic Facilities of a Virtio Device / Packed Virtqueues / The Virtqueue Descriptor Table} +A device MUST NOT

Re: [virtio-dev] Re: [PATCH v8 08/16] packed virtqueues: more efficient virtqueue layout

2018-02-28 Thread Halil Pasic
On 02/28/2018 02:42 PM, Jens Freimann wrote: > On Tue, Feb 27, 2018 at 12:29:11PM +0100, Halil Pasic wrote: >> >> >> On 02/27/2018 11:23 AM, Jens Freimann wrote: >>> On Mon, Feb 26, 2018 at 11:05:14PM +0200, Michael S. Tsirkin wrote: On Mon, Feb 26, 2018 at 06:19:21PM +0100, Halil Pasic

[virtio-dev] Re: [PATCH v2 0/2] two versioning related changes

2018-02-28 Thread Cornelia Huck
On Tue, 13 Feb 2018 17:27:39 +0100 Cornelia Huck wrote: > On Tue, 13 Feb 2018 13:44:06 +0100 > Halil Pasic wrote: > > > v1->v2: > > * fixed ungrammatical commit title for #1 > > * added r-b's > > * added bug tracker references > > > > Halil Pasic

Re: [virtio-dev] Re: [PATCH v8 08/16] packed virtqueues: more efficient virtqueue layout

2018-02-28 Thread Michael S. Tsirkin
On Wed, Feb 28, 2018 at 02:59:51PM +0100, Halil Pasic wrote: > > > On 02/28/2018 02:42 PM, Jens Freimann wrote: > > On Tue, Feb 27, 2018 at 12:29:11PM +0100, Halil Pasic wrote: > >> > >> > >> On 02/27/2018 11:23 AM, Jens Freimann wrote: > >>> On Mon, Feb 26, 2018 at 11:05:14PM +0200, Michael S.

Re: [virtio-dev] [PATCH] content: document balloon memory statistics

2018-02-28 Thread Tomáš Golembiovský
On Tue, 27 Feb 2018 21:56:04 +0200 "Michael S. Tsirkin" wrote: > On Wed, Feb 21, 2018 at 06:44:17PM +0100, Tomáš Golembiovský wrote: > > On Wed, 21 Feb 2018 11:33:28 + > > Stefan Hajnoczi wrote: > > > > > On Wed, Feb 21, 2018 at 12:11:35AM +0100,

Re: [virtio-dev] Re: [PATCH v8 08/16] packed virtqueues: more efficient virtqueue layout

2018-02-28 Thread Tiwei Bie
On Tue, Feb 27, 2018 at 10:17:17PM +0200, Michael S. Tsirkin wrote: > On Tue, Feb 27, 2018 at 09:49:28AM +0800, Tiwei Bie wrote: > > On Mon, Feb 26, 2018 at 10:38:13PM +0200, Michael S. Tsirkin wrote: > > > On Mon, Feb 26, 2018 at 06:51:11PM +0800, Tiwei Bie wrote: > > > > On Sun, Feb 25, 2018 at

[virtio-dev] Re: [PATCH v2 0/2] two versioning related changes

2018-02-28 Thread Halil Pasic
On 02/28/2018 04:56 PM, Cornelia Huck wrote: > On Tue, 13 Feb 2018 17:27:39 +0100 > Cornelia Huck wrote: > >> On Tue, 13 Feb 2018 13:44:06 +0100 >> Halil Pasic wrote: >> >>> v1->v2: >>> * fixed ungrammatical commit title for #1 >>> * added r-b's

Re: [virtio-dev] Re: [PATCH v8 08/16] packed virtqueues: more efficient virtqueue layout

2018-02-28 Thread Halil Pasic
On 02/28/2018 04:40 PM, Michael S. Tsirkin wrote: > On Wed, Feb 28, 2018 at 02:59:51PM +0100, Halil Pasic wrote: >> >> >> On 02/28/2018 02:42 PM, Jens Freimann wrote: >>> On Tue, Feb 27, 2018 at 12:29:11PM +0100, Halil Pasic wrote: On 02/27/2018 11:23 AM, Jens Freimann wrote:

Re: [virtio-dev] Re: [PATCH v8 08/16] packed virtqueues: more efficient virtqueue layout

2018-02-28 Thread Cornelia Huck
On Wed, 28 Feb 2018 17:20:29 +0200 "Michael S. Tsirkin" wrote: > I agree. I think I will stop using the bitfields - they seem to > cause too much confusion. Just > > struct event { > __le16 event_desc; /* bits 0-14: desc_off. 15 - desc_wrap. */ > __le16

[virtio-dev] Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-02-28 Thread Alexander Duyck
On Tue, Feb 27, 2018 at 2:25 PM, Alexander Duyck wrote: > On Tue, Feb 27, 2018 at 1:40 PM, Alex Williamson > wrote: >> On Tue, 27 Feb 2018 11:06:54 -0800 >> Alexander Duyck wrote: >> >>> From: Alexander Duyck