aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-02-05 17:47:15 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2013-02-08 07:37:24 -0600
commit1e89ad5b00ba0426d4e949c9e6ce2926c15b81b7 (patch)
tree35f04830c456eca62d99cf1791c9400f48a4cbda /hw
parentb890492110ccdc943554231d40b67d29fef6af82 (diff)
virtio-net: pass host features to virtio_net_init
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/s390x/s390-virtio-bus.c3
-rw-r--r--hw/s390x/virtio-ccw.c3
-rw-r--r--hw/virtio-net.c3
-rw-r--r--hw/virtio-pci.c3
-rw-r--r--hw/virtio.h3
5 files changed, 10 insertions, 5 deletions
diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
index d4677814ca..089ed92006 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 231f81e48c..d92e42735c 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-net.c b/hw/virtio-net.c
index e37358a40c..f1c2884384 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -1279,7 +1279,8 @@ static void virtio_net_guest_notifier_mask(VirtIODevice *vdev, int idx,
}
VirtIODevice *virtio_net_init(DeviceState *dev, NICConf *conf,
- virtio_net_conf *net)
+ virtio_net_conf *net,
+ uint32_t host_features)
{
VirtIONet *n;
int i;
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 9abbcdfc7c..a869f535de 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 a29a54d4f3..1e206b8355 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);