From patchwork Fri Mar 16 15:20:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 147216 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6F967B738F for ; Sat, 17 Mar 2012 02:21:20 +1100 (EST) Received: from localhost ([::1]:33879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8Yxt-0007nV-UY for incoming@patchwork.ozlabs.org; Fri, 16 Mar 2012 11:21:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8YxM-0007bB-H7 for qemu-devel@nongnu.org; Fri, 16 Mar 2012 11:21:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8YxG-0003HG-4M for qemu-devel@nongnu.org; Fri, 16 Mar 2012 11:20:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8YxF-0003H9-SK for qemu-devel@nongnu.org; Fri, 16 Mar 2012 11:20:34 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2GFKUXM017692 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 16 Mar 2012 11:20:30 -0400 Received: from [127.0.1.1] (vpn1-114-39.nay.redhat.com [10.66.114.39]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2GFKRw7016667; Fri, 16 Mar 2012 11:20:28 -0400 To: qemu-devel@nongnu.org, rusty@rustcorp.com.au, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, mst@redhat.com From: Jason Wang Date: Fri, 16 Mar 2012 23:20:26 +0800 Message-ID: <20120316152026.6428.6983.stgit@jason-ThinkPad-T400> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] virtio-spec: split virtio-net device status filed into ro and rw byte X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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