qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Laurent Vivier <lvivier@redhat.com>
Cc: thuth@redhat.com, "Michael S. Tsirkin" <mst@redhat.com>,
	qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v5 2/2] spapr: generate DT node names
Date: Thu, 1 Oct 2015 13:15:43 +1000	[thread overview]
Message-ID: <20151001031543.GK23574@voom> (raw)
In-Reply-To: <1443625999-2306-3-git-send-email-lvivier@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2403 bytes --]

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/pci@800000020000000/*@*/; do
>     echo $dir
>     cat $dir/name
>     echo
> done
> 
> WITHOUT this patch:
> 
> /proc/device-tree/pci@800000020000000/pci@0/
> pci
> /proc/device-tree/pci@800000020000000/pci@1/
> pci
> /proc/device-tree/pci@800000020000000/pci@2/
> pci
> /proc/device-tree/pci@800000020000000/pci@3/
> pci
> /proc/device-tree/pci@800000020000000/pci@4/
> pci
> /proc/device-tree/pci@800000020000000/pci@5/
> pci
> /proc/device-tree/pci@800000020000000/pci@6/
> pci
> /proc/device-tree/pci@800000020000000/pci@7/
> pci
> 
> WITH this patch:
> 
> /proc/device-tree/pci@800000020000000/communication-controller@1/
> communication-controller
> /proc/device-tree/pci@800000020000000/display@4/
> display
> /proc/device-tree/pci@800000020000000/ethernet@5/
> ethernet
> /proc/device-tree/pci@800000020000000/input-controller@0/
> input-controller
> /proc/device-tree/pci@800000020000000/mouse@2/
> mouse
> /proc/device-tree/pci@800000020000000/multimedia-device@7/
> multimedia-device
> /proc/device-tree/pci@800000020000000/scsi@3/
> scsi
> /proc/device-tree/pci@800000020000000/usb-xhci@6/
> usb-xhci
> 
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

-- 
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 #2: Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2015-10-01  3:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 15:13 [Qemu-devel] [PATCH v5 0/2] spapr: generate DT node names Laurent Vivier
2015-09-30 15:13 ` [Qemu-devel] [PATCH v5 1/2] PCI: add missing classes in pci_ids.h to build device tree Laurent Vivier
2015-10-01  3:11   ` David Gibson
2015-09-30 15:13 ` [Qemu-devel] [PATCH v5 2/2] spapr: generate DT node names Laurent Vivier
2015-10-01  3:15   ` David Gibson [this message]

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=20151001031543.GK23574@voom \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=lvivier@redhat.com \
    --cc=mst@redhat.com \
    --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 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).