On 05/18/2010 03:31 PM, Gerd Hoffmann wrote:
On 05/18/10 14:15, Markus Armbruster wrote:
Jan Kiszka<jan.kis...@siemens.com> writes:
Extend qbus_find_dev to allow addressing of devices without an
unique id
via an optional instance number. The new formats are 'driver.instance'
and 'alias.instance'.
Signed-off-by: Jan Kiszka<jan.kis...@siemens.com>
How's the instance number defined? Should be documented.
savevm instance id, used to identify multiple instances of some device
on loadvm. By default is just incrementing (0,1,2,...) for each new
device instance I think.
That's an implementation detail that's being exposed in an external
interface. Granted, users shouldn't expect this to remain stable across
invocations, yet it makes me uncomfortable.
Why not always use topology to locate devices?
Drivers can also specify one. Most don't do that. IIRC some ISA
drivers use the base ioport as instance id, which sort-of makes sense
as it makes sure the id identifies the correct device no matter what
the initialization order is.
It probably makes sense to replace the instance id with the device
path once all devices are converted over to qdev+vmstate, so we avoid
the nasty ordering issues altogether.
Oh, that's what you're suggesting. So we agree.
--
Do not meddle in the internals of kernels, for they are subtle and quick to
panic.