From: Cornelia Huck <cohuck@redhat.com>
To: Halil Pasic <pasic@linux.ibm.com>
Cc: "Carlos López" <clopez@suse.de>,
qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
"Eric Farman" <farman@linux.ibm.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"David Hildenbrand" <david@redhat.com>,
"Ilya Leoshkevich" <iii@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Thomas Huth" <thuth@redhat.com>,
"open list:virtio-ccw" <qemu-s390x@nongnu.org>,
"Halil Pasic" <pasic@linux.ibm.com>
Subject: Re: [PATCH v2] virtio: refresh vring region cache after updating a virtqueue size
Date: Mon, 27 Mar 2023 09:37:58 +0200 [thread overview]
Message-ID: <87a5zyskyx.fsf@redhat.com> (raw)
In-Reply-To: <20230324130036.2c4db781.pasic@linux.ibm.com>
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.
next prev parent reply other threads:[~2023-03-27 7:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 0:27 [PATCH v2] virtio: refresh vring region cache after updating a virtqueue size Carlos López
2023-03-22 9:52 ` Cornelia Huck
2023-03-22 17:24 ` Halil Pasic
2023-03-24 12:00 ` Halil Pasic
2023-03-27 7:37 ` Cornelia Huck [this message]
2023-03-27 11:06 ` Cornelia Huck
2023-03-27 12:29 ` Michael S. Tsirkin
2023-03-27 12:55 ` Halil Pasic
2023-03-27 12:55 ` Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a5zyskyx.fsf@redhat.com \
--to=cohuck@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=clopez@suse.de \
--cc=david@redhat.com \
--cc=farman@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=mst@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).