From: Kevin Wolf <kwolf@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>,
qemu-devel@nongnu.org, Hannes Reinecke <hare@suse.de>
Subject: [Qemu-devel] Re: Commit 622b520f changed -drive if=scsi, index=N, intentional?
Date: Thu, 27 Jan 2011 13:21:22 +0100 [thread overview]
Message-ID: <4D416342.6080001@redhat.com> (raw)
In-Reply-To: <m3oc72eed1.fsf@blackfin.pond.sub.org>
Am 27.01.2011 13:10, schrieb Markus Armbruster:
> Consider -drive if=scsi,index=12,...
>
> Before the commit, index=12 meant bus=1,unit=5. Example:
>
> [...]
>
> Two scsi-buses, and scsi1-cd5 with scsi-id 5 is on the second one,
> i.e. bus=1, unit=5.
>
> After the commit, it means bus=0,unit=12. The drive is created, but not
> the guest device. That's because lsi53c895a supports only 7 units
> (LSI_MAX_DEVS), and scsi_bus_legacy_handle_cmdline() ignores drives with
> unit numbers exceeding that limit. Example:
>
> [...]
>
> One scsi-bus, and scsi1-cd5 nowhere to be found.
>
> I'd call this a regression.
>
> What now?
That's a really good question. We could do something like this:
--- a/blockdev.c
+++ b/blockdev.c
@@ -192,7 +192,7 @@ DriveInfo *drive_init(QemuOpts *opts, int
default_to_scsi)
max_devs = MAX_IDE_DEVS;
} else if (!strcmp(buf, "scsi")) {
type = IF_SCSI;
- max_devs = MAX_SCSI_DEVS;
+ max_devs = 7;
} else if (!strcmp(buf, "floppy")) {
type = IF_FLOPPY;
max_devs = 0;
That's very obviously not much more than a hack, but I don't think
blockdev.c can get the real number easily (please prove me wrong). With
this hack, we would get the old behaviour for -drive (which doesn't use
any other controller anyway) and you can still use -device to attach
more devices to a non-lsi bus.
Kevin
next prev parent reply other threads:[~2011-01-27 12:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 12:10 [Qemu-devel] Commit 622b520f changed -drive if=scsi, index=N, intentional? Markus Armbruster
2011-01-27 12:21 ` Kevin Wolf [this message]
2011-01-27 15:11 ` [Qemu-devel] " Markus Armbruster
2011-01-27 19:26 ` Gerd Hoffmann
2011-01-28 7:27 ` Hannes Reinecke
2011-01-27 12:35 ` [Qemu-devel] " Daniel P. Berrange
2011-01-27 12:47 ` [Qemu-devel] " Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D416342.6080001@redhat.com \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).