All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
	marcel@redhat.com, Laszlo Ersek <lersek@redhat.com>,
	armbru@redhat.com, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] How to generate custom fw paths for IDE devices?
Date: Fri, 27 Jul 2018 12:00:34 +0100	[thread overview]
Message-ID: <b386f9ed-42e0-ae56-e566-48fa4c181748@ilande.co.uk> (raw)
In-Reply-To: <a0593954-0e97-7317-f0ff-f54c194cb137@redhat.com>

On 27/07/18 11:47, Paolo Bonzini wrote:

> On 27/07/2018 12:43, Mark Cave-Ayland wrote:
>> The issue here seems to be that according to "info qtree" there is
>> *always* an ide-cd device plugged into the location equivalent to that
>> of -cdrom, and so with the above command QEMU ends up adding a second
>> ide-cd device to the ide.1 bus which confuses OpenBIOS. Is this
>> deliberate behaviour?
> 
> Yes, the default CD-ROM is always placed as secondary/master.
> 
> If you use -device ide-cd the implicit CD-ROM should go away.  However,
> -drive alone doesn't have that effect (probably for backwards
> compatibility reasons, this predates me even though by only a few months).

I see, thanks for the detailed explanation. So in that case shouldn't 
the following work?

$ ./qemu-system-ppc -drive 
id=cd,file=MacOS921-macsbug.iso,if=ide,media=cdrom -device 
ide-cd,drive=cd,bootindex=0 -nographic -prom-env 'auto-boot?=false'

qemu-system-ppc: -device ide-cd,drive=cd,bootindex=0: Drive 'cd' is 
already in use because it has been automatically connected to another 
device (did you need 'if=none' in the drive options?)

 From what I can see you must have if=ide present so that the code will 
take into account that the machine block_default_type is set to IF_IDE 
and understand it's the existing internal IDE buses that need to be 
(re)used?

> Alternatively, you can use -nodefaults of course.

For the moment I'd like to come up with equivalents to the -hda and 
-cdrom options to allow users to switch to the new syntax, and of course 
this is all a pre-cursor to adding virtio support to OpenBIOS :)

It seems to me that -nodefaults is intended more for tools like libvirt 
that want to build up a machine from scratch, although again there is 
always the issue as to how to handle internal devices i.e. the 
difference between plugging a drive into an internal IDE interface vs. 
adding one into a spare PCI slot via -device and instead plugging the 
drive into that.


ATB,

Mark.

      reply	other threads:[~2018-07-27 11:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-18 21:13 [Qemu-devel] How to generate custom fw paths for IDE devices? Mark Cave-Ayland
2018-07-19  8:10 ` Thomas Huth
2018-07-19 16:46   ` Mark Cave-Ayland
2018-07-19  8:29 ` Laszlo Ersek
2018-07-19 17:19   ` Mark Cave-Ayland
2018-07-19 19:03     ` Laszlo Ersek
2018-07-25 13:03 ` [Qemu-devel] [Qemu-block] " Paolo Bonzini
2018-07-27 10:43   ` Mark Cave-Ayland
2018-07-27 10:47     ` Paolo Bonzini
2018-07-27 11:00       ` Mark Cave-Ayland [this message]

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=b386f9ed-42e0-ae56-e566-48fa4c181748@ilande.co.uk \
    --to=mark.cave-ayland@ilande.co.uk \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lersek@redhat.com \
    --cc=marcel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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.