From patchwork Tue Mar 20 06:20:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 147746 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 1983FB6EF3 for ; Tue, 20 Mar 2012 17:20:50 +1100 (EST) Received: from localhost ([::1]:34780 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9sR5-0007oO-2E for incoming@patchwork.ozlabs.org; Tue, 20 Mar 2012 02:20:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9sQp-0007oF-TF for qemu-devel@nongnu.org; Tue, 20 Mar 2012 02:20:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9sQn-0004S6-1r for qemu-devel@nongnu.org; Tue, 20 Mar 2012 02:20:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9sQm-0004Rf-Q8 for qemu-devel@nongnu.org; Tue, 20 Mar 2012 02:20:28 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2K6KOXA004015 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 20 Mar 2012 02:20:24 -0400 Received: from [127.0.1.1] (dhcp-65-172.nay.redhat.com [10.66.65.172]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q2K6KLhc008177; Tue, 20 Mar 2012 02:20:22 -0400 To: linux-kernel@vger.kernel.org, rusty@rustcorp.com.au, virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org, mst@redhat.com From: Jason Wang Date: Tue, 20 Mar 2012 14:20:21 +0800 Message-ID: <20120320062020.12815.61342.stgit@jason-ThinkPad-T400> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 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: clarify ro/rw bits and updating rule of virtio-net status field 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 clarifies VIRTIO_NET_S_LINK_UP as a read-only bit and VIRTIO_NET_S_ANNOUNCE as a read-writable bit. Also introduce the write 1 to clear semantics for all read-writable bits of config status field. This could help to reduce the config status field updating race between host and guest and also simplify the implementation. Signed-off-by: Jason Wang --- virtio-0.9.4.lyx | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/virtio-0.9.4.lyx b/virtio-0.9.4.lyx index 6c7bab1..614ab55 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 @@ -4013,7 +4014,21 @@ 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. Two bits are currently defined for the status field: VIRTIO_NET_S_LINK_UP - and VIRTIO_NET_S_ANNOUNCE. + +\change_inserted 2090695081 1332220873 +(read-only) +\change_unchanged +and VIRTIO_NET_S_ANNOUNCE +\change_inserted 2090695081 1332220883 + (read-writable) +\change_unchanged +. + +\change_inserted 2090695081 1332220901 + Writing 1 to any read-writable bit of status filed would cause the bit + to be cleared. + +\change_unchanged \begin_inset listings inline false @@ -4915,7 +4930,11 @@ Processing this notification involves: \end_layout \begin_layout Enumerate -Clearing VIRTIO_NET_S_ANNOUNCE bit in the status field. +Clearing VIRTIO_NET_S_ANNOUNCE bit in the status field +\change_inserted 2090695081 1332220849 + (by writing 1 to VIRTIO_NET_S_ANNOUNCE bit) +\change_unchanged +. \end_layout \begin_layout Enumerate