From patchwork Sat Feb 2 23:06:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Liguori X-Patchwork-Id: 217710 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 596D42C0091 for ; Sun, 3 Feb 2013 10:07:14 +1100 (EST) Received: from localhost ([::1]:34992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1mAy-0001uI-FZ for incoming@patchwork.ozlabs.org; Sat, 02 Feb 2013 18:07:12 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1mAi-0001NF-7p for qemu-devel@nongnu.org; Sat, 02 Feb 2013 18:06:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1mAg-0000mU-6v for qemu-devel@nongnu.org; Sat, 02 Feb 2013 18:06:55 -0500 Received: from e7.ny.us.ibm.com ([32.97.182.137]:38866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1mAg-0000jM-3b for qemu-devel@nongnu.org; Sat, 02 Feb 2013 18:06:54 -0500 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 2 Feb 2013 18:06:32 -0500 Received: from d01dlp02.pok.ibm.com (9.56.250.167) by e7.ny.us.ibm.com (192.168.1.107) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sat, 2 Feb 2013 18:06:30 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 0F82C6E803F for ; Sat, 2 Feb 2013 18:06:28 -0500 (EST) Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r12N6TSA304584 for ; Sat, 2 Feb 2013 18:06:29 -0500 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r12N8o4m007905 for ; Sat, 2 Feb 2013 16:08:50 -0700 Received: from titi.austin.rr.com (sig-9-48-86-56.mts.ibm.com [9.48.86.56]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r12N8nUL007885; Sat, 2 Feb 2013 16:08:49 -0700 From: Anthony Liguori To: qemu-devel@nongnu.org Date: Sat, 2 Feb 2013 17:06:22 -0600 Message-Id: <1359846384-3771-2-git-send-email-aliguori@us.ibm.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1359846384-3771-1-git-send-email-aliguori@us.ibm.com> References: <1359846384-3771-1-git-send-email-aliguori@us.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13020223-5806-0000-0000-00001F14D05D X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 32.97.182.137 Cc: Anthony Liguori , Michael Tokarev Subject: [Qemu-devel] [PATCH 1/2] virtio-net: pass host features to virtio_net_init 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 Signed-off-by: Anthony Liguori --- hw/s390x/s390-virtio-bus.c | 3 ++- hw/s390x/virtio-ccw.c | 3 ++- hw/virtio-pci.c | 3 ++- hw/virtio.h | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c index d467781..089ed92 100644 --- a/hw/s390x/s390-virtio-bus.c +++ b/hw/s390x/s390-virtio-bus.c @@ -153,7 +153,8 @@ static int s390_virtio_net_init(VirtIOS390Device *dev) { VirtIODevice *vdev; - vdev = virtio_net_init((DeviceState *)dev, &dev->nic, &dev->net); + vdev = virtio_net_init((DeviceState *)dev, &dev->nic, &dev->net, + dev->host_features); if (!vdev) { return -1; } diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 231f81e..d92e427 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -555,7 +555,8 @@ static int virtio_ccw_net_init(VirtioCcwDevice *dev) { VirtIODevice *vdev; - vdev = virtio_net_init((DeviceState *)dev, &dev->nic, &dev->net); + vdev = virtio_net_init((DeviceState *)dev, &dev->nic, &dev->net, + dev->host_features[0]); if (!vdev) { return -1; } diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 9abbcdf..a869f53 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -997,7 +997,8 @@ static int virtio_net_init_pci(PCIDevice *pci_dev) VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev); VirtIODevice *vdev; - vdev = virtio_net_init(&pci_dev->qdev, &proxy->nic, &proxy->net); + vdev = virtio_net_init(&pci_dev->qdev, &proxy->nic, &proxy->net, + proxy->host_features); vdev->nvectors = proxy->nvectors; virtio_init_pci(proxy, vdev); diff --git a/hw/virtio.h b/hw/virtio.h index a29a54d..1e206b8 100644 --- a/hw/virtio.h +++ b/hw/virtio.h @@ -243,7 +243,8 @@ typedef struct VirtIOBlkConf VirtIOBlkConf; VirtIODevice *virtio_blk_init(DeviceState *dev, VirtIOBlkConf *blk); struct virtio_net_conf; VirtIODevice *virtio_net_init(DeviceState *dev, NICConf *conf, - struct virtio_net_conf *net); + struct virtio_net_conf *net, + uint32_t host_features); typedef struct virtio_serial_conf virtio_serial_conf; VirtIODevice *virtio_serial_init(DeviceState *dev, virtio_serial_conf *serial); VirtIODevice *virtio_balloon_init(DeviceState *dev);