@@ -504,6 +504,15 @@ static unsigned virtio_s390_get_features(DeviceState *d)
return dev->host_features;
}
+/* This is called by virtio-bus just after the device is plugged. */
+static void virtio_s390_device_plugged(DeviceState *d)
+{
+ VirtIOS390Device *dev = to_virtio_s390_device(d);
+
+ dev->host_features = virtio_bus_get_vdev_features(&dev->bus,
+ dev->host_features);
+}
+
/**************** S390 Virtio Bus Device Descriptions *******************/
static Property s390_virtio_net_properties[] = {
@@ -715,6 +724,7 @@ static void virtio_s390_bus_class_init(ObjectClass *klass, void *data)
bus_class->max_dev = 1;
k->notify = virtio_s390_notify;
k->get_features = virtio_s390_get_features;
+ k->device_plugged = virtio_s390_device_plugged;
}
static const TypeInfo virtio_s390_bus_info = {