From 131cd73705bc5551ae4b64476399d440e8ac55a7 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Wed, 13 Mar 2013 14:43:22 +0100 Subject: virtio-ccw: Add missing blk chs properties. Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 9688835294..fc95116d48 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -757,6 +757,7 @@ static const TypeInfo virtio_ccw_net = { static Property virtio_ccw_blk_properties[] = { DEFINE_PROP_STRING("devno", VirtioCcwDevice, bus_id), DEFINE_BLOCK_PROPERTIES(VirtIOBlkCcw, blk.conf), + DEFINE_BLOCK_CHS_PROPERTIES(VirtIOBlkCcw, blk.conf), DEFINE_PROP_STRING("serial", VirtIOBlkCcw, blk.serial), #ifdef __linux__ DEFINE_PROP_BIT("scsi", VirtIOBlkCcw, blk.scsi, 0, true), -- cgit v1.2.3 From da0a58b93c88d874233902f459e01300a78e5f9d Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Wed, 13 Mar 2013 15:20:07 +0100 Subject: s390-virtio, virtio-ccw: Add config_wce for virtio-blk. There's no reason why we wouldn't want to make the cache mode configurable. Acked-by: Alexander Graf Signed-off-by: Cornelia Huck --- hw/s390x/s390-virtio-bus.c | 1 + hw/s390x/virtio-ccw.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c index 76bc99a45a..5d55a9d7c3 100644 --- a/hw/s390x/s390-virtio-bus.c +++ b/hw/s390x/s390-virtio-bus.c @@ -441,6 +441,7 @@ static Property s390_virtio_blk_properties[] = { #ifdef __linux__ DEFINE_PROP_BIT("scsi", VirtIOBlkS390, blk.scsi, 0, true), #endif + DEFINE_PROP_BIT("config-wce", VirtIOBlkS390, blk.config_wce, 0, true), DEFINE_PROP_END_OF_LIST(), }; diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index fc95116d48..afaf3486b2 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -762,6 +762,7 @@ static Property virtio_ccw_blk_properties[] = { #ifdef __linux__ DEFINE_PROP_BIT("scsi", VirtIOBlkCcw, blk.scsi, 0, true), #endif + DEFINE_PROP_BIT("config-wce", VirtIOBlkCcw, blk.config_wce, 0, true), DEFINE_VIRTIO_BLK_FEATURES(VirtioCcwDevice, host_features[0]), DEFINE_PROP_END_OF_LIST(), }; -- cgit v1.2.3 From fe42d7fb0f4a05fb393e1efbd681f33a0154c644 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Wed, 20 Mar 2013 08:27:50 +0100 Subject: virtio-ccw, s390-virtio: Use generic virtio-blk macro. Now that virtio-ccw and s390-virtio define all common properties for virtio-blk, we can switch to using the generic DEFINE_VIRTIO_BLK_PROPERTIES macro. CC: Alexander Graf Signed-off-by: Cornelia Huck --- hw/s390x/s390-virtio-bus.c | 8 +------- hw/s390x/virtio-ccw.c | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c index 5d55a9d7c3..c5d5456fa1 100644 --- a/hw/s390x/s390-virtio-bus.c +++ b/hw/s390x/s390-virtio-bus.c @@ -435,13 +435,7 @@ static const TypeInfo s390_virtio_net = { }; static Property s390_virtio_blk_properties[] = { - DEFINE_BLOCK_PROPERTIES(VirtIOBlkS390, blk.conf), - DEFINE_BLOCK_CHS_PROPERTIES(VirtIOBlkS390, blk.conf), - DEFINE_PROP_STRING("serial", VirtIOBlkS390, blk.serial), -#ifdef __linux__ - DEFINE_PROP_BIT("scsi", VirtIOBlkS390, blk.scsi, 0, true), -#endif - DEFINE_PROP_BIT("config-wce", VirtIOBlkS390, blk.config_wce, 0, true), + DEFINE_VIRTIO_BLK_PROPERTIES(VirtIOBlkS390, blk), DEFINE_PROP_END_OF_LIST(), }; diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index afaf3486b2..4c44b7e856 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -756,14 +756,8 @@ static const TypeInfo virtio_ccw_net = { static Property virtio_ccw_blk_properties[] = { DEFINE_PROP_STRING("devno", VirtioCcwDevice, bus_id), - DEFINE_BLOCK_PROPERTIES(VirtIOBlkCcw, blk.conf), - DEFINE_BLOCK_CHS_PROPERTIES(VirtIOBlkCcw, blk.conf), - DEFINE_PROP_STRING("serial", VirtIOBlkCcw, blk.serial), -#ifdef __linux__ - DEFINE_PROP_BIT("scsi", VirtIOBlkCcw, blk.scsi, 0, true), -#endif - DEFINE_PROP_BIT("config-wce", VirtIOBlkCcw, blk.config_wce, 0, true), DEFINE_VIRTIO_BLK_FEATURES(VirtioCcwDevice, host_features[0]), + DEFINE_VIRTIO_BLK_PROPERTIES(VirtIOBlkCcw, blk), DEFINE_PROP_END_OF_LIST(), }; -- cgit v1.2.3