On Fri, Dec 20, 2024 at 14:30:42 +0100, Adam Julis wrote: > Since we supported 'product' parameter for SCSI, just expanded existing > solution makes IDE/SATA parameter works too. QEMU requires parameter 'model' > in case of IDE/SATA (instead of 'product'), so the process of making JSON > object is slightly modified for that. > > Resolves: https://gitlab.com/libvirt/libvirt/-/issues/697 > Signed-off-by: Adam Julis <ajulis@xxxxxxxxxx> > --- > docs/formatdomain.rst | 7 ++-- > src/qemu/qemu_command.c | 11 +++++- > src/qemu/qemu_validate.c | 14 ++++++-- > ...disk-product-build-error.x86_64-latest.err | 1 + > .../disk-scsi-disk-product-build-error.xml | 34 +++++++++++++++++++ > ...-disk-vendor-build-error.x86_64-latest.err | 1 + > ... => disk-scsi-disk-vendor-build-error.xml} | 0 > ...csi-disk-vpd-build-error.x86_64-latest.err | 1 - > .../disk-scsi-disk-vpd.x86_64-latest.args | 4 +-- > .../disk-scsi-disk-vpd.x86_64-latest.xml | 7 ++-- > tests/qemuxmlconfdata/disk-scsi-disk-vpd.xml | 4 +-- > tests/qemuxmlconftest.c | 3 +- > 12 files changed, 71 insertions(+), 16 deletions(-) > create mode 100644 tests/qemuxmlconfdata/disk-scsi-disk-product-build-error.x86_64-latest.err > create mode 100644 tests/qemuxmlconfdata/disk-scsi-disk-product-build-error.xml > create mode 100644 tests/qemuxmlconfdata/disk-scsi-disk-vendor-build-error.x86_64-latest.err > rename tests/qemuxmlconfdata/{disk-scsi-disk-vpd-build-error.xml => disk-scsi-disk-vendor-build-error.xml} (100%) > delete mode 100644 tests/qemuxmlconfdata/disk-scsi-disk-vpd-build-error.x86_64-latest.err Disclaimer: Not a full review. I'll do one if nobody picks this up until I'm working again. > @@ -30,9 +30,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ > -device '{"driver":"virtio-scsi-pci","id":"scsi0","bus":"pci.0","addr":"0x2"}' \ > -device '{"driver":"lsi","id":"scsi1","bus":"pci.0","addr":"0x3"}' \ > -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-2-storage","read-only":true}' \ > --device '{"driver":"scsi-cd","bus":"scsi0.0","channel":0,"scsi-id":0,"lun":0,"device_id":"drive-scsi0-0-0-0","drive":"libvirt-2-storage","id":"scsi0-0-0-0","vendor":"SEAGATE","product":"ST3146707LC"}' \ > +-device '{"model":"ST3146707LC","driver":"ide-cd","bus":"ide.0","unit":0,"drive":"libvirt-2-storage","id":"ide0-0-0"}' \ > -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2","node-name":"libvirt-1-storage","read-only":true}' \ > --device '{"driver":"scsi-hd","bus":"scsi1.0","scsi-id":0,"device_id":"drive-scsi1-0-0","drive":"libvirt-1-storage","id":"scsi1-0-0","bootindex":1,"vendor":"SEA GATE","product":"ST67 807GD"}' \ > +-device '{"product":"ST67 807GD","driver":"scsi-hd","bus":"scsi1.0","scsi-id":0,"device_id":"drive-scsi1-0-0","drive":"libvirt-1-storage","id":"scsi1-0-0","bootindex":1}' \ Do not reorder these. 'driver' should always stay first for readability. > -audiodev '{"id":"audio1","driver":"none"}' \ > -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x4"}' \ > -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \