On 06/02/2013 00:47, Jesse Larrew wrote:
From: Anthony Liguori <aligu...@us.ibm.com>

Signed-off-by: Anthony Liguori <aligu...@us.ibm.com>
---
  hw/s390x/s390-virtio-bus.c | 3 ++-
  hw/s390x/virtio-ccw.c      | 3 ++-
  hw/virtio-net.c            | 3 ++-
  hw/virtio-pci.c            | 3 ++-
  hw/virtio.h                | 3 ++-
  5 files changed, 10 insertions(+), 5 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);
Is it possible to do that without passing host_features to the init?

Virtio refactoring try to remove this virtio_x_init by creating virtio_net device.

Then the virtio_net_pci device create a virtio_net and pass the configuration to it.

How is it possible to make that compatible with the refactoring?
      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-net.c b/hw/virtio-net.c
index e37358a..f1c2884 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 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)



Reply via email to