mirror of
https://github.com/qemu/qemu.git
synced 2025-08-17 16:03:30 +00:00
hw/scsi: remove 'scsi-disk' device
The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
b501018339
commit
879be3af49
@ -275,15 +275,6 @@ The ``I7200`` guest CPU relies on the nanoMIPS ISA, which is deprecated
|
|||||||
(the ISA has never been upstreamed to a compiler toolchain). Therefore
|
(the ISA has never been upstreamed to a compiler toolchain). Therefore
|
||||||
this CPU is also deprecated.
|
this CPU is also deprecated.
|
||||||
|
|
||||||
System emulator devices
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
``scsi-disk`` (since 4.2)
|
|
||||||
'''''''''''''''''''''''''
|
|
||||||
|
|
||||||
The 'scsi-disk' device is deprecated. Users should use 'scsi-hd' or
|
|
||||||
'scsi-cd' as appropriate to get a SCSI hard disk or CD-ROM as needed.
|
|
||||||
|
|
||||||
System emulator machines
|
System emulator machines
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
|
@ -233,6 +233,12 @@ System emulator devices
|
|||||||
The 'ide-drive' device has been removed. Users should use 'ide-hd' or
|
The 'ide-drive' device has been removed. Users should use 'ide-hd' or
|
||||||
'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed.
|
'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed.
|
||||||
|
|
||||||
|
``scsi-disk`` (removed in 6.0)
|
||||||
|
''''''''''''''''''''''''''''''
|
||||||
|
|
||||||
|
The 'scsi-disk' device has been removed. Users should use 'scsi-hd' or
|
||||||
|
'scsi-cd' as appropriate to get a SCSI hard disk or CD-ROM as needed.
|
||||||
|
|
||||||
Related binaries
|
Related binaries
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@ -338,7 +338,6 @@ GlobalProperty pc_compat_1_4[] = {
|
|||||||
PC_CPU_MODEL_IDS("1.4.0")
|
PC_CPU_MODEL_IDS("1.4.0")
|
||||||
{ "scsi-hd", "discard_granularity", "0" },
|
{ "scsi-hd", "discard_granularity", "0" },
|
||||||
{ "scsi-cd", "discard_granularity", "0" },
|
{ "scsi-cd", "discard_granularity", "0" },
|
||||||
{ "scsi-disk", "discard_granularity", "0" },
|
|
||||||
{ "ide-hd", "discard_granularity", "0" },
|
{ "ide-hd", "discard_granularity", "0" },
|
||||||
{ "ide-cd", "discard_granularity", "0" },
|
{ "ide-cd", "discard_granularity", "0" },
|
||||||
{ "virtio-blk-pci", "discard_granularity", "0" },
|
{ "virtio-blk-pci", "discard_granularity", "0" },
|
||||||
|
@ -2476,28 +2476,6 @@ static void scsi_cd_realize(SCSIDevice *dev, Error **errp)
|
|||||||
aio_context_release(ctx);
|
aio_context_release(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void scsi_disk_realize(SCSIDevice *dev, Error **errp)
|
|
||||||
{
|
|
||||||
DriveInfo *dinfo;
|
|
||||||
Error *local_err = NULL;
|
|
||||||
|
|
||||||
warn_report("'scsi-disk' is deprecated, "
|
|
||||||
"please use 'scsi-hd' or 'scsi-cd' instead");
|
|
||||||
|
|
||||||
if (!dev->conf.blk) {
|
|
||||||
scsi_realize(dev, &local_err);
|
|
||||||
assert(local_err);
|
|
||||||
error_propagate(errp, local_err);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
dinfo = blk_legacy_dinfo(dev->conf.blk);
|
|
||||||
if (dinfo && dinfo->media_cd) {
|
|
||||||
scsi_cd_realize(dev, errp);
|
|
||||||
} else {
|
|
||||||
scsi_hd_realize(dev, errp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static const SCSIReqOps scsi_disk_emulate_reqops = {
|
static const SCSIReqOps scsi_disk_emulate_reqops = {
|
||||||
.size = sizeof(SCSIDiskReq),
|
.size = sizeof(SCSIDiskReq),
|
||||||
@ -3161,45 +3139,6 @@ static const TypeInfo scsi_block_info = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static Property scsi_disk_properties[] = {
|
|
||||||
DEFINE_SCSI_DISK_PROPERTIES(),
|
|
||||||
DEFINE_PROP_BIT("removable", SCSIDiskState, features,
|
|
||||||
SCSI_DISK_F_REMOVABLE, false),
|
|
||||||
DEFINE_PROP_BIT("dpofua", SCSIDiskState, features,
|
|
||||||
SCSI_DISK_F_DPOFUA, false),
|
|
||||||
DEFINE_PROP_UINT64("wwn", SCSIDiskState, qdev.wwn, 0),
|
|
||||||
DEFINE_PROP_UINT64("port_wwn", SCSIDiskState, qdev.port_wwn, 0),
|
|
||||||
DEFINE_PROP_UINT16("port_index", SCSIDiskState, port_index, 0),
|
|
||||||
DEFINE_PROP_UINT64("max_unmap_size", SCSIDiskState, max_unmap_size,
|
|
||||||
DEFAULT_MAX_UNMAP_SIZE),
|
|
||||||
DEFINE_PROP_UINT64("max_io_size", SCSIDiskState, max_io_size,
|
|
||||||
DEFAULT_MAX_IO_SIZE),
|
|
||||||
DEFINE_PROP_INT32("scsi_version", SCSIDiskState, qdev.default_scsi_version,
|
|
||||||
5),
|
|
||||||
DEFINE_PROP_END_OF_LIST(),
|
|
||||||
};
|
|
||||||
|
|
||||||
static void scsi_disk_class_initfn(ObjectClass *klass, void *data)
|
|
||||||
{
|
|
||||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
|
||||||
SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(klass);
|
|
||||||
|
|
||||||
sc->realize = scsi_disk_realize;
|
|
||||||
sc->alloc_req = scsi_new_request;
|
|
||||||
sc->unit_attention_reported = scsi_disk_unit_attention_reported;
|
|
||||||
dc->fw_name = "disk";
|
|
||||||
dc->desc = "virtual SCSI disk or CD-ROM (legacy)";
|
|
||||||
dc->reset = scsi_disk_reset;
|
|
||||||
device_class_set_props(dc, scsi_disk_properties);
|
|
||||||
dc->vmsd = &vmstate_scsi_disk_state;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const TypeInfo scsi_disk_info = {
|
|
||||||
.name = "scsi-disk",
|
|
||||||
.parent = TYPE_SCSI_DISK_BASE,
|
|
||||||
.class_init = scsi_disk_class_initfn,
|
|
||||||
};
|
|
||||||
|
|
||||||
static void scsi_disk_register_types(void)
|
static void scsi_disk_register_types(void)
|
||||||
{
|
{
|
||||||
type_register_static(&scsi_disk_base_info);
|
type_register_static(&scsi_disk_base_info);
|
||||||
@ -3208,7 +3147,6 @@ static void scsi_disk_register_types(void)
|
|||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
type_register_static(&scsi_block_info);
|
type_register_static(&scsi_block_info);
|
||||||
#endif
|
#endif
|
||||||
type_register_static(&scsi_disk_info);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type_init(scsi_disk_register_types)
|
type_init(scsi_disk_register_types)
|
||||||
|
@ -93,7 +93,6 @@ ERROR_RULE_LIST = [
|
|||||||
{'device':'pci-bridge-seat', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
|
{'device':'pci-bridge-seat', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
|
||||||
{'device':'pxb', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
|
{'device':'pxb', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
|
||||||
{'device':'scsi-block', 'expected':True}, # drive property not set
|
{'device':'scsi-block', 'expected':True}, # drive property not set
|
||||||
{'device':'scsi-disk', 'expected':True}, # drive property not set
|
|
||||||
{'device':'scsi-generic', 'expected':True}, # drive property not set
|
{'device':'scsi-generic', 'expected':True}, # drive property not set
|
||||||
{'device':'scsi-hd', 'expected':True}, # drive property not set
|
{'device':'scsi-hd', 'expected':True}, # drive property not set
|
||||||
{'device':'spapr-pci-host-bridge', 'expected':True}, # BUID not specified for PHB
|
{'device':'spapr-pci-host-bridge', 'expected':True}, # BUID not specified for PHB
|
||||||
|
@ -186,7 +186,6 @@ case "$QEMU_DEFAULT_MACHINE" in
|
|||||||
run_qemu -drive if=none,id=disk -device ide-cd,drive=disk
|
run_qemu -drive if=none,id=disk -device ide-cd,drive=disk
|
||||||
run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
|
run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
|
||||||
run_qemu -drive if=none,id=disk -device ide-hd,drive=disk
|
run_qemu -drive if=none,id=disk -device ide-hd,drive=disk
|
||||||
run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
|
|
||||||
run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
|
run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -238,7 +237,6 @@ case "$QEMU_DEFAULT_MACHINE" in
|
|||||||
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-cd,drive=disk
|
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-cd,drive=disk
|
||||||
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
|
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
|
||||||
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-hd,drive=disk
|
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-hd,drive=disk
|
||||||
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
|
|
||||||
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
|
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -160,11 +160,6 @@ Testing: -drive if=none,id=disk -device ide-hd,drive=disk
|
|||||||
QEMU X.Y.Z monitor - type 'help' for more information
|
QEMU X.Y.Z monitor - type 'help' for more information
|
||||||
(qemu) QEMU_PROG: -device ide-hd,drive=disk: Device needs media, but drive is empty
|
(qemu) QEMU_PROG: -device ide-hd,drive=disk: Device needs media, but drive is empty
|
||||||
|
|
||||||
Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
|
|
||||||
QEMU X.Y.Z monitor - type 'help' for more information
|
|
||||||
(qemu) QEMU_PROG: -device scsi-disk,drive=disk: warning: 'scsi-disk' is deprecated, please use 'scsi-hd' or 'scsi-cd' instead
|
|
||||||
QEMU_PROG: -device scsi-disk,drive=disk: Device needs media, but drive is empty
|
|
||||||
|
|
||||||
Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
|
Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
|
||||||
QEMU X.Y.Z monitor - type 'help' for more information
|
QEMU X.Y.Z monitor - type 'help' for more information
|
||||||
(qemu) QEMU_PROG: -device scsi-hd,drive=disk: Device needs media, but drive is empty
|
(qemu) QEMU_PROG: -device scsi-hd,drive=disk: Device needs media, but drive is empty
|
||||||
@ -227,11 +222,6 @@ Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-hd
|
|||||||
QEMU X.Y.Z monitor - type 'help' for more information
|
QEMU X.Y.Z monitor - type 'help' for more information
|
||||||
(qemu) QEMU_PROG: -device ide-hd,drive=disk: Block node is read-only
|
(qemu) QEMU_PROG: -device ide-hd,drive=disk: Block node is read-only
|
||||||
|
|
||||||
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
|
|
||||||
QEMU X.Y.Z monitor - type 'help' for more information
|
|
||||||
(qemu) QEMU_PROG: -device scsi-disk,drive=disk: warning: 'scsi-disk' is deprecated, please use 'scsi-hd' or 'scsi-cd' instead
|
|
||||||
quit
|
|
||||||
|
|
||||||
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
|
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
|
||||||
QEMU X.Y.Z monitor - type 'help' for more information
|
QEMU X.Y.Z monitor - type 'help' for more information
|
||||||
(qemu) quit
|
(qemu) quit
|
||||||
|
Loading…
Reference in New Issue
Block a user