[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is p
From: |
Hani Benhabiles |
Subject: |
Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided. |
Date: |
Wed, 8 Jan 2014 18:17:49 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Jan 08, 2014 at 08:36:06AM +0100, Markus Armbruster wrote:
> Hani Benhabiles <address@hidden> writes:
>
> > This would allow a user to be able to refer to the device when using
> > commands
> > like device_del.
> >
> > Signed-off-by: Hani Benhabiles <address@hidden>
>
> No.
>
> Device IDs belong to the user. Any IDs the system picks automatically
> can collide with the user's IDs.
>
> Management applications assume that they can pick any ID they want.
> Your patch can introduce ID collisions, and thus make existing
> configurations fail.
>
How can it lead to ID collisions ?
For this reason, the loop in assign_device_name() specifically check that the ID
doesn't exist already and uses the next value if it does.
How would something like:
(qemu) device_add virtio-net-pci
==> ID: virtio-net-pci.0
Be more problematic than:
(qemu) device_add virtio-net-pci,id=virtio-net-pci.0
> If I remember correctly, a few legacy convenience options pick IDs for
> historical reasons. If you use them, you need to be aware of the IDs
> they pick. Management applications shouldn't use them.
>
> We've discussed this a couple of times already, by the way.
- [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided., Hani Benhabiles, 2014/01/07
- Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided., Markus Armbruster, 2014/01/08
- Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided.,
Hani Benhabiles <=
- Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided., Paolo Bonzini, 2014/01/08
- Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided., Hani Benhabiles, 2014/01/09
- Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided., Paolo Bonzini, 2014/01/09
- Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided., Markus Armbruster, 2014/01/10
- Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided., Andreas Färber, 2014/01/10
- Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided., Markus Armbruster, 2014/01/10