qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Name the default PCI bus "pci.0" on all archite


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH] Name the default PCI bus "pci.0" on all architectures
Date: Thu, 3 Jun 2010 12:14:33 +0200

Am 02.06.2010 um 16:12 schrieb Daniel P. Berrange:

On Fri, May 28, 2010 at 08:39:53PM +0100, Paul Brook wrote:
The system emulators for each arch are using inconsistent
naming for the default PCI bus "pci" vs "pci.0". Since it
is conceivable we'll have multiple PCI buses in the future
standardize on "pci.0" for all architectures. This ensures
mgmt apps can rely on a name when assigning PCI devices an
address on the bus using eg '-device e1000,bus=pci.0,addr=3'

No. Bus names are local to the parent device. None of the host bridges support multiple bridges, so the ".0" suffix makes no sense. The parent
device has no idea whether it owns the "default" pci bus or not.
If you have multiple PCI busses then you can identify them by the device
path.

The problem is that the ID names of default devices in machines are ABI
sensitive. Management apps need to know what the ID of these default
devices are. The x86 machines have already used 'pci.0' as their name
in the previous 0.12 release and libvirt is using this naming. We later discovered many non-x86 archs have a name of just 'pci'. We need a single consistent naming across all arches, hence this patch whcih standardizes
on 'pci.0'.

Iiuc sparc and ppc try to follow the IEEE1275 OpenFirmware naming conventions. Those should not blindly be patched to some random convention just to make them more x86-like. OpenFirmware uses address@hidden on my ppc machine. In other places, e.g. disks, numbering appears to be done locally via @0, @1, etc. See `show-devs` for a complete listing.

As suggested by Paul there are device aliases, so that in `qemu-system- ppc -cdrom /dev/null` you can run `dev pci` followed by `pwd` to see the real device name. Lacking a working `devalias`, see `dev /aliases .properties` for some more: screen, nvram, cd, cdrom, scca, sccb, adb-keyboard, adb-mouse

Andreas

The '.N' convention is used extensively in QEMU and is more
futureproof as & when QEMU supports multiple buses, without requiring
apps to use the more verbose device paths to ensure uniquness.

Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|





reply via email to

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