From: Jason Wang <jasowang@redhat.com>
To: qemu-devel@nongnu.org, rusty@rustcorp.com.au,
virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, mst@redhat.com
Subject: [PATCH] virtio-spec: split virtio-net device status filed into ro and rw byte
Date: Fri, 16 Mar 2012 23:20:26 +0800 [thread overview]
Message-ID: <20120316152026.6428.6983.stgit@jason-ThinkPad-T400> (raw)
This patch splits the device status field of virtio-net into ro and rw
byte. This would simplify the implementation of both host and guest
and make the layout more clean. As VIRTIO_NET_S_ANNOUNCE is a rw bit,
it was moved to bit 8 (0x100).
btw. looks like there's no implementation that depends on
VIRTIO_NET_S_ANNOUNCE, so the move is safe.
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
virtio-0.9.4.lyx | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/virtio-0.9.4.lyx b/virtio-0.9.4.lyx
index 6c7bab1..ef3951c 100644
--- a/virtio-0.9.4.lyx
+++ b/virtio-0.9.4.lyx
@@ -58,6 +58,7 @@
\html_be_strict false
\author -608949062 "Rusty Russell,,,"
\author 1531152142 "pbonzini"
+\author 2090695081 "Jason"
\end_header
\begin_body
@@ -4012,8 +4013,19 @@ configuration
layout Two configuration fields are currently defined.
The mac address field always exists (though is only valid if VIRTIO_NET_F_MAC
is set), and the status field only exists if VIRTIO_NET_F_STATUS is set.
+
+\change_inserted 2090695081 1331907586
+ The low byte of status field is read-only, guest write to this byte would
+ be ignored.
+ Currently only one bit is defined for this byte: VIRTIO_NET_S_LINK_UP.
+ The high byte of status field is read-writable.
+ Currently only one bit is defined for this byte: VIRTIO_NET_S_ANNOUNCE.
+
+\change_deleted 2090695081 1331907489
Two bits are currently defined for the status field: VIRTIO_NET_S_LINK_UP
and VIRTIO_NET_S_ANNOUNCE.
+
+\change_unchanged
\begin_inset listings
inline false
@@ -4026,7 +4038,13 @@ status open
\begin_layout Plain Layout
-#define VIRTIO_NET_S_ANNOUNCE 2
+#define VIRTIO_NET_S_ANNOUNCE
+\change_inserted 2090695081 1331907493
+0x100
+\change_deleted 2090695081 1331907491
+2
+\change_unchanged
+
\end_layout
\begin_layout Plain Layout
next reply other threads:[~2012-03-16 15:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 15:20 Jason Wang [this message]
2012-03-18 12:22 ` [PATCH] virtio-spec: split virtio-net device status filed into ro and rw byte Michael S. Tsirkin
2012-03-19 3:09 ` Jason Wang
2012-03-19 8:23 ` Michael S. Tsirkin
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=20120316152026.6428.6983.stgit@jason-ThinkPad-T400 \
--to=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rusty@rustcorp.com.au \
--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 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).