From bdfe6a69ef79b75300a63104f05fa3bc861de5f6 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 11 Jan 2021 10:21:53 +0000 Subject: [PATCH] virtio-devices: iommu: Update to latest version of IOMMU spec This is order to support the latest patches from https://jpbrucker.net/git/linux/commit/?h=virtio-iommu/devel&id=ddc3e6ce3f534af827a9c8f91e12a7082de8ec61 Signed-off-by: Rob Bradford --- virtio-devices/src/iommu.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/virtio-devices/src/iommu.rs b/virtio-devices/src/iommu.rs index aec386a91..03b3d3a42 100644 --- a/virtio-devices/src/iommu.rs +++ b/virtio-devices/src/iommu.rs @@ -127,10 +127,10 @@ struct VirtioIommuTopoPciRange { reserved: u8, length: u16, endpoint_start: u32, - segment: u16, + segment_start: u16, + segment_end: u16, bdf_start: u16, bdf_end: u16, - padding: u16, } unsafe impl ByteValued for VirtioIommuTopoPciRange {} @@ -831,7 +831,8 @@ impl Iommu { type_: VIRTIO_IOMMU_TOPO_PCI_RANGE, length: size_of::() as u16, endpoint_start: dev_id, - segment, + segment_start: segment, + segment_end: segment, bdf_start: dev_id as u16, bdf_end: dev_id as u16, ..Default::default()