[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] virtio: refresh vring region cache after updating a virtq
From: |
Cornelia Huck |
Subject: |
Re: [PATCH v2] virtio: refresh vring region cache after updating a virtqueue size |
Date: |
Mon, 27 Mar 2023 09:37:58 +0200 |
User-agent: |
Notmuch/0.37 (https://notmuchmail.org) |
On Fri, Mar 24 2023, Halil Pasic <pasic@linux.ibm.com> wrote:
> On Wed, 22 Mar 2023 18:24:33 +0100
> Halil Pasic <pasic@linux.ibm.com> wrote:
>
>> > > --- a/hw/s390x/virtio-ccw.c
>> > > +++ b/hw/s390x/virtio-ccw.c
>> > > @@ -237,6 +237,7 @@ static int virtio_ccw_set_vqs(SubchDev *sch,
>> > > VqInfoBlock *info,
>> > > return -EINVAL;
>> > > }
>> > > virtio_queue_set_num(vdev, index, num);
>> > > + virtio_init_region_cache(vdev, index);
>> >
>> > Hmm... this is not wrong, but looking at it again, I see that the guest
>> > has no way to change num after our last call to
>> > virtio_init_region_cache() (while setting up the queue addresses.) IOW,
>> > this introduces an extra round trip that is not really needed.
>> >
>>
>> I don't quite understand. AFAIU the virtio_init_region_cache() would see
>> the (new) queue addresses but not the new size (num). Yes virtio-ccw
>> already knows the new num but it is yet to call
>> to put it into vdev->vq[n].vring.num from where
>> virtio_init_region_cache() picks it up.
>>
>> If we were to first virtio_queue_set_num() and only then the address
>> I would understand. But with the code as is, I don't. Am I missing
>> something?
>
> Connie: have you had a chance to have yet another look at this? I
> would like to understand the reason for seeing this differently.
I'm just back from being sick, please give me some time to work through
my backlog.
Re: [PATCH v2] virtio: refresh vring region cache after updating a virtqueue size, Cornelia Huck, 2023/03/27