From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvomO-00006O-TR for qemu-devel@nongnu.org; Thu, 17 Jan 2013 07:41:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvomM-0005gq-KI for qemu-devel@nongnu.org; Thu, 17 Jan 2013 07:41:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvomM-0005gk-CZ for qemu-devel@nongnu.org; Thu, 17 Jan 2013 07:41:10 -0500 Date: Thu, 17 Jan 2013 13:40:18 +0100 From: Stefan Hajnoczi Message-ID: <20130117124018.GA6830@stefanha-thinkpad.redhat.com> References: <1358418646-29626-1-git-send-email-akong@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1358418646-29626-1-git-send-email-akong@redhat.com> Subject: Re: [Qemu-devel] [QEMU PATCH v3] virtio-net: introduce a new macaddr control List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: akong@redhat.com Cc: rusty@rustcorp.com.au, virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org, kvm@vger.kernel.org, mst@redhat.com On Thu, Jan 17, 2013 at 06:30:46PM +0800, akong@redhat.com wrote: > From: Amos Kong > > In virtio-net guest driver, currently we write MAC address to > pci config space byte by byte, this means that we have an > intermediate step where mac is wrong. This patch introduced > a new control command to set MAC address, it's atomic. > > VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for compatibility. > > "mac" field will be set to read-only when VIRTIO_NET_F_CTRL_MAC_ADDR > is acked. > > Signed-off-by: Amos Kong > --- > V2: check guest's iov_len > V3: fix of migration compatibility > make mac field in config space read-only when new feature is acked > --- > hw/pc_piix.c | 4 ++++ > hw/virtio-net.c | 10 +++++++++- > hw/virtio-net.h | 12 ++++++++++-- > 3 files changed, 23 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi