From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz3kc-0006we-7L for qemu-devel@nongnu.org; Thu, 11 Dec 2014 08:25:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xz3kS-00085N-IL for qemu-devel@nongnu.org; Thu, 11 Dec 2014 08:25:49 -0500 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:46239) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz3kS-000852-0r for qemu-devel@nongnu.org; Thu, 11 Dec 2014 08:25:40 -0500 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 11 Dec 2014 13:25:39 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id D47CA17D8047 for ; Thu, 11 Dec 2014 13:25:59 +0000 (GMT) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sBBDPb6I47317176 for ; Thu, 11 Dec 2014 13:25:37 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sBBDPahM006948 for ; Thu, 11 Dec 2014 06:25:37 -0700 From: Cornelia Huck Date: Thu, 11 Dec 2014 14:25:17 +0100 Message-Id: <1418304322-7546-16-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1418304322-7546-1-git-send-email-cornelia.huck@de.ibm.com> References: <1418304322-7546-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PATCH RFC v6 15/20] virtio-net: no writeable mac for virtio-1 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org Cc: Cornelia Huck , rusty@rustcorp.com.au, thuth@linux.vnet.ibm.com, mst@redhat.com Devices operating as virtio 1.0 may not allow writes to the mac address in config space. Signed-off-by: Cornelia Huck --- hw/net/virtio-net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index d6d1b98..ebbea60 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -87,6 +87,7 @@ static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config) memcpy(&netcfg, config, n->config_size); if (!virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR) && + !virtio_has_feature(vdev, VIRTIO_F_VERSION_1) && memcmp(netcfg.mac, n->mac, ETH_ALEN)) { memcpy(n->mac, netcfg.mac, ETH_ALEN); qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); -- 1.7.9.5