[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] virtio-blk-pci: how to tell if it is CD or HDD?
From: |
Paolo Bonzini |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
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