block: make BlockConf size props 32bit and accept size suffixes
commit4f44bbc5bba0858d34b1aa356397847696276546
authorRoman Kagan <rvkagan@yandex-team.ru>
Thu, 28 May 2020 22:55:14 +0000 (29 01:55 +0300)
committerKevin Wolf <kwolf@redhat.com>
Wed, 17 Jun 2020 12:53:40 +0000 (17 14:53 +0200)
tree7868dd3a14f9f99742f470263a61d1049d2b00e4
parent645b55d1c2bf35ce6344f1f472fa30e327cafce0
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>
hw/block/block.c
hw/core/qdev-properties.c
include/hw/block/block.h
include/hw/qdev-properties.h