From: Shin'ichiro Kawasaki <shinichiro.kawas...@wdc.com> Prevent scsi-hd and scsi-disk drivers from attaching a zoned block device because it will appear as a regular block device at the guest and will most certainly cause problems.
The functionality to support ZBDs is not planned for scsi-hd and scsi-disk legacy drivers. It is supported via scsi-generic driver already and discussion is ongoing for scsi-block driver. Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawas...@wdc.com> --- hw/scsi/scsi-disk.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index ed7295bfd7..80682a61fb 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -2401,6 +2401,11 @@ static void scsi_hd_realize(SCSIDevice *dev, Error **errp) * backend will be issued in scsi_realize */ if (s->qdev.conf.blk) { + if (blk_is_zoned(s->qdev.conf.blk)) { + error_setg(errp, "zoned block devices are not supported"); + return; + } + ctx = blk_get_aio_context(s->qdev.conf.blk); aio_context_acquire(ctx); blkconf_blocksizes(&s->qdev.conf); -- 2.21.0