Re: [PATCH v2] vdpa: Fix endian bugs in shadow virtqueue

2025-02-14 Thread Konstantin Shkolnyy
On 2/13/2025 20:24, Lei Yang wrote: vdpa's regression tests

Re: [PATCH v2] vdpa: Fix endian bugs in shadow virtqueue

2025-02-14 Thread Konstantin Shkolnyy
On 2/13/2025 20:24, Lei Yang wrote: I tested this patch with vdpa's regression tests, everything works fine. Tested-by: Lei Yang Could you point me to those tests?

Re: [PATCH] vdpa: Allow vDPA to work on big-endian machine

2025-02-12 Thread Konstantin Shkolnyy
On 2/12/2025 12:07, Philippe Mathieu-Daudé wrote: On 12/2/25 18:24, Konstantin Shkolnyy wrote: On 2/12/2025 08:52, Philippe Mathieu-Daudé wrote: On 11/2/25 17:19, Konstantin Shkolnyy wrote: Add .set_vnet_le() function that always returns success, assuming that vDPA h/w always implements LE

Re: [PATCH] vdpa: Allow vDPA to work on big-endian machine

2025-02-12 Thread Konstantin Shkolnyy
On 2/12/2025 08:52, Philippe Mathieu-Daudé wrote: On 11/2/25 17:19, Konstantin Shkolnyy wrote: Add .set_vnet_le() function that always returns success, assuming that vDPA h/w always implements LE data format. Otherwise, QEMU disables vDPA and outputs the message: "backend does not suppo

[PATCH v2] vdpa: Fix endian bugs in shadow virtqueue

2025-02-12 Thread Konstantin Shkolnyy
VDPA didn't work on a big-endian machine due to missing/incorrect CPU<->LE data format conversions. Signed-off-by: Konstantin Shkolnyy --- Changes in v2: Change desc_next[] from LE format to "CPU". hw/virtio/vhost-shadow-virtqueue.c | 18 ++ 1 file changed

Re: [PATCH] vdpa: Fix endian bugs in shadow virtqueue

2025-02-12 Thread Konstantin Shkolnyy
On 2/12/2025 09:06, Eugenio Perez Martin wrote: -i = cpu_to_le16(svq->desc_next[i]); +i = le16_to_cpu(svq->desc_next[i]); Both svq->desc_next and "i" are in QEMU. We can skip the conversion and assign directly. Are you saying that desc_next[] should be in "CPU" and not LE form

Re: [PATCH] vdpa: Allow vDPA to work on big-endian machine

2025-02-12 Thread Konstantin Shkolnyy
On 2/12/2025 07:38, Eugenio Perez Martin wrote: On Tue, Feb 11, 2025 at 5:20 PM Konstantin Shkolnyy wrote: Add .set_vnet_le() function that always returns success, assuming that vDPA h/w always implements LE data format. Otherwise, QEMU disables vDPA and outputs the message: "backend doe

[PATCH] vdpa: Allow vDPA to work on big-endian machine

2025-02-11 Thread Konstantin Shkolnyy
Add .set_vnet_le() function that always returns success, assuming that vDPA h/w always implements LE data format. Otherwise, QEMU disables vDPA and outputs the message: "backend does not support LE vnet headers; falling back on userspace virtio" Signed-off-by: Konstantin Shkolnyy ---

[PATCH] vdpa: Fix endian bugs in shadow virtqueue

2025-02-11 Thread Konstantin Shkolnyy
VDPA didn't work on a big-endian machine due to missing/incorrect CPU<->LE data format conversions. Signed-off-by: Konstantin Shkolnyy --- hw/virtio/vhost-shadow-virtqueue.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hw/virtio/vhost-shadow-