Re: [PULL v2 09/30] virtio-mmio: fix QUEUE_NUM_MAX

Michael Tokarev <[email protected]>
Newsgroups gmane.comp.emulators.qemu.stable,gmane.comp.emulators.qemu
Message-ID <[email protected]>
On 7/29/26 02:22, Michael S. Tsirkin wrote:
> On Tue, Jul 28, 2026 at 11:17:34PM +0300, Michael Tokarev wrote:
..
>> So this whole change, for older versions, becomes just:
>>
>> --- a/hw/virtio/virtio.c
>> +++ b/hw/virtio/virtio.c
>> @@ -2572,6 +2572,8 @@ VirtQueue *virtio_add_queue(VirtIODevice *vdev, int queue_size,
>>       if (i == VIRTIO_QUEUE_MAX || queue_size > VIRTQUEUE_MAX_SIZE)
>>           abort();
>>
>> +    queue_size = VIRTQUEUE_MAX_SIZE; /* fixed properly in 11.1. */
>> +
> 
> Or you can stick to upstream and add the compat entry for 11.0.

Compat entry for 11.0 which will never be used?
With a non-obvious logic which boils down to this single line?

Or what do you mean?

BTW, can't this logic be implemented without a compat property in
the first place?  This x-override-queue-size seems like a hack.
or a.. twisted way to compare a machine version.

Can't this very place become

    if (machine_version < 11.1) {
       queue_size = VIRTQUEUE_MAX_SIZE;
    }

instead of using this indirect property?

Thanks,

/mjt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.