qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 2/2] spapr: generate DT node names


From: David Gibson
Subject: Re: [Qemu-devel] [PATCH v5 2/2] spapr: generate DT node names
Date: Thu, 1 Oct 2015 13:15:43 +1000
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Sep 30, 2015 at 05:13:19PM +0200, Laurent Vivier wrote:
> When DT node names for PCI devices are generated by SLOF,
> they are generated according to the type of the device
> (for instance, ethernet for virtio-net-pci device).
> 
> Node name for hotplugged devices is generated by QEMU.
> This patch adds the mechanic to QEMU to create the node
> name according to the device type too.
> 
> The data structure has been roughly copied from OpenBIOS/OpenHackware,
> node names from SLOF.
> 
> Example:
> 
> Hotplugging some PCI cards with QEMU monitor:
> 
> device_add virtio-tablet-pci
> device_add virtio-serial-pci
> device_add virtio-mouse-pci
> device_add virtio-scsi-pci
> device_add virtio-gpu-pci
> device_add ne2k_pci
> device_add nec-usb-xhci
> device_add intel-hda
> 
> What we can see in linux device tree:
> 
> for dir in /proc/device-tree/address@hidden/address@hidden/; do
>     echo $dir
>     cat $dir/name
>     echo
> done
> 
> WITHOUT this patch:
> 
> /proc/device-tree/address@hidden/address@hidden/
> pci
> /proc/device-tree/address@hidden/address@hidden/
> pci
> /proc/device-tree/address@hidden/address@hidden/
> pci
> /proc/device-tree/address@hidden/address@hidden/
> pci
> /proc/device-tree/address@hidden/address@hidden/
> pci
> /proc/device-tree/address@hidden/address@hidden/
> pci
> /proc/device-tree/address@hidden/address@hidden/
> pci
> /proc/device-tree/address@hidden/address@hidden/
> pci
> 
> WITH this patch:
> 
> /proc/device-tree/address@hidden/address@hidden/
> communication-controller
> /proc/device-tree/address@hidden/address@hidden/
> display
> /proc/device-tree/address@hidden/address@hidden/
> ethernet
> /proc/device-tree/address@hidden/address@hidden/
> input-controller
> /proc/device-tree/address@hidden/address@hidden/
> mouse
> /proc/device-tree/address@hidden/address@hidden/
> multimedia-device
> /proc/device-tree/address@hidden/address@hidden/
> scsi
> /proc/device-tree/address@hidden/address@hidden/
> usb-xhci
> 
> Signed-off-by: Laurent Vivier <address@hidden>
> Reviewed-by: Thomas Huth <address@hidden>

Reviewed-by: David Gibson <address@hidden>

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: pgpzvvMz54gGy.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]