libxl: restore passing "readonly=" to qemu for SCSI disks
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 13 Jun 2018 14:54:53 +0000 (15:54 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 28 Jun 2018 07:05:06 +0000 (09:05 +0200)
commitdd64d3c41a2d15139c3a35d22d4cb6b78f4c5c59
tree537f0df211f8d3dfade078e2e84e56a0e1d8b4b5
parent724e5aa31b58d1e430ad36b484cf0ec021497399
libxl: restore passing "readonly=" to qemu for SCSI disks

A read-only check was introduced for XSA-142, commit ef6cb76026 ("libxl:
relax readonly check introduced by XSA-142 fix") added the passing of
the extra setting, but commit dab0539568 ("Introduce COLO mode and
refactor relevant function") dropped the passing of the setting again,
quite likely due to improper re-basing.

Restore the readonly= parameter to SCSI disks.  For IDE disks this is
supposed to be rejected; add an assert.  And there is a bare ad-hoc
disk drive string in libxl__build_device_model_args_new, which we also
update.

This is XSA-266.

Reported-by: Andrew Reimers <andrew.reimers@orionvm.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
tools/libxl/libxl_dm.c