|
From: | Mark Cave-Ayland |
Subject: | Re: [Qemu-devel] [Qemu-block] How to generate custom fw paths for IDE devices? |
Date: | Fri, 27 Jul 2018 12:00:34 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |