diff options
Diffstat (limited to 'hw/block')
-rw-r--r-- | hw/block/virtio-blk.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 66ab0b19c8..b1532e4e91 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -949,6 +949,13 @@ static void virtio_blk_device_realize(DeviceState *dev, Error **errp) blkconf_blocksizes(&conf->conf); + if (conf->conf.logical_block_size > + conf->conf.physical_block_size) { + error_setg(errp, + "logical_block_size > physical_block_size not supported"); + return; + } + virtio_init(vdev, "virtio-blk", VIRTIO_ID_BLOCK, sizeof(struct virtio_blk_config)); |