[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V2] vhost: Don't set vring call if guest notifier is unused
From: |
Stefano Garzarella |
Subject: |
Re: [PATCH V2] vhost: Don't set vring call if guest notifier is unused |
Date: |
Thu, 22 May 2025 09:44:43 +0200 |
Hi Huaitong Han,
On Thu, 22 May 2025 at 05:39, Huaitong Han <oenhan@gmail.com> wrote:
>
> Hi Stefano,
>
> I’ve implemented the version based on your suggestion. The core logic
> now looks like this:
> if (k->query_guest_notifiers &&
> !k->query_guest_notifiers(qbus->parent) &&
> virtio_queue_vector(vdev, idx) == VIRTIO_NO_VECTOR) {
> ...
> }
Which is the way it was before, right?
>
> And in virtio_pci_query_guest_notifiers():
> if (msix_enabled(&proxy->pci_dev)) {
> return false;
> } else {
> return !pci_irq_disabled(&proxy->pci_dev);
> }
>
> Although this works and preserves the original interface, I personally
> find the logic less intuitive to read.
I think I've already explained the reason for my request, but I'll try
to explain myself better.
Since we are fixing a problem, I think the patch should be as least
intrusive as possible to avoid new problems and to simplify the
backport.
So IMHO changes such as a readability improvement are not something to
be included in a patch that fixes a problem, but in a separate patch.
> if you're fine with this version, I’ll go ahead and send v3 based on it.
Yep, and if you want you can send another patch, or put both in a
series, to improve the readability. But again, I'm not sure if I
followed you about that, so if you will include the second patch,
please explain why it improves the readability.
Thanks,
Stefano