summaryrefslogtreecommitdiffstats
path: root/hw/virtio-blk.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2012-12-10 13:14:39 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-01-02 15:59:20 +0100
commit8a873ba78069ef81c4ef073a0bd703172c8b3312 (patch)
tree39e3dbbbf08451322ba648ab9fd927416a188eed /hw/virtio-blk.h
parent530c0bbd73e1b658c9266582072847de1fbdff10 (diff)
downloadhqemu-8a873ba78069ef81c4ef073a0bd703172c8b3312.zip
hqemu-8a873ba78069ef81c4ef073a0bd703172c8b3312.tar.gz
virtio-blk: restore VirtIOBlkConf->config_wce flag
Two slightly different versions of a patch to conditionally set VIRTIO_BLK_F_CONFIG_WCE through the "config-wce" qdev property have been applied (ea776abca and eec7f96c2). David Gibson <david@gibson.dropbear.id.au> noticed that the "config-wce" property is broken as a result and fixed it recently. The fix sets the host_features VIRTIO_BLK_F_CONFIG_WCE bit from a qdev property. Unfortunately, the virtio device then has no chance to test for the presence of the feature bit during virtio_blk_init(). Therefore, reinstate the VirtIOBlkConf->config_wce flag. Drop the duplicate qdev property to set the host_features bit. The VirtIOBlkConf->config_wce flag will be used by virtio-blk-data-plane in a later patch. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/virtio-blk.h')
-rw-r--r--hw/virtio-blk.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/virtio-blk.h b/hw/virtio-blk.h
index 651a000..454f445 100644
--- a/hw/virtio-blk.h
+++ b/hw/virtio-blk.h
@@ -104,10 +104,10 @@ struct VirtIOBlkConf
BlockConf conf;
char *serial;
uint32_t scsi;
+ uint32_t config_wce;
};
#define DEFINE_VIRTIO_BLK_FEATURES(_state, _field) \
- DEFINE_VIRTIO_COMMON_FEATURES(_state, _field), \
- DEFINE_PROP_BIT("config-wce", _state, _field, VIRTIO_BLK_F_CONFIG_WCE, true)
+ DEFINE_VIRTIO_COMMON_FEATURES(_state, _field)
#endif
OpenPOWER on IntegriCloud