search for: page_size_mask

Displaying 20 results from an estimated 68 matches for "page_size_mask".

Did you mean: page_size_asm
2020 May 14
2
[PATCH v6] iommu/virtio: Use page size bitmap supported by endpoint
...v_mem *mem, > size_t len) > @@ -499,6 +517,9 @@ static int viommu_probe_endpoint(struct viommu_dev *viommu, struct device *dev) > case VIRTIO_IOMMU_PROBE_T_RESV_MEM: > ret = viommu_add_resv_mem(vdev, (void *)prop, len); > break; > + case VIRTIO_IOMMU_PROBE_T_PAGE_SIZE_MASK: > + ret = viommu_set_pgsize_bitmap(vdev, (void *)prop, len); > + break; > default: > dev_err(dev, "unknown viommu prop 0x%x\n", type); > } > @@ -615,7 +636,7 @@ static int viommu_domain_finalise(struct viommu_endpoint *vdev, > struct viommu_dev *viomm...
2020 May 14
2
[PATCH v6] iommu/virtio: Use page size bitmap supported by endpoint
...v_mem *mem, > size_t len) > @@ -499,6 +517,9 @@ static int viommu_probe_endpoint(struct viommu_dev *viommu, struct device *dev) > case VIRTIO_IOMMU_PROBE_T_RESV_MEM: > ret = viommu_add_resv_mem(vdev, (void *)prop, len); > break; > + case VIRTIO_IOMMU_PROBE_T_PAGE_SIZE_MASK: > + ret = viommu_set_pgsize_bitmap(vdev, (void *)prop, len); > + break; > default: > dev_err(dev, "unknown viommu prop 0x%x\n", type); > } > @@ -615,7 +636,7 @@ static int viommu_domain_finalise(struct viommu_endpoint *vdev, > struct viommu_dev *viomm...
2020 May 14
0
[PATCH v6] iommu/virtio: Use page size bitmap supported by endpoint
...#39;s not very likely that we'll have a configuration with different page sizes between physical and virtual endpoints. If there is a way for QEMU to simply reject VFIO devices that don't use the same page mask as what's configured globally, let's do that instead of introducing the page_size_mask property. > > @@ -615,7 +636,7 @@ static int viommu_domain_finalise(struct viommu_endpoint *vdev, > > struct viommu_dev *viommu = vdev->viommu; > > struct viommu_domain *vdomain = to_viommu_domain(domain); > > > > - viommu_page_size = 1UL << __ffs(viomm...
2019 Jul 22
3
[PATCH] iommu/virtio: Update to most recent specification
..._MMIO 5 -struct virtio_iommu_range { - __u64 start; - __u64 end; +struct virtio_iommu_range_64 { + __le64 start; + __le64 end; +}; + +struct virtio_iommu_range_32 { + __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 input_range; + struct virtio_iommu_range_64 input_range; /* Max domain ID size */ - __u8 domain_bits; - __u8 padding[3]; + struct virtio_iommu_range_32 domain_range; /* Probe buffer size */ - __u32...
2019 Jul 22
3
[PATCH] iommu/virtio: Update to most recent specification
..._MMIO 5 -struct virtio_iommu_range { - __u64 start; - __u64 end; +struct virtio_iommu_range_64 { + __le64 start; + __le64 end; +}; + +struct virtio_iommu_range_32 { + __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 input_range; + struct virtio_iommu_range_64 input_range; /* Max domain ID size */ - __u8 domain_bits; - __u8 padding[3]; + struct virtio_iommu_range_32 domain_range; /* Probe buffer size */ - __u32...
2020 May 13
0
[EXT] Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
.... > > I do not see uapi documentation in "Documentation" folder of other data struct in this file, am I missing something? I'm not the one requesting this change, but I'm guessing you should add a comment in this header, above pgsize_bitmap (which should actually be called page_size_mask to follow the spec). I guess I'd add: /* Same format as virtio_iommu_config::page_size_mask */ for this field, and then maybe change the comment of virtio_iommu_config, currently "/* Supported page sizes */", to something more precise such as: /* * Bitmap of supported page sizes....
2020 Aug 03
0
[PATCH v2 12/24] virtio_iommu: correct tags for config space fields
...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 */ -- MST
2020 Aug 05
0
[PATCH v3 12/38] virtio_iommu: correct tags for config space fields
...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 */ -- MST
2020 Aug 05
0
[PATCH v3 36/38] virtio-iommu: convert to LE accessors
...iommu.c b/drivers/iommu/virtio-iommu.c index f6f07489a9aa..b4da396cce60 100644 --- a/drivers/iommu/virtio-iommu.c +++ b/drivers/iommu/virtio-iommu.c @@ -1010,8 +1010,8 @@ static int viommu_probe(struct virtio_device *vdev) if (ret) return ret; - virtio_cread(vdev, struct virtio_iommu_config, page_size_mask, - &viommu->pgsize_bitmap); + virtio_cread_le(vdev, struct virtio_iommu_config, page_size_mask, + &viommu->pgsize_bitmap); if (!viommu->pgsize_bitmap) { ret = -EINVAL; @@ -1022,25 +1022,25 @@ static int viommu_probe(struct virtio_device *vdev) viommu->last_domai...
2020 Mar 11
0
[PATCH] iommu/virtio: Fix sparse warning
...5 struct virtio_iommu_range_64 { - __le64 start; - __le64 end; + __u64 start; + __u64 end; }; struct virtio_iommu_range_32 { - __le32 start; - __le32 end; + __u32 start; + __u32 end; }; struct virtio_iommu_config { /* Supported page sizes */ - __le64 page_size_mask; + __u64 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 */ - __le32 probe_size; + __u32 probe_size; }; /* Request types */ -- 2.25.1
2019 Jul 22
0
[PATCH] iommu/virtio: Update to most recent specification
...64 end; > +struct virtio_iommu_range_64 { > + __le64 start; > + __le64 end; > +}; > + > +struct virtio_iommu_range_32 { > + __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 input_range; > + struct virtio_iommu_range_64 input_range; > /* Max domain ID size */ > - __u8 domain_bits; > - __u8 padding[3]; > + struct virtio_iommu_range_32 domain_...
2019 Jul 22
0
[PATCH] iommu/virtio: Update to most recent specification
...64 end; > +struct virtio_iommu_range_64 { > + __le64 start; > + __le64 end; > +}; > + > +struct virtio_iommu_range_32 { > + __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 input_range; > + struct virtio_iommu_range_64 input_range; > /* Max domain ID size */ > - __u8 domain_bits; > - __u8 padding[3]; > + struct virtio_iommu_range_32 domain_...
2017 Apr 07
0
[RFC 2/3] virtio-iommu: device probing and operations
...F_PT_SHARING. For the moment, this bit must always be set. VIRTIO_IOMMU_F_BYPASS (3) When not attached to an address space, devices behind the IOMMU can access the physical address space. III. Device configuration layout ================================ struct virtio_iommu_config { u64 page_size_mask; struct virtio_iommu_range { u64 start; u64 end; } input_range; u8 ioasid_bits; }; IV. Device initialization ========================= 1. page_size_mask contains the bitmask of all page sizes that can be mapped. The least significant bit set defines the page granularity of...
2018 Nov 23
2
[PATCH v5 5/7] iommu: Add virtio-iommu driver
...k); > + ida_init(&viommu->domain_ids); > + viommu->dev = dev; > + viommu->vdev = vdev; > + INIT_LIST_HEAD(&viommu->requests); > + > + ret = viommu_init_vqs(viommu); > + if (ret) > + return ret; > + > + virtio_cread(vdev, struct virtio_iommu_config, page_size_mask, > + &viommu->pgsize_bitmap); > + > + if (!viommu->pgsize_bitmap) { > + ret = -EINVAL; > + goto err_free_vqs; > + } > + > + viommu->domain_bits = 32; > + > + /* Optional features */ > + virtio_cread_feature(vdev, VIRTIO_IOMMU_F_INPUT_RANGE, >...
2018 Nov 23
2
[PATCH v5 5/7] iommu: Add virtio-iommu driver
...k); > + ida_init(&viommu->domain_ids); > + viommu->dev = dev; > + viommu->vdev = vdev; > + INIT_LIST_HEAD(&viommu->requests); > + > + ret = viommu_init_vqs(viommu); > + if (ret) > + return ret; > + > + virtio_cread(vdev, struct virtio_iommu_config, page_size_mask, > + &viommu->pgsize_bitmap); > + > + if (!viommu->pgsize_bitmap) { > + ret = -EINVAL; > + goto err_free_vqs; > + } > + > + viommu->domain_bits = 32; > + > + /* Optional features */ > + virtio_cread_feature(vdev, VIRTIO_IOMMU_F_INPUT_RANGE, >...
2018 Nov 27
0
[PATCH v5 5/7] iommu: Add virtio-iommu driver
On 23/11/2018 21:48, Michael S. Tsirkin wrote: >> +struct virtio_iommu_config { >> + /* Supported page sizes */ >> + __u64 page_size_mask; >> + /* Supported IOVA range */ >> + struct virtio_iommu_range input_range; >> + /* Max domain ID size */ >> + __u8 domain_bits; >> + __u8 padding[3]; > > Not enough padding here it seems. Structure is 8 byte > aligned on 64 bit systems. The next f...
2020 Apr 13
0
[PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
...end; > }; > > +struct virtio_iommu_topo_config { > + __le32 offset; Any restrictions on offset? E.g. alignment? > + __le32 num_items; > + __le32 item_length; > +}; > + > struct virtio_iommu_config { > /* Supported page sizes */ > __le64 page_size_mask; > @@ -36,6 +43,25 @@ struct virtio_iommu_config { > struct virtio_iommu_range_32 domain_range; > /* Probe buffer size */ > __le32 probe_size; > + struct virtio_iommu_topo_config topo_config; > +}; > + > +#define VIRTIO_IOMMU_TOPO_PCI_RANGE 0x1 > +#define VIR...
2020 Aug 21
0
[PATCH v3 4/6] iommu/virtio: Add topology definitions
...tructures */ + __le16 count; + /* + * Offset to the first topology description structure + * (virtio_iommu_topo_*) from the start of the virtio_iommu config + * space. Aligned on 8 bytes. + */ + __le16 offset; +}; + struct virtio_iommu_config { /* Supported page sizes */ __le64 page_size_mask; @@ -36,6 +48,38 @@ struct virtio_iommu_config { struct virtio_iommu_range_32 domain_range; /* Probe buffer size */ __le32 probe_size; + struct virtio_iommu_topo_config topo_config; +}; + +#define VIRTIO_IOMMU_TOPO_PCI_RANGE 0x1 +#define VIRTIO_IOMMU_TOPO_MMIO 0x2 + +struct virtio_io...
2020 May 06
1
[PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
...v_mem *mem, > size_t len) > @@ -499,6 +513,9 @@ static int viommu_probe_endpoint(struct viommu_dev *viommu, struct device *dev) > case VIRTIO_IOMMU_PROBE_T_RESV_MEM: > ret = viommu_add_resv_mem(vdev, (void *)prop, len); > break; > + case VIRTIO_IOMMU_PROBE_T_PAGE_SIZE_MASK: > + ret = viommu_set_pgsize_bitmap(vdev, (void *)prop, len); > + break; > default: > dev_err(dev, "unknown viommu prop 0x%x\n", type); > } > @@ -630,7 +647,7 @@ static int viommu_domain_finalise(struct viommu_endpoint *vdev, > > vdomain->id =...
2020 May 12
1
[PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
...v_mem *mem, > size_t len) > @@ -499,6 +513,9 @@ static int viommu_probe_endpoint(struct viommu_dev *viommu, struct device *dev) > case VIRTIO_IOMMU_PROBE_T_RESV_MEM: > ret = viommu_add_resv_mem(vdev, (void *)prop, len); > break; > + case VIRTIO_IOMMU_PROBE_T_PAGE_SIZE_MASK: > + ret = viommu_set_pgsize_bitmap(vdev, (void *)prop, len); > + break; > default: > dev_err(dev, "unknown viommu prop 0x%x\n", type); > } So given this is necessary early in boot, how about we add this in the config space? And maybe ACPI too ... > @@ -...