On 22/06/18 01:55, Michael S. Tsirkin wrote:
>> +#define VIRTIO_IOMMU_RESV_MEM_T_RESERVED 0
>> +#define VIRTIO_IOMMU_RESV_MEM_T_MSI 1
>> +
>> +struct virtio_iommu_probe_resv_mem {
>> + __u8 subtype;
>> + __u8 reserved[3];
>> + __le64 start;
>> + __le64 end;
>> +} __packed;
>
>
> start/end are not aligned you need to pad more.
The complete structure is actually the 32-bit header
virtio_iommu_probe_property, followed by the content
virtio_iommu_probe_resv_mem:
struct {
le16 type
le16 length
u8 subtype
u8 reserved[3]
le64 start
le64 end
};
I'll redefine virtio_iommu_probe_resv_mem to include this header.
Otherwise, without __packed, a compiler introduces padding when
concatenating header and content.
Thanks,
Jean
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu