|
From: | Gerd Hoffmann |
Subject: | Re: [Qemu-devel] [PATCH 04/13] qdev: add generic qdev_device_add() |
Date: | Tue, 14 Jul 2009 09:40:57 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2 |
On 07/10/09 22:51, Paul Brook wrote:
I think this is going in the wrong direction. The device tree provides us with a standard way of identifying which bus to add a device to. We should be removing uses of pci_create, not adding new ones.Why? Let me guess: Because pci bus numbers are guest-changeable and thus not stable?Because I don't think this code need to be bus specific.
Parts of the problem are certainly bus-specific though, such as parsing bus addresses.
We also need to figure out the naming of multiple similar devices on the same bus. Possibly your "device id" could be used to identify devices on a bus. e.g. if we wanted two scsi adapters: -device lsi,bus=pci0,id=foo -device lsi,bus=pci0,id=bar -device scsi-disk,bus=pci0/foo/scsi -device scsi-disk,bus=pci0/bar/scsi
I think what we will see used in practice is: - either go with the defaults (i.e. don't specify a bus at all -> device is attached to the first (and often only) pci/scsi/usb/whatever bus. - or usage of ids to identify devices and busses. I think nobody will use stuff like -device scsi-disk,bus=/main-system-bus/i440FX-pcihost/pci/lsi/scsi in practice. cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |