aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/s390-virtio-bus.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2014-07-01 00:01:58 +0800
committerMichael S. Tsirkin <mst@redhat.com>2014-07-06 09:13:54 +0300
commit85d1277e668106294d134a101729c6f36289da1a (patch)
treeeae8b24bffd12744c2487de19bea87a976b5745b /hw/s390x/s390-virtio-bus.c
parent9b79a76cdbb43b0b00aaf6e9421298842fc68841 (diff)
virtio: move common virtio properties to bus class device
The two common virtio features can be defined per bus, so move all into bus class device to make code more clean. As discussed with cornelia, s390-virtio-blk doesn't support the two features at all, so keep s390-virtio as it. Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> #for s390 ccw Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Ming Lei <ming.lei@canonical.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> MST: rebase and resolve conflicts
Diffstat (limited to 'hw/s390x/s390-virtio-bus.c')
-rw-r--r--hw/s390x/s390-virtio-bus.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
index c0dc3658c7..6b6fb61c47 100644
--- a/hw/s390x/s390-virtio-bus.c
+++ b/hw/s390x/s390-virtio-bus.c
@@ -494,6 +494,7 @@ static unsigned virtio_s390_get_features(DeviceState *d)
static Property s390_virtio_net_properties[] = {
DEFINE_NIC_PROPERTIES(VirtIONetS390, vdev.nic_conf),
+ DEFINE_VIRTIO_COMMON_FEATURES(VirtIOS390Device, host_features),
DEFINE_VIRTIO_NET_FEATURES(VirtIOS390Device, host_features),
DEFINE_VIRTIO_NET_PROPERTIES(VirtIONetS390, vdev.net_conf),
DEFINE_PROP_END_OF_LIST(),
@@ -614,6 +615,7 @@ static const TypeInfo virtio_s390_device_info = {
static Property s390_virtio_scsi_properties[] = {
DEFINE_VIRTIO_SCSI_PROPERTIES(VirtIOSCSIS390, vdev.parent_obj.conf),
+ DEFINE_VIRTIO_COMMON_FEATURES(VirtIOS390Device, host_features),
DEFINE_VIRTIO_SCSI_FEATURES(VirtIOS390Device, host_features),
DEFINE_PROP_END_OF_LIST(),
};