On 2/6/26 2:18 PM, Pierrick Bouvier wrote:
This series eliminates target specifics in hw/virtio and replace them with
runtime functions where needed.

Performance has been measured with this automated fio benchmark [1], with
original instructions from Stefan [2].

Download artifacts and run benchmark with:
$ wget 
https://github.com/pbo-linaro/qemu-linux-stack/releases/download/build/x86_64_io_benchmark-a55f2d6.tar.xz
$ tar xvf x86_64_io_benchmark-a55f2d6.tar.xz
$ ./run.sh /path/to/qemu-system-x86_64

[1] https://github.com/pbo-linaro/qemu-linux-stack/tree/x86_64_io_benchmark
[2] https://lore.kernel.org/qemu-devel/20260202185233.GC405548@fedora/

Results are on 20 runs and expressed in kIOPS:
reference: mean=239.2 std_dev=3.48
with_series: mean=238.5 std_dev=3.46

Performance is on par, and within standard deviation.

v5
--

- Fix missing vdev->access_is_big_endian when features are set
- No difference in performance since hot path is not modified
- Simplified virtio_access_is_big_endian

v4
--

- Include Philippe patches computing once device endianness to skip runtime
   checks on every access.

Philippe Mathieu-Daudé (3):
   hw/virtio: Constify virtio_is_big_endian() argument
   hw/virtio: Introduce VirtIODevice::access_is_big_endian boolean field
   hw/virtio: Use VirtIODevice::access_is_big_endian field

Pierrick Bouvier (6):
   include/hw/virtio/virtio-access.h: remove target specifics define
   include/hw/virtio/virtio-access.h: simplify
     virtio_access_is_big_endian
   include/hw/ppc/spapr: extract SPAPR_MAX_RAM_SLOTS in a new header
   hw/virtio/vhost-user: make compilation unit common
   hw/virtio/virtio-qmp: make compilation unit common
   hw/virtio/: make all compilation units common

  include/hw/ppc/spapr.h            |  8 +---
  include/hw/ppc/spapr_common.h     | 16 +++++++
  include/hw/virtio/virtio-access.h | 43 +++++++++----------
  include/hw/virtio/virtio.h        |  7 +++-
  hw/virtio/vhost-user.c            | 11 ++---
  hw/virtio/virtio-qmp.c            | 70 -------------------------------
  hw/virtio/virtio.c                |  9 +++-
  hw/virtio/meson.build             | 17 ++++----
  8 files changed, 60 insertions(+), 121 deletions(-)
  create mode 100644 include/hw/ppc/spapr_common.h


Sent another series focusing on refactoring include/hw/virtio/virtio-access.h:
https://lore.kernel.org/qemu-devel/[email protected]/T/#t

Comments are welcome, and hopefully will help us to move forward with this.

Regards,
Pierrick

Reply via email to