hw: Deprecate -drive if=scsi with non-onboard HBAs

Block backends defined with "-drive if=T" with T other than "none" are
meant to be picked up by machine initialization code: a suitable
frontend gets created and wired up automatically.

Drives defined with if=scsi are also picked up by SCSI HBAs added with
-device, unlike other interface types.  Deprecate this usage, as follows.

Create the frontends for onboard HBAs in machine initialization code,
exactly like we do for if=ide and other interface types.  Change
scsi_legacy_handle_cmdline() to create a frontend only when it's still
missing, and warn that this usage is deprecated.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1487161136-9018-3-git-send-email-armbru@redhat.com>
This commit is contained in:
Markus Armbruster 2017-02-15 13:18:55 +01:00
parent fb8b660e17
commit a64aa5785d
9 changed files with 35 additions and 7 deletions

8
vl.c
View file

@ -4510,7 +4510,13 @@ int main(int argc, char **argv, char **envp)
rom_reset_order_override();
/* Create frontends for -drive if=scsi */
/*
* Create frontends for -drive if=scsi leftovers.
* Normally, frontends for -drive get created by machine
* initialization for onboard SCSI HBAs. However, we create a few
* more ever since SCSI qdevification, but this is pretty much an
* implementation accident, and deprecated.
*/
scsi_legacy_handle_cmdline();
/* Did we create any drives that we failed to create a device for? */