From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Alexander Graf <agraf@suse.de>,
Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] virtio-blk-pci: how to tell if it is CD or HDD?
Date: Thu, 17 Oct 2013 15:49:50 +0200 [thread overview]
Message-ID: <525FEAFE.3030603@redhat.com> (raw)
In-Reply-To: <525FE7E8.5050902@ozlabs.ru>
Il 17/10/2013 15:36, Alexey Kardashevskiy ha scritto:
>> > But please make sure to not block the path for non-SLOF machines. -M mac99 should still be able to get different path names for PCI devices for example.
> Ok. Then question for you. I need to change root PHB name from
> spapr-pci-host-bridge (which is a class name) to something reasonable. For
> example, PCIHostBridgeClass::root_bus_path does the job.
>
> But this part of OF path is made by sysbus_get_fw_dev_path() from
> hw/core/sysbus.c which does not know about PCI. So it cannot call PCI
> callbacks.
>
> I workarounded this by setting PHB's "id" to what sysbus_get_fw_dev_path()
> returns but this is barely the proper fix.
>
> I could initialize my PHBs s->mmio[0].addr to BUID and
> sysbus_get_fw_dev_path() would return what I need but it won't be MMIO by
> any mean and I do not really want to be responsible for all side effect it
> may have :)
>
> So how to fix it correctly?
Set dc->fw_name for the spapr-pci-host-bridge class, and similarly for
the vio bridge.
Paolo
next prev parent reply other threads:[~2013-10-17 13:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 5:04 [Qemu-devel] virtio-blk-pci: how to tell if it is CD or HDD? Alexey Kardashevskiy
2013-10-16 6:36 ` Paolo Bonzini
2013-10-16 7:59 ` Alexey Kardashevskiy
2013-10-17 12:38 ` Alexey Kardashevskiy
2013-10-17 12:54 ` Paolo Bonzini
2013-10-17 13:02 ` Alexander Graf
2013-10-17 13:36 ` Alexey Kardashevskiy
2013-10-17 13:49 ` Paolo Bonzini [this message]
2013-10-17 13:09 ` Alexey Kardashevskiy
2013-10-17 13:48 ` Paolo Bonzini
2013-10-18 4:56 ` Nikunj A Dadhania
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=525FEAFE.3030603@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=nikunj@linux.vnet.ibm.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 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).