Revision 181103cd hw/s390x/virtio-ccw.c

b/hw/s390x/virtio-ccw.c
235 235
            features.index = ldub_phys(ccw.cda + sizeof(features.features));
236 236
            features.features = ldl_le_phys(ccw.cda);
237 237
            if (features.index < ARRAY_SIZE(dev->host_features)) {
238
                if (dev->vdev->set_features) {
239
                    dev->vdev->set_features(dev->vdev, features.features);
240
                }
238
                virtio_bus_set_vdev_features(&dev->bus, features.features);
241 239
                dev->vdev->guest_features = features.features;
242 240
            } else {
243 241
                /*
......
265 263
        if (!ccw.cda) {
266 264
            ret = -EFAULT;
267 265
        } else {
268
            dev->vdev->get_config(dev->vdev, dev->vdev->config);
266
            virtio_bus_get_vdev_config(&dev->bus, dev->vdev->config);
269 267
            /* XXX config space endianness */
270 268
            cpu_physical_memory_write(ccw.cda, dev->vdev->config, len);
271 269
            sch->curr_status.scsw.count = ccw.count - len;
......
292 290
                /* XXX config space endianness */
293 291
                memcpy(dev->vdev->config, config, len);
294 292
                cpu_physical_memory_unmap(config, hw_len, 0, hw_len);
295
                if (dev->vdev->set_config) {
296
                    dev->vdev->set_config(dev->vdev, dev->vdev->config);
297
                }
293
                virtio_bus_set_vdev_config(&dev->bus, dev->vdev->config);
298 294
                sch->curr_status.scsw.count = ccw.count - len;
299 295
                ret = 0;
300 296
            }
......
527 523

  
528 524
    virtio_bind_device(vdev, &virtio_ccw_bindings, DEVICE(dev));
529 525
    /* Only the first 32 feature bits are used. */
530
    dev->host_features[0] = vdev->get_features(vdev, dev->host_features[0]);
526
    dev->host_features[0] = virtio_bus_get_vdev_features(&dev->bus,
527
                                                         dev->host_features[0]);
528

  
531 529
    dev->host_features[0] |= 0x1 << VIRTIO_F_NOTIFY_ON_EMPTY;
532 530
    dev->host_features[0] |= 0x1 << VIRTIO_F_BAD_FEATURE;
533 531

  

Also available in: Unified diff