From: Laurent Vivier <Laurent.Vivier@bull.net>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2][UPDATE] Add arg -drive to define new drive with more features
Date: Mon, 12 Nov 2007 17:53:07 +0100 [thread overview]
Message-ID: <1194886387.8525.12.camel@frecb07144> (raw)
In-Reply-To: <f43fc5580711120844t6b574c08j847a99e0193598be@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3013 bytes --]
Le lundi 12 novembre 2007 à 18:44 +0200, Blue Swirl a écrit :
> On 11/12/07, Laurent Vivier <Laurent.Vivier@bull.net> wrote:
> > It also defines the default interface type to "scsi" for targets
> > "realview", "SS-5", "SS-10", "versatilepb", "versatileab"
> > to keep old behavior, where "-hda" is a SCSI disk.
>
> For maximal compatibility, I'd like the following mappings for SS-5,
> SS-10, and SS-600MP:
> -hda = SCSI ID 0
> -hdb = SCSI ID 1
> -hdc = -cdrom = SCSI ID 2
> -hdd = SCSI ID 3
Yes, there is mistake there.
> There is no bus 1, only 0. Maybe a warning should be issued for bus=1.
> I didn't find where this was implemented, so is the above in line with
> the patch?
See following lines:
...
#define HD_ALIAS "file=%s,bus=%d,unit=%d,media=disk"
...
if (!strcmp(machine->name, "realview") ||
!strcmp(machine->name, "SS-5") ||
!strcmp(machine->name, "SS-10") ||
!strcmp(machine->name, "versatilepb") ||
!strcmp(machine->name, "versatileab")) {
interface = IF_SCSI;
max_devs = MAX_SCSI_DEVS;
} else {
interface = IF_IDE;
max_devs = MAX_IDE_DEVS;
}
...
case QEMU_OPTION_hdb:
case QEMU_OPTION_hdc:
case QEMU_OPTION_hdd:
drive_add(HD_ALIAS, optarg, hd_index / MAX_IDE_DEVS,
hd_index % MAX_IDE_DEVS);
...
Of course this last line is wrong...
> > Index: qemu/hw/sun4m.c
>
> > - if (hwdef->fd_base != (target_phys_addr_t)-1)
> > - sun4m_fdctrl_init(slavio_irq[hwdef->fd_irq], hwdef->fd_base, fd_table);
> > + if (hwdef->fd_base != (target_phys_addr_t)-1) {
> > + for(i = 0; i < MAX_FD; i++) {
> > + index = drive_get_index(IF_FLOPPY, 0, i);
> > + if (index != -1)
> > + fd[i] = drives_table[index].bdrv;
> > + else
> > + fd[i] = NULL;
> > + }
> > +
> > + sun4m_fdctrl_init(slavio_irq[hwdef->fd_irq], hwdef->fd_base, fd);
> > + }
>
> This is broken, there are zero or one floppy drives, never more.
I just try to mimic original behavior.
I'll correct this.
> > Index: qemu/hw/sun4u.c
>
> > - floppy_controller = fdctrl_init(NULL/*6*/, 2, 0, 0x3f0, fd_table);
> > + for(i = 0; i < MAX_FD; i++) {
> > + index = drive_get_index(IF_FLOPPY, 0, i);
> > + if (index != -1)
> > + fd[i] = drives_table[index].bdrv;
> > + else
> > + fd[i] = NULL;
> > + }
> > + floppy_controller = fdctrl_init(NULL/*6*/, 2, 0, 0x3f0, fd);
>
> I think same applies here (0 to 1 drives), but as the hardware is
> PC-like, technically it may be possible that someone could replace the
> cables and insert additional floppy drives.
ditto
Laurent
--
------------- Laurent.Vivier@bull.net --------------
"In short: just say NO TO DRUGS and maybe you won't
end up like the Hurd people." -- Linus Torvald
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-11-12 16:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-12 15:05 [Qemu-devel] [PATCH 0/2][UPDATE] Add "-drive" parameter Laurent Vivier
2007-11-12 15:05 ` [Qemu-devel] [PATCH 1/2][UPDATE] remove unused parameters from QEMUMachineInitFunc Laurent Vivier
2007-11-12 15:05 ` [Qemu-devel] [PATCH 2/2][UPDATE] Add arg -drive to define new drive with more features Laurent Vivier
2007-11-12 16:44 ` Blue Swirl
2007-11-12 16:53 ` Laurent Vivier [this message]
2007-11-13 16:02 ` Laurent Vivier
2007-11-13 20:50 ` Blue Swirl
2007-11-13 21:22 ` Laurent Vivier
2007-11-12 16:23 ` [Qemu-devel] [PATCH 1/2][UPDATE] remove unused parameters from QEMUMachineInitFunc Blue Swirl
2007-11-12 16:36 ` Laurent Vivier
2007-11-12 17:14 ` Laurent Vivier
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=1194886387.8525.12.camel@frecb07144 \
--to=laurent.vivier@bull.net \
--cc=blauwirbel@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.