[PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev

Michal Prívozník mprivozn at redhat.com
Tue Oct 20 11:09:18 UTC 2020


On 10/15/20 5:25 PM, Peter Krempa wrote:
> -drive detects whether a device is a cdrom automatically but we need to
> use 'host_cdrom' when using blockdev explicitly. Fix the hostdev code
> which was recently converted to -blockdev.
> 
> Warning:
> 
> I _don't_ have a box with a CDROM handy so this code is not tested in action!
> 
> Peter Krempa (6):
>    qemuProcessCreatePretendCmd: Split up preparation and command building
>    qemu: hostdev: Prepare definition bits in qemuDomainPrepareHostdev
>    qemu: Prepare hostdev data which depends on the host state separately
>    qemuxml2argvmock: Remove mocking of 'virSCSIDeviceGetSgName'
>    qemu: Detect whether a SCSI hostdev is a cdrom
>    qemu: Add test cases for 'host_cdrom' blockdev backend via <disk>
> 
>   src/qemu/qemu_command.c                       |  33 +-----
>   src/qemu/qemu_domain.c                        |   5 +
>   src/qemu/qemu_driver.c                        |  65 ++++++++++-
>   src/qemu/qemu_hotplug.c                       |   3 +
>   src/qemu/qemu_process.c                       | 103 +++++++++++++++---
>   src/qemu/qemu_process.h                       |  21 ++--
>   tests/qemuxml2argvdata/disk-cdrom.args        |   4 +-
>   .../disk-cdrom.x86_64-2.12.0.args             |   4 +-
>   .../disk-cdrom.x86_64-latest.args             |   6 +-
>   tests/qemuxml2argvdata/disk-cdrom.xml         |   5 +-
>   ...hostdev-scsi-virtio-scsi.x86_64-2.8.0.args |   3 +
>   ...hostdev-scsi-virtio-scsi.x86_64-4.1.0.args |   3 +
>   ...ostdev-scsi-virtio-scsi.x86_64-latest.args |   4 +
>   .../hostdev-scsi-virtio-scsi.xml              |   8 ++
>   tests/qemuxml2argvmock.c                      |  13 ---
>   tests/qemuxml2argvtest.c                      |  45 +++++++-
>   tests/qemuxml2xmloutdata/disk-cdrom.xml       |   5 +-
>   .../hostdev-scsi-virtio-scsi.xml              |   8 ++
>   18 files changed, 252 insertions(+), 86 deletions(-)
> 

To patches 1-4:

Reviewed-by: Michal Privoznik <mprivozn at redhat.com>

Michal




More information about the libvir-list mailing list