All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: Thomas Huth <thuth@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-block@nongnu.org, Laszlo Ersek <lersek@redhat.com>,
	armbru@redhat.com, "qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	marcel@redhat.com, jsnow@redhat.com
Subject: Re: [Qemu-devel] How to generate custom fw paths for IDE devices?
Date: Thu, 19 Jul 2018 17:46:17 +0100	[thread overview]
Message-ID: <ece0b6f2-878c-0190-7f09-926ea64f5a4e@ilande.co.uk> (raw)
In-Reply-To: <85e11e69-84fd-1dc7-28cf-d4c0820c4f05@redhat.com>

On 19/07/18 09:10, Thomas Huth wrote:

> On 18.07.2018 23:13, Mark Cave-Ayland wrote:
>> Hi all,
>>
>> Following on from a couple of patches I've previously posted to the
>> mailing list at
>> https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg08836.html I've
>> made some good progress with trying to add bootindex support to OpenBIOS
>> but I'm stuck with generating the IDE device paths from QEMU.
>>
>> According to OpenBIOS the device path for a cdrom on a sun4u machine
>> should be:
>>
>>    /pci@1fe,0/pci@1,1/ide@3/ide1@8100/cdrom@0
>>
>> whereas with my working patchset I'm currently generating:
>>
>>    /pci@1fe,0/pci@1,1/ide@3/drive@1
>>
>> The issue is that the drive@1 part is being generated by the IDE drive
>> device attached to the IDE bus in hw/ide/qdev.c, and so I think I need
>> to override idebus_get_fw_dev_path() to manually generate the remainder
>> of the path including both the controller and the correctly named drive
>> node.
>>
>> One option may be to consider subclassing IDEBus and overriding
>> idebus_get_fw_dev_path() there, but the cmd646 device is a child of
>> TYPE_PCI_IDE which has its own internal IDEBus and so it seems
>> overriding it is impossible.
>>
>> Can anyone point me in the right direction as to how to generate the
>> correct fw path for IDE devices in the above format for sun4u machines?
> 
> Not sure if it is of any help, but the pseries machine is also rewriting
> the device paths for the device tree: See function spapr_get_fw_dev_path
> in hw/ppc/spapr.c.

Ah I see - this is very useful indeed, as it seemingly allows all the fw 
paths to be managed in a single place without having to add Bus support. 
Thanks for the reference!


ATB,

Mark.

  reply	other threads:[~2018-07-19 16:46 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 [this message]
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

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=ece0b6f2-878c-0190-7f09-926ea64f5a4e@ilande.co.uk \
    --to=mark.cave-ayland@ilande.co.uk \
    --cc=armbru@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lersek@redhat.com \
    --cc=marcel@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@redhat.com \
    /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.