OSDN Git Service

virtio-iommu: Fix endianness in get_config
authorEric Auger <eric.auger@redhat.com>
Sat, 27 Nov 2021 07:29:08 +0000 (08:29 +0100)
committerThomas Huth <thuth@redhat.com>
Wed, 15 Dec 2021 07:08:59 +0000 (08:08 +0100)
commit3a411b2d9660234c8b6855d1b2861085a4ee5943
tree959521f508dfe479d034f75f35066461efdbd133
parent7b140d23598650326b2bdefbf2b134eacf995d31
virtio-iommu: Fix endianness in get_config

Endianess is not properly handled when populating
the returned config. Use the cpu_to_le* primitives
for each separate field. Also, while at it, trace
the domain range start.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Message-Id: <20211127072910.1261824-3-eric.auger@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/virtio/trace-events
hw/virtio/virtio-iommu.c