Revision 8172539d hw/s390-virtio-bus.c
b/hw/s390-virtio-bus.c | ||
---|---|---|
101 | 101 |
bus->dev_offs += dev_len; |
102 | 102 |
|
103 | 103 |
virtio_bind_device(vdev, &virtio_s390_bindings, dev); |
104 |
dev->host_features = vdev->get_features(vdev, dev->host_features); |
|
104 | 105 |
s390_virtio_device_sync(dev); |
105 | 106 |
|
106 | 107 |
return 0; |
... | ... | |
222 | 223 |
cur_offs += num_vq * VIRTIO_VQCONFIG_LEN; |
223 | 224 |
|
224 | 225 |
/* Sync feature bitmap */ |
225 |
if (dev->vdev->get_features) { |
|
226 |
stl_phys(cur_offs, dev->vdev->get_features(dev->vdev)); |
|
227 |
} |
|
226 |
stl_phys(cur_offs, dev->host_features); |
|
228 | 227 |
|
229 | 228 |
dev->feat_offs = cur_offs + dev->feat_len; |
230 | 229 |
cur_offs += dev->feat_len * 2; |
... | ... | |
310 | 309 |
kvm_s390_virtio_irq(s390_cpu_addr2state(0), 0, token); |
311 | 310 |
} |
312 | 311 |
|
312 |
static unsigned virtio_s390_get_features(void *opaque) |
|
313 |
{ |
|
314 |
VirtIOS390Device *dev = (VirtIOS390Device*)opaque; |
|
315 |
return dev->host_features; |
|
316 |
} |
|
317 |
|
|
313 | 318 |
/**************** S390 Virtio Bus Device Descriptions *******************/ |
314 | 319 |
|
315 | 320 |
static const VirtIOBindings virtio_s390_bindings = { |
316 | 321 |
.notify = virtio_s390_notify, |
322 |
.get_features = virtio_s390_get_features, |
|
317 | 323 |
}; |
318 | 324 |
|
319 | 325 |
static VirtIOS390DeviceInfo s390_virtio_net = { |
Also available in: Unified diff