[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 80/91] virtio: remove virtio_tswap16s() call in vring_packed_event
From: |
Michael S. Tsirkin |
Subject: |
[PULL 80/91] virtio: remove virtio_tswap16s() call in vring_packed_event_read() |
Date: |
Tue, 2 Jul 2024 10:11:06 -0400 |
From: Stefano Garzarella <sgarzare@redhat.com>
Commit d152cdd6f6 ("virtio: use virtio accessor to access packed event")
switched using of address_space_read_cached() to virito_lduw_phys_cached()
to access packed descriptor event.
When we used address_space_read_cached(), we needed to call
virtio_tswap16s() to handle the endianess of the field, but
virito_lduw_phys_cached() already handles it internally, so we no longer
need to call virtio_tswap16s() (as the commit had done for `off_wrap`,
but forgot for `flags`).
Fixes: d152cdd6f6 ("virtio: use virtio accessor to access packed event")
Cc: jasowang@redhat.com
Cc: qemu-stable@nongnu.org
Reported-by: Xoykie <xoykie@gmail.com>
Link:
https://lore.kernel.org/qemu-devel/CAFU8RB_pjr77zMLsM0Unf9xPNxfr_--Tjr49F_eX32ZBc5o2zQ@mail.gmail.com
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20240701075208.19634-1-sgarzare@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eugenio PĂ©rez <eperezma@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio/virtio.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 3678ec2f88..583a224163 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -323,7 +323,6 @@ static void vring_packed_event_read(VirtIODevice *vdev,
/* Make sure flags is seen before off_wrap */
smp_rmb();
e->off_wrap = virtio_lduw_phys_cached(vdev, cache, off_off);
- virtio_tswap16s(vdev, &e->flags);
}
static void vring_packed_off_wrap_write(VirtIODevice *vdev,
--
MST
- [PULL 66/91] qtest: bios-tables-test: Rename aarch64 tests with aarch64 in them, (continued)
- [PULL 66/91] qtest: bios-tables-test: Rename aarch64 tests with aarch64 in them, Michael S. Tsirkin, 2024/07/02
- [PULL 64/91] uefi-test-tools: Add support for python based build script, Michael S. Tsirkin, 2024/07/02
- [PULL 67/91] tests/qtest/bios-tables-test.c: Add support for arch in path, Michael S. Tsirkin, 2024/07/02
- [PULL 70/91] tests/data/acpi: Move x86 ACPI tables under x86/${machine} path, Michael S. Tsirkin, 2024/07/02
- [PULL 71/91] tests/data/acpi/virt: Move ARM64 ACPI tables under aarch64/${machine} path, Michael S. Tsirkin, 2024/07/02
- [PULL 74/91] tests/data/acpi/rebuild-expected-aml.sh: Add RISC-V, Michael S. Tsirkin, 2024/07/02
- [PULL 72/91] meson.build: Add RISC-V to the edk2-target list, Michael S. Tsirkin, 2024/07/02
- [PULL 73/91] pc-bios/meson.build: Add support for RISC-V in unpack_edk2_blobs, Michael S. Tsirkin, 2024/07/02
- [PULL 85/91] pcie_sriov: Do not manually unrealize, Michael S. Tsirkin, 2024/07/02
- [PULL 65/91] tests/data/uefi-boot-images: Add RISC-V ISO image, Michael S. Tsirkin, 2024/07/02
- [PULL 80/91] virtio: remove virtio_tswap16s() call in vring_packed_event_read(),
Michael S. Tsirkin <=
- [PULL 69/91] tests/qtest/bios-tables-test.c: Set "arch" for x86 tests, Michael S. Tsirkin, 2024/07/02
- [PULL 68/91] tests/qtest/bios-tables-test.c: Set "arch" for aarch64 tests, Michael S. Tsirkin, 2024/07/02
- [PULL 76/91] tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V, Michael S. Tsirkin, 2024/07/02
- [PULL 75/91] tests/qtest/bios-tables-test: Add empty ACPI data files for RISC-V, Michael S. Tsirkin, 2024/07/02
- [PULL 79/91] hw/cxl/events: Mark cxl-add-dynamic-capacity and cxl-release-dynamic-capcity unstable, Michael S. Tsirkin, 2024/07/02
- [PULL 78/91] hw/cxl/events: Improve QMP interfaces and documentation for add/release dynamic capacity., Michael S. Tsirkin, 2024/07/02
- [PULL 88/91] pcie_sriov: Release VFs failed to realize, Michael S. Tsirkin, 2024/07/02
- [PULL 77/91] tests/qtest/bios-tables-test: Add expected ACPI data files for RISC-V, Michael S. Tsirkin, 2024/07/02
- [PULL 81/91] virtio-iommu: Clear IOMMUDevice when VFIO device is unplugged, Michael S. Tsirkin, 2024/07/02
- [PULL 82/91] hw/pci: Rename has_power to enabled, Michael S. Tsirkin, 2024/07/02