From: Laszlo Ersek <lersek@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jordan Justen <jordan.l.justen@intel.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Linux Virtualization <virtualization@lists.linux-foundation.org>
Subject: Re: [virtio-spec PATCH 0/5] Receiving Used Buffers example code: cleanups and an extra mb()
Date: Mon, 17 Jun 2013 09:29:23 +0200 [thread overview]
Message-ID: <51BEBAD3.4070403@redhat.com> (raw)
In-Reply-To: <87txkxpjkm.fsf@rustcorp.com.au>
On 06/17/13 04:17, Rusty Russell wrote:
> Stefan Hajnoczi <stefanha@gmail.com> writes:
>> On Sat, Jun 8, 2013 at 7:39 PM, Laszlo Ersek <lersek@redhat.com> wrote:
>>> 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.
>
> How about a single patch which just replaces the completely broken
> example? :)
Do you want me to squash the series into one patch and repost?
>>> Receiving Used Buffers: prevent speculative load when not
>>> sequentially consistent
>
> Yes, though this only needs to be a rmb().
Probably, but the spec never qualifies the memory barriers it
recommends. (Maybe their read/write types should be obvious to the
reader. I didn't give their types much thought because in edk2/OVMF
there's only MemoryFence().)
In any case I'll take this as your approval of the 5/5 patch. Thanks!
> In the OASIS 1.0 spec, I'd like an appendix with tested code for doing
> these operations (probably based on a simplifeid version of vringh.c).
(
I assume the tested code should come from one of the more sophisticated
drivers (that also have a unix-y coding style). Also, I've been actively
avoiding reading other virtio code (qemu, kernel, SeaBIOS, iPXE etc)
except when I was stuck with an OVMF driver and (a) it looked like there
was some silent requirement/assumption in qemu that had not been spelled
out in the spec, (b) I was being dyslexic.
Thus I can't really suggest code for the appendix (although the OVMF
drivers do work).
)
Thanks,
Laszlo
prev parent reply other threads:[~2013-06-17 7:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51BEBAD3.4070403@redhat.com \
--to=lersek@redhat.com \
--cc=jordan.l.justen@intel.com \
--cc=rusty@rustcorp.com.au \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.