diff options
author | Roman Kagan | 2020-05-29 00:55:14 +0200 |
---|---|---|
committer | Kevin Wolf | 2020-06-17 14:53:40 +0200 |
commit | 4f44bbc5bba0858d34b1aa356397847696276546 (patch) | |
tree | 7868dd3a14f9f99742f470263a61d1049d2b00e4 /include/hw/qdev-properties.h | |
parent | qdev-properties: make blocksize accept size suffixes (diff) | |
download | qemu-4f44bbc5bba0858d34b1aa356397847696276546.tar.gz qemu-4f44bbc5bba0858d34b1aa356397847696276546.tar.xz qemu-4f44bbc5bba0858d34b1aa356397847696276546.zip |
block: make BlockConf size props 32bit and accept size suffixes
Convert all size-related properties in BlockConf to 32bit. This will
accommodate bigger block sizes (in a followup patch). This also allows
to make them all accept size suffixes, either via DEFINE_PROP_BLOCKSIZE
or via DEFINE_PROP_SIZE32.
Also, since min_io_size is exposed to the guest by scsi and virtio-blk
devices as an uint16_t in units of logical blocks, introduce an
additional check in blkconf_blocksizes to prevent its silent truncation.
Signed-off-by: Roman Kagan <rvkagan@yandex-team.ru>
Message-Id: <20200528225516.1676602-7-rvkagan@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/hw/qdev-properties.h')
-rw-r--r-- | include/hw/qdev-properties.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index c03eadfad6..5252bb6b1a 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -200,7 +200,7 @@ extern const PropertyInfo qdev_prop_pcie_link_width; #define DEFINE_PROP_SIZE32(_n, _s, _f, _d) \ DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_size32, uint32_t) #define DEFINE_PROP_BLOCKSIZE(_n, _s, _f) \ - DEFINE_PROP_UNSIGNED(_n, _s, _f, 0, qdev_prop_blocksize, uint16_t) + DEFINE_PROP_UNSIGNED(_n, _s, _f, 0, qdev_prop_blocksize, uint32_t) #define DEFINE_PROP_PCI_HOST_DEVADDR(_n, _s, _f) \ DEFINE_PROP(_n, _s, _f, qdev_prop_pci_host_devaddr, PCIHostDeviceAddress) #define DEFINE_PROP_OFF_AUTO_PCIBAR(_n, _s, _f, _d) \ |