On 23 October 2023 10:30:02 BST, Igor Mammedov <imammedo@xxxxxxxxxx> wrote: >On Wed, 18 Oct 2023 09:32:47 +0100 >David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote: > >> On Wed, 2023-10-18 at 09:32 +0200, Igor Mammedov wrote: >> > On Mon, 16 Oct 2023 16:19:08 +0100 >> > David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote: >> > >> > > From: David Woodhouse <dwmw@xxxxxxxxxxxx> >> > > >> > >> > is this index a user (guest) visible? >> >> Yes. It defines what block device (e.g. /dev/xvda) the disk appears as >> in the guest. In the common case, it literally encodes the Linux >> major/minor numbers. So xvda (major 202) is 0xca00, xvdb is 0xca10 etc. > >that makes 'index' an implicit ABI and a subject to versioning >when the way it's assigned changes (i.e. one has to use versioned >machine types to keep older versions working the they used to). > >From what I remember it's discouraged to make QEMU invent >various IDs that are part of ABI (guest or mgmt side). >Instead it's preferred for mgmt side/user to provide that explicitly. > >Basically you are trading off manageability/simplicity at QEMU >level with CLI usability for human user. >I don't care much as long as it is hidden within xen code base, >but maybe libvirt does. Well, it can still be set explicitly. So not so much a "trade-off" as adding the option for the user to choose the simple way. Yes, in a way it's an ABI, just like the dynamic assignment of PCI devfn for network devices added with "-nic". And I think also for virtio block devices too? And for the ISA ne2000. But it seems unlikely that we'll ever really want to change "the first one is xvda, the second is xvdb...."