virtio_iommu: correct tags for config space fields
authorMichael S. Tsirkin <mst@redhat.com>
Fri, 10 Jul 2020 11:17:13 +0000 (07:17 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 5 Aug 2020 15:08:40 +0000 (11:08 -0400)
Since this is a modern-only device,
tag config space fields as having little endian-ness.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
include/uapi/linux/virtio_iommu.h

index 48e3c29..237e36a 100644 (file)
 #define VIRTIO_IOMMU_F_MMIO                    5
 
 struct virtio_iommu_range_64 {
-       __u64                                   start;
-       __u64                                   end;
+       __le64                                  start;
+       __le64                                  end;
 };
 
 struct virtio_iommu_range_32 {
-       __u32                                   start;
-       __u32                                   end;
+       __le32                                  start;
+       __le32                                  end;
 };
 
 struct virtio_iommu_config {
        /* Supported page sizes */
-       __u64                                   page_size_mask;
+       __le64                                  page_size_mask;
        /* Supported IOVA range */
        struct virtio_iommu_range_64            input_range;
        /* Max domain ID size */
        struct virtio_iommu_range_32            domain_range;
        /* Probe buffer size */
-       __u32                                   probe_size;
+       __le32                                  probe_size;
 };
 
 /* Request types */