Message ID | 773169891f9f2deb4cb7c4ef2655580dbe24c1d1.1513005190.git.mark.kanda@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index fb59f57..36c7608 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -952,6 +952,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));