virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [virtio-spec PATCH 0/5] Receiving Used Buffers example code: cleanups and an extra mb()
@ 2013-06-08 17:39 Laszlo Ersek
  2013-06-08 17:39 ` [virtio-spec PATCH 1/5] Receiving Used Buffers: fix typo in "ring empty" condition in example code Laszlo Ersek
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Laszlo Ersek @ 2013-06-08 17:39 UTC (permalink / raw)
  To: Rusty Russell, Stefan Hajnoczi, virtualization, Jordan Justen,
	Laszlo Ersek

Patches before the last are small cleanups.

In the last patch I'm trying to extract / generalize an idea from Stefan
Hajnoczi's review of my virtio-net driver for OVMF.

Unfortunately I can't find Stefan's email on any mailing list archive
(sourceforge, gmane, mail-archive etc. all have only my response), so
I'll quote it here.

The patch Stefan was reviewing is
<http://thread.gmane.org/gmane.comp.bios.tianocore.devel/2804/focus=2819>:

  [PATCH v3 10/15]
  OvmfPkg: VirtioNetDxe: implement Tx: SNP.Transmit and SNP.GetStatus

On 06/07/13 16:17, Stefan Hajnoczi wrote:

> There is no read memory barrier between fetching TxCurUsed and
> fetching UsedElem[].Id.  In theory I think there is no guarantee that
> Dev->TxRing.Used.UsedElem[UsedElemIdx].Id is fetched *after*
> Dev->TxRing.Used.Idx.  On x86 it shouldn't be a problem but I expected
> a read memory barrier after comparing fetching Dev->TxRing.Used.Idx.

(Solely for the record, my response is at
<http://thread.gmane.org/gmane.comp.bios.tianocore.devel/3052>.)

In the last patch I'm trying to apply this remark to the virtio spec.
Hopefully I'm not misrepresenting the idea, nor glossing over any
important differences between the VirtioNetDxe code Stefan was actually
reviewing and the example code in the virtio spec.

I didn't add

  Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>

to the last patch, because my translation may easily have corrupted his
idea, but if the patch is deemed worthwhile, please do add his
Suggested-by.


I'm not subscribed to the virtualization list, please keep me CC'd.

Thanks!

Laszlo Ersek (5):
  Receiving Used Buffers: fix typo in "ring empty" condition in example
    code
  Receiving Used Buffers: re-disable interrupts when staying in the
    loop
  Receiving Used Buffers: variable for Queue Size is called "qsz"
    elsewhere
  Receiving Used Buffers: switch . and -> operators, add missing &
  Receiving Used Buffers: prevent speculative load when not
    sequentially consistent

 virtio-spec.lyx |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-06-17  7:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-08 17:39 [virtio-spec PATCH 0/5] Receiving Used Buffers example code: cleanups and an extra mb() Laszlo Ersek
2013-06-08 17:39 ` [virtio-spec PATCH 1/5] Receiving Used Buffers: fix typo in "ring empty" condition in example code Laszlo Ersek
2013-06-08 17:39 ` [virtio-spec PATCH 2/5] Receiving Used Buffers: re-disable interrupts when staying in the loop Laszlo Ersek
2013-06-08 17:39 ` [virtio-spec PATCH 3/5] Receiving Used Buffers: variable for Queue Size is called "qsz" elsewhere Laszlo Ersek
2013-06-08 17:39 ` [virtio-spec PATCH 4/5] Receiving Used Buffers: switch . and -> operators, add missing & Laszlo Ersek
2013-06-08 17:39 ` [virtio-spec PATCH 5/5] Receiving Used Buffers: prevent speculative load when not sequentially consistent Laszlo Ersek
2013-06-10  8:15 ` [virtio-spec PATCH 0/5] Receiving Used Buffers example code: cleanups and an extra mb() Stefan Hajnoczi
2013-06-17  2:17   ` Rusty Russell
2013-06-17  7:29     ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).