qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 11/12] hw/xen: automatically assign device index to block dev


From: David Woodhouse
Subject: Re: [PATCH 11/12] hw/xen: automatically assign device index to block devices
Date: Mon, 23 Oct 2023 10:42:58 +0100
User-agent: K-9 Mail for Android


On 23 October 2023 10:30:02 BST, Igor Mammedov <imammedo@redhat.com> wrote:
>On Wed, 18 Oct 2023 09:32:47 +0100
>David Woodhouse <dwmw2@infradead.org> 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@infradead.org> wrote:
>> >   
>> > > From: David Woodhouse <dwmw@amazon.co.uk>
>> > >   
>> > 
>> > 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...."



reply via email to

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