search for: virtio_iommu_resv_mem_t_reserv

Displaying 20 results from an estimated 46 matches for "virtio_iommu_resv_mem_t_reserv".

2018 Mar 23
1
[PATCH 2/4] iommu/virtio: Add probe request
...64 size = le64_to_cpu(mem->size); > + > + if (len < sizeof(*mem)) > + return -EINVAL; > + > + switch (mem->subtype) { > + case VIRTIO_IOMMU_RESV_MEM_T_MSI: > + region = iommu_alloc_resv_region(addr, size, prot, > + IOMMU_RESV_MSI); > + break; > + case VIRTIO_IOMMU_RESV_MEM_T_RESERVED: > + default: > + region = iommu_alloc_resv_region(addr, size, 0, > + IOMMU_RESV_RESERVED); > + break; > + } > + > + list_add(&vdev->resv_regions, &region->list); > + > + /* > + * Treat unknown subtype as RESERVED, but urge users to update thei...
2018 Jan 16
1
[RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request
...64 size = le64_to_cpu(mem->size); > + > + if (len < sizeof(*mem)) > + return -EINVAL; > + > + switch (mem->subtype) { > + case VIRTIO_IOMMU_RESV_MEM_T_MSI: > + region = iommu_alloc_resv_region(addr, size, prot, > + IOMMU_RESV_MSI); > + break; > + case VIRTIO_IOMMU_RESV_MEM_T_RESERVED: > + default: > + region = iommu_alloc_resv_region(addr, size, 0, > + IOMMU_RESV_RESERVED); > + break; > + } > + > + list_add(&vdev->resv_regions, &region->list); > + > + if (mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_RESERVED && > +...
2018 Jan 16
2
[RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request
...size); > + > + if (len < sizeof(*mem)) > + return -EINVAL; > + > + switch (mem->subtype) { > + case VIRTIO_IOMMU_RESV_MEM_T_MSI: > + region = iommu_alloc_resv_region(addr, size, prot, > + IOMMU_RESV_MSI); if (!region) return -ENOMEM; > + break; > + case VIRTIO_IOMMU_RESV_MEM_T_RESERVED: > + default: > + region = iommu_alloc_resv_region(addr, size, 0, > + IOMMU_RESV_RESERVED); same. There is another issue related to the exclusion of iovas belonging to reserved regions. Typically on x86, when attempting to run virtio-blk-pci with iommu I eventually saw the driver...
2018 Jan 16
2
[RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request
...size); > + > + if (len < sizeof(*mem)) > + return -EINVAL; > + > + switch (mem->subtype) { > + case VIRTIO_IOMMU_RESV_MEM_T_MSI: > + region = iommu_alloc_resv_region(addr, size, prot, > + IOMMU_RESV_MSI); if (!region) return -ENOMEM; > + break; > + case VIRTIO_IOMMU_RESV_MEM_T_RESERVED: > + default: > + region = iommu_alloc_resv_region(addr, size, 0, > + IOMMU_RESV_RESERVED); same. There is another issue related to the exclusion of iovas belonging to reserved regions. Typically on x86, when attempting to run virtio-blk-pci with iommu I eventually saw the driver...
2018 Jun 22
1
[PATCH v2 3/5] iommu/virtio: Add probe request
...IOMMU_MMIO; > + > + u64 start = le64_to_cpu(mem->start); > + u64 end = le64_to_cpu(mem->end); > + size_t size = end - start + 1; > + > + if (len < sizeof(*mem)) > + return -EINVAL; > + > + switch (mem->subtype) { > + default: > + if (mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_RESERVED && > + mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_MSI) > + dev_warn(vdev->dev, "unknown resv mem subtype 0x%x\n", > + mem->subtype); > + /* Fall-through */ > + case VIRTIO_IOMMU_RESV_MEM_T_RESERVED: > + region = iommu_alloc_resv_region(start,...
2018 Jun 21
0
[PATCH v2 3/5] iommu/virtio: Add probe request
...L; + unsigned long prot = IOMMU_WRITE | IOMMU_NOEXEC | IOMMU_MMIO; + + u64 start = le64_to_cpu(mem->start); + u64 end = le64_to_cpu(mem->end); + size_t size = end - start + 1; + + if (len < sizeof(*mem)) + return -EINVAL; + + switch (mem->subtype) { + default: + if (mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_RESERVED && + mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_MSI) + dev_warn(vdev->dev, "unknown resv mem subtype 0x%x\n", + mem->subtype); + /* Fall-through */ + case VIRTIO_IOMMU_RESV_MEM_T_RESERVED: + region = iommu_alloc_resv_region(start, size, 0, + IOMMU_RESV_R...
2018 Feb 14
0
[PATCH 2/4] iommu/virtio: Add probe request
...MIO; + + u64 addr = le64_to_cpu(mem->addr); + u64 size = le64_to_cpu(mem->size); + + if (len < sizeof(*mem)) + return -EINVAL; + + switch (mem->subtype) { + case VIRTIO_IOMMU_RESV_MEM_T_MSI: + region = iommu_alloc_resv_region(addr, size, prot, + IOMMU_RESV_MSI); + break; + case VIRTIO_IOMMU_RESV_MEM_T_RESERVED: + default: + region = iommu_alloc_resv_region(addr, size, 0, + IOMMU_RESV_RESERVED); + break; + } + + list_add(&vdev->resv_regions, &region->list); + + /* + * Treat unknown subtype as RESERVED, but urge users to update their + * driver. + */ + if (mem->subtype != VIRT...
2017 Nov 17
0
[RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request
...MIO; + + u64 addr = le64_to_cpu(mem->addr); + u64 size = le64_to_cpu(mem->size); + + if (len < sizeof(*mem)) + return -EINVAL; + + switch (mem->subtype) { + case VIRTIO_IOMMU_RESV_MEM_T_MSI: + region = iommu_alloc_resv_region(addr, size, prot, + IOMMU_RESV_MSI); + break; + case VIRTIO_IOMMU_RESV_MEM_T_RESERVED: + default: + region = iommu_alloc_resv_region(addr, size, 0, + IOMMU_RESV_RESERVED); + break; + } + + list_add(&vdev->resv_regions, &region->list); + + if (mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_RESERVED && + mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_MSI) {...
2018 Nov 15
1
[PATCH v3 6/7] iommu/virtio: Add probe request
...; + size_t size = end - start + 1; > + > + if (len < sizeof(*mem)) > + return -EINVAL; > + > + switch (mem->subtype) { > + default: > + dev_warn(vdev->dev, "unknown resv mem subtype 0x%x\n", > + mem->subtype); > + /* Fall-through */ > + case VIRTIO_IOMMU_RESV_MEM_T_RESERVED: > + region = iommu_alloc_resv_region(start, size, 0, > + IOMMU_RESV_RESERVED); need to test region > + break; > + case VIRTIO_IOMMU_RESV_MEM_T_MSI: > + region = iommu_alloc_resv_region(start, size, prot, > + IOMMU_RESV_MSI); same > + break; > + } > + &g...
2020 Apr 01
2
[RFC PATCH v2] iommu/virtio: Use page size bitmap supported by endpoint
...t; > @@ -119,6 +120,12 @@ struct virtio_iommu_probe_property { > __le16 length; > }; > > +struct virtio_iommu_probe_pgsize_mask { > + struct virtio_iommu_probe_property head; > + __u8 reserved[4]; > + __u64 pgsize_bitmap; > +}; > + > #define VIRTIO_IOMMU_RESV_MEM_T_RESERVED 0 > #define VIRTIO_IOMMU_RESV_MEM_T_MSI 1 > >
2018 Oct 12
0
[PATCH v3 6/7] iommu/virtio: Add probe request
...m->start); + u64 end = le64_to_cpu(mem->end); + size_t size = end - start + 1; + + if (len < sizeof(*mem)) + return -EINVAL; + + switch (mem->subtype) { + default: + dev_warn(vdev->dev, "unknown resv mem subtype 0x%x\n", + mem->subtype); + /* Fall-through */ + case VIRTIO_IOMMU_RESV_MEM_T_RESERVED: + region = iommu_alloc_resv_region(start, size, 0, + IOMMU_RESV_RESERVED); + break; + case VIRTIO_IOMMU_RESV_MEM_T_MSI: + region = iommu_alloc_resv_region(start, size, prot, + IOMMU_RESV_MSI); + break; + } + + list_add(&vdev->resv_regions, &region->list); + return 0...
2018 Nov 15
0
[PATCH v4 6/7] iommu/virtio: Add probe request
...start != start64 || end != end64 || size < end64 - start64) + return -EOVERFLOW; + + if (len < sizeof(*mem)) + return -EINVAL; + + switch (mem->subtype) { + default: + dev_warn(vdev->dev, "unknown resv mem subtype 0x%x\n", + mem->subtype); + /* Fall-through */ + case VIRTIO_IOMMU_RESV_MEM_T_RESERVED: + region = iommu_alloc_resv_region(start, size, 0, + IOMMU_RESV_RESERVED); + break; + case VIRTIO_IOMMU_RESV_MEM_T_MSI: + region = iommu_alloc_resv_region(start, size, prot, + IOMMU_RESV_MSI); + break; + } + if (!region) + return -ENOMEM; + + list_add(&vdev->resv_regions,...
2020 May 14
2
[PATCH v6] iommu/virtio: Use page size bitmap supported by endpoint
...t virtio_iommu_probe_property head; > + __u8 reserved[4]; > + /* Same format as virtio_iommu_config::page_size_mask */ It's actually slightly different in that this must be a superset of domain page size mask, right? > + __le64 pgsize_bitmap; > +}; > + > #define VIRTIO_IOMMU_RESV_MEM_T_RESERVED 0 > #define VIRTIO_IOMMU_RESV_MEM_T_MSI 1 > > -- > 2.17.1
2020 May 14
2
[PATCH v6] iommu/virtio: Use page size bitmap supported by endpoint
...t virtio_iommu_probe_property head; > + __u8 reserved[4]; > + /* Same format as virtio_iommu_config::page_size_mask */ It's actually slightly different in that this must be a superset of domain page size mask, right? > + __le64 pgsize_bitmap; > +}; > + > #define VIRTIO_IOMMU_RESV_MEM_T_RESERVED 0 > #define VIRTIO_IOMMU_RESV_MEM_T_MSI 1 > > -- > 2.17.1
2018 Nov 08
1
[PATCH v3 6/7] iommu/virtio: Add probe request
...; + size_t size = end - start + 1; > + > + if (len < sizeof(*mem)) > + return -EINVAL; > + > + switch (mem->subtype) { > + default: > + dev_warn(vdev->dev, "unknown resv mem subtype 0x%x\n", > + mem->subtype); > + /* Fall-through */ > + case VIRTIO_IOMMU_RESV_MEM_T_RESERVED: > + region = iommu_alloc_resv_region(start, size, 0, > + IOMMU_RESV_RESERVED); > + break; > + case VIRTIO_IOMMU_RESV_MEM_T_MSI: > + region = iommu_alloc_resv_region(start, size, prot, > + IOMMU_RESV_MSI); > + break; > + } > + > + list_add(&vdev-&...
2018 Feb 06
2
[RFC] virtio-iommu version 0.6
Please find version 0.6 of the virtio-iommu specification at the following locations. Document: http://jpbrucker.net/virtio-iommu/spec/virtio-iommu.pdf http://jpbrucker.net/virtio-iommu/spec/virtio-iommu.html Sources: git://linux-arm.org/virtio-iommu.git viommu/v0.6 I didn't receive any comment for v0.5 [1], so this update is fairly light: * Changed range definition in map and
2018 Jan 19
0
[RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request
On 16/01/18 23:26, Auger Eric wrote: [...] >> + switch (mem->subtype) { >> + case VIRTIO_IOMMU_RESV_MEM_T_MSI: >> + region = iommu_alloc_resv_region(addr, size, prot, >> + IOMMU_RESV_MSI); > if (!region) > return -ENOMEM; >> + break; >> + case VIRTIO_IOMMU_RESV_MEM_T_RESERVED: >> + default: >> + region = iommu_alloc_resv_region(addr, size, 0, >> + IOMMU_RESV_RESERVED); > same. I'll add them, thanks > There is another issue related to the exclusion of iovas belonging to > reserved regions. Typically on x86, when attempting to run...
2020 Apr 02
0
[EXT] Re: [RFC PATCH v2] iommu/virtio: Use page size bitmap supported by endpoint
...devices. We should still use __le for the other structures, including probe properties. Thanks, Jean > > Will keep __le64. > > Thanks > -Bharat > > > > > Thanks, > > Jean > > > > > > +}; > > > > + > > > > #define VIRTIO_IOMMU_RESV_MEM_T_RESERVED 0 > > > > #define VIRTIO_IOMMU_RESV_MEM_T_MSI 1 > > > >
2020 May 06
1
[PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
...roperty { > __le16 length; > }; > > +struct virtio_iommu_probe_pgsize_mask { > + struct virtio_iommu_probe_property head; > + __u8 reserved[4]; > + __le64 pgsize_bitmap; > +}; > + This is UAPI. Document the format of pgsize_bitmap please. > #define VIRTIO_IOMMU_RESV_MEM_T_RESERVED 0 > #define VIRTIO_IOMMU_RESV_MEM_T_MSI 1 > > -- > 2.17.1
2020 May 07
2
[EXT] Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
...ad; > > > + __u8 reserved[4]; > > > + __le64 pgsize_bitmap; > > > +}; > > > + > > > > This is UAPI. Document the format of pgsize_bitmap please. > > Ok, > > Thanks > -Bharat > > > > > > > > #define VIRTIO_IOMMU_RESV_MEM_T_RESERVED 0 > > > #define VIRTIO_IOMMU_RESV_MEM_T_MSI 1 > > > > > > -- > > > 2.17.1