From: Victor Kaplansky <victork@redhat.com>
To: qemu-devel@nongnu.org
Cc: changchun.ouyang@intel.com, thibaut.collet@6wind.com,
"Michael S. Tsirkin" <mst@redhat.com>,
Victor Kaplansky <victork@redhat.com>,
marcandre.lureau@redhat.com
Subject: [Qemu-devel] [PATCH] vhost user: fix documentation of log atomic elements
Date: Thu, 29 Oct 2015 12:20:31 +0200 [thread overview]
Message-ID: <1446113893-31921-1-git-send-email-victork@redhat.com> (raw)
Current implementation in hw/virtio/vhost.c accesses the log by
32-bit wide chunks in host native bit and byte endianness.
Accessing the log by 8-bit wide chunks, as the spec suggests,
will be broken on big-endian hosts.
This commit changes the spec to match the implementation.
Signed-off-by: Victor Kaplansky <victork@redhat.com>
---
docs/specs/vhost-user.txt | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt
index e0d71e2..3d18771 100644
--- a/docs/specs/vhost-user.txt
+++ b/docs/specs/vhost-user.txt
@@ -177,9 +177,11 @@ addresses. The log covers from address 0 to the maximum of guest
regions. In pseudo-code, to mark page at "addr" as dirty:
page = addr / VHOST_LOG_PAGE
-log[page / 8] |= 1 << page % 8
+log[page / 32] |= 1 << page % 32
-Use atomic operations, as the log may be concurrently manipulated.
+Use atomic operations, as the log may be concurrently
+manipulated, and access the log by atomic 32-bit wide elements in
+host native bit-level endianness.
VHOST_USER_SET_LOG_FD is an optional message with an eventfd in
ancillary data, it may be used to inform the master that the log has
--
--Victor
next reply other threads:[~2015-10-29 10:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 10:20 Victor Kaplansky [this message]
2015-10-29 12:24 ` [Qemu-devel] [PATCH] vhost user: fix documentation of log atomic elements Victor Kaplansky
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=1446113893-31921-1-git-send-email-victork@redhat.com \
--to=victork@redhat.com \
--cc=changchun.ouyang@intel.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thibaut.collet@6wind.com \
/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 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).