virtio-net: pass host features to virtio_net_init

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Anthony Liguori 2013-02-05 17:47:15 -06:00
parent b890492110
commit 1e89ad5b00
5 changed files with 10 additions and 5 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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);

View File

@ -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);