|
|
9bac43 |
From 8198d8d36fed85743c4d2b26aa1670f5bc3a9793 Mon Sep 17 00:00:00 2001
|
|
|
9bac43 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
9bac43 |
Date: Tue, 28 Nov 2017 13:24:17 +0100
|
|
|
9bac43 |
Subject: [PATCH 16/21] scsi: Fix onboard HBAs to pick up -drive if=scsi
|
|
|
9bac43 |
|
|
|
9bac43 |
RH-Author: Markus Armbruster <armbru@redhat.com>
|
|
|
9bac43 |
Message-id: <20171128132417.18247-2-armbru@redhat.com>
|
|
|
9bac43 |
Patchwork-id: 77934
|
|
|
9bac43 |
O-Subject: [RHV-7.5 qemu-kvm-rhev PATCH v2 1/1] scsi: Fix onboard HBAs to pick up -drive if=scsi
|
|
|
9bac43 |
Bugzilla: 1497740
|
|
|
9bac43 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
9bac43 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
9bac43 |
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
|
|
|
9bac43 |
|
|
|
9bac43 |
Downstream commit 7977e6031 "scsi: Disable deprecated implicit SCSI
|
|
|
9bac43 |
HBA creation more cleanly" regressed -drive if=scsi and its sugared
|
|
|
9bac43 |
forms like -cdrom with onboard HBAs. Instead of creating SCSI devices
|
|
|
9bac43 |
connected to the onboard HBA, we reject these options like this:
|
|
|
9bac43 |
|
|
|
9bac43 |
$ qemu-kvm -cdrom r7.iso
|
|
|
9bac43 |
qemu-kvm: -cdrom r7.iso: machine type does not support if=scsi,bus=0,unit=2
|
|
|
9bac43 |
|
|
|
9bac43 |
The culprit is scsi_bus_legacy_handle_cmdline(): commit 7977e6031
|
|
|
9bac43 |
accidentally neutered it for the non-deprecated case (onboard SCSI
|
|
|
9bac43 |
HBA) in addition to the deprecated case (non-onboard SCSI HBA with
|
|
|
9bac43 |
legacy magic). Fix by narrowing the neutering to the deprecated case.
|
|
|
9bac43 |
|
|
|
9bac43 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
9bac43 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9bac43 |
---
|
|
|
9bac43 |
hw/scsi/scsi-bus.c | 7 ++++---
|
|
|
9bac43 |
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
9bac43 |
|
|
|
9bac43 |
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
|
|
|
9bac43 |
index 309daaa..404686a 100644
|
|
|
9bac43 |
--- a/hw/scsi/scsi-bus.c
|
|
|
9bac43 |
+++ b/hw/scsi/scsi-bus.c
|
|
|
9bac43 |
@@ -265,8 +265,6 @@ SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockBackend *blk,
|
|
|
9bac43 |
|
|
|
9bac43 |
void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, bool deprecated)
|
|
|
9bac43 |
{
|
|
|
9bac43 |
-#if 0 /* Disabled for Red Hat Enterprise Linux */
|
|
|
9bac43 |
-
|
|
|
9bac43 |
Location loc;
|
|
|
9bac43 |
DriveInfo *dinfo;
|
|
|
9bac43 |
int unit;
|
|
|
9bac43 |
@@ -279,6 +277,7 @@ void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, bool deprecated)
|
|
|
9bac43 |
}
|
|
|
9bac43 |
qemu_opts_loc_restore(dinfo->opts);
|
|
|
9bac43 |
if (deprecated) {
|
|
|
9bac43 |
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
|
|
9bac43 |
/* Handling -drive not claimed by machine initialization */
|
|
|
9bac43 |
if (blk_get_attached_dev(blk_by_legacy_dinfo(dinfo))) {
|
|
|
9bac43 |
continue; /* claimed */
|
|
|
9bac43 |
@@ -288,12 +287,14 @@ void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, bool deprecated)
|
|
|
9bac43 |
" machine type",
|
|
|
9bac43 |
bus->busnr, unit);
|
|
|
9bac43 |
}
|
|
|
9bac43 |
+#else
|
|
|
9bac43 |
+ continue;
|
|
|
9bac43 |
+#endif
|
|
|
9bac43 |
}
|
|
|
9bac43 |
scsi_bus_legacy_add_drive(bus, blk_by_legacy_dinfo(dinfo),
|
|
|
9bac43 |
unit, false, -1, NULL, &error_fatal);
|
|
|
9bac43 |
}
|
|
|
9bac43 |
loc_pop(&loc;;
|
|
|
9bac43 |
-#endif
|
|
|
9bac43 |
}
|
|
|
9bac43 |
|
|
|
9bac43 |
#if 0 /* Disabled for Red Hat Enterprise Linux */
|
|
|
9bac43 |
--
|
|
|
9bac43 |
1.8.3.1
|
|
|
9bac43 |
|