search for: pgsize_bitmap

Displaying 20 results from an estimated 125 matches for "pgsize_bitmap".

2020 Apr 01
2
[RFC PATCH v2] iommu/virtio: Use page size bitmap supported by endpoint
...; index cce329d71fba..c794cb5b7b3e 100644 > --- a/drivers/iommu/virtio-iommu.c > +++ b/drivers/iommu/virtio-iommu.c > @@ -78,6 +78,7 @@ struct viommu_endpoint { > struct viommu_dev *viommu; > struct viommu_domain *vdomain; > struct list_head resv_regions; > + u64 pgsize_bitmap; > }; > > struct viommu_request { > @@ -415,6 +416,20 @@ static int viommu_replay_mappings(struct viommu_domain *vdomain) > return ret; > } > > +static int viommu_set_pgsize_bitmap(struct viommu_endpoint *vdev, > + struct virtio_iommu_probe_pgsize_ma...
2020 May 06
1
[PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
...> index d5cac4f46ca5..9513d2ab819e 100644 > --- a/drivers/iommu/virtio-iommu.c > +++ b/drivers/iommu/virtio-iommu.c > @@ -78,6 +78,7 @@ struct viommu_endpoint { > struct viommu_dev *viommu; > struct viommu_domain *vdomain; > struct list_head resv_regions; > + u64 pgsize_bitmap; > }; > > struct viommu_request { > @@ -415,6 +416,19 @@ static int viommu_replay_mappings(struct viommu_domain *vdomain) > return ret; > } > > +static int viommu_set_pgsize_bitmap(struct viommu_endpoint *vdev, > + struct virtio_iommu_probe_pgsize_mask *ma...
2020 May 14
2
[PATCH v6] iommu/virtio: Use page size bitmap supported by endpoint
...- property length before dereference > - Error out on no supported page sizes (page-size-mask is zero) > - Allow device to attach to domain even it supports > minimum of domain supported page sizes. In that case device > will use domain page sizes only. > - added format of pgsize_bitmap > > v4->v5: > - Rebase to Linux v5.7-rc4 > > v3->v4: > - Fix whitespace error > > v2->v3: > - Fixed error return for incompatible endpoint > - __u64 changed to __le64 in header file > > drivers/iommu/virtio-iommu.c | 63 ++++++++++++++++++++...
2020 May 14
2
[PATCH v6] iommu/virtio: Use page size bitmap supported by endpoint
...- property length before dereference > - Error out on no supported page sizes (page-size-mask is zero) > - Allow device to attach to domain even it supports > minimum of domain supported page sizes. In that case device > will use domain page sizes only. > - added format of pgsize_bitmap > > v4->v5: > - Rebase to Linux v5.7-rc4 > > v3->v4: > - Fix whitespace error > > v2->v3: > - Fixed error return for incompatible endpoint > - __u64 changed to __le64 in header file > > drivers/iommu/virtio-iommu.c | 63 ++++++++++++++++++++...
2020 May 07
2
[EXT] Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
...ers/iommu/virtio-iommu.c > > > +++ b/drivers/iommu/virtio-iommu.c > > > @@ -78,6 +78,7 @@ struct viommu_endpoint { > > > struct viommu_dev *viommu; > > > struct viommu_domain *vdomain; > > > struct list_head resv_regions; > > > + u64 pgsize_bitmap; > > > }; > > > > > > struct viommu_request { > > > @@ -415,6 +416,19 @@ static int viommu_replay_mappings(struct > > viommu_domain *vdomain) > > > return ret; > > > } > > > > > > +static int viommu_set_pgsize_bitmap...
2020 May 12
1
[PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
...> index d5cac4f46ca5..9513d2ab819e 100644 > --- a/drivers/iommu/virtio-iommu.c > +++ b/drivers/iommu/virtio-iommu.c > @@ -78,6 +78,7 @@ struct viommu_endpoint { > struct viommu_dev *viommu; > struct viommu_domain *vdomain; > struct list_head resv_regions; > + u64 pgsize_bitmap; > }; > > struct viommu_request { > @@ -415,6 +416,19 @@ static int viommu_replay_mappings(struct viommu_domain *vdomain) > return ret; > } > > +static int viommu_set_pgsize_bitmap(struct viommu_endpoint *vdev, > + struct virtio_iommu_probe_pgsize_mask *ma...
2020 May 07
0
[EXT] Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
...; --- a/drivers/iommu/virtio-iommu.c >>> +++ b/drivers/iommu/virtio-iommu.c >>> @@ -78,6 +78,7 @@ struct viommu_endpoint { >>> struct viommu_dev *viommu; >>> struct viommu_domain *vdomain; >>> struct list_head resv_regions; >>> + u64 pgsize_bitmap; >>> }; >>> >>> struct viommu_request { >>> @@ -415,6 +416,19 @@ static int viommu_replay_mappings(struct >> viommu_domain *vdomain) >>> return ret; >>> } >>> >>> +static int viommu_set_pgsize_bitmap(struct viommu_en...
2020 May 07
0
[EXT] Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
...rtio-iommu.c >>>> +++ b/drivers/iommu/virtio-iommu.c >>>> @@ -78,6 +78,7 @@ struct viommu_endpoint { >>>> struct viommu_dev *viommu; >>>> struct viommu_domain *vdomain; >>>> struct list_head resv_regions; >>>> + u64 pgsize_bitmap; >>>> }; >>>> >>>> struct viommu_request { >>>> @@ -415,6 +416,19 @@ static int viommu_replay_mappings(struct >>> viommu_domain *vdomain) >>>> return ret; >>>> } >>>> >>>> +static int viomm...
2019 Jul 22
3
[PATCH] iommu/virtio: Update to most recent specification
...* Virtio driver for the paravirtualized IOMMU * - * Copyright (C) 2018 Arm Limited + * Copyright (C) 2019 Arm Limited */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt @@ -47,7 +47,10 @@ struct viommu_dev { /* Device configuration */ struct iommu_domain_geometry geometry; u64 pgsize_bitmap; - u8 domain_bits; + u32 first_domain; + u32 last_domain; + /* Supported MAP flags */ + u32 map_flags; u32 probe_size; }; @@ -62,6 +65,7 @@ struct viommu_domain { struct viommu_dev *viommu; struct mutex mutex; /* protects viommu pointer */ unsigned int id; + u32 ma...
2019 Jul 22
3
[PATCH] iommu/virtio: Update to most recent specification
...* Virtio driver for the paravirtualized IOMMU * - * Copyright (C) 2018 Arm Limited + * Copyright (C) 2019 Arm Limited */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt @@ -47,7 +47,10 @@ struct viommu_dev { /* Device configuration */ struct iommu_domain_geometry geometry; u64 pgsize_bitmap; - u8 domain_bits; + u32 first_domain; + u32 last_domain; + /* Supported MAP flags */ + u32 map_flags; u32 probe_size; }; @@ -62,6 +65,7 @@ struct viommu_domain { struct viommu_dev *viommu; struct mutex mutex; /* protects viommu pointer */ unsigned int id; + u32 ma...
2019 Jul 22
0
[PATCH] iommu/virtio: Update to most recent specification
...* > - * Copyright (C) 2018 Arm Limited > + * Copyright (C) 2019 Arm Limited > */ > > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > @@ -47,7 +47,10 @@ struct viommu_dev { > /* Device configuration */ > struct iommu_domain_geometry geometry; > u64 pgsize_bitmap; > - u8 domain_bits; > + u32 first_domain; > + u32 last_domain; > + /* Supported MAP flags */ > + u32 map_flags; > u32 probe_size; > }; > > @@ -62,6 +65,7 @@ struct viommu_domain { > struct viommu_dev *viommu; > struct mutex mutex; /* prot...
2019 Jul 22
0
[PATCH] iommu/virtio: Update to most recent specification
...* > - * Copyright (C) 2018 Arm Limited > + * Copyright (C) 2019 Arm Limited > */ > > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > @@ -47,7 +47,10 @@ struct viommu_dev { > /* Device configuration */ > struct iommu_domain_geometry geometry; > u64 pgsize_bitmap; > - u8 domain_bits; > + u32 first_domain; > + u32 last_domain; > + /* Supported MAP flags */ > + u32 map_flags; > u32 probe_size; > }; > > @@ -62,6 +65,7 @@ struct viommu_domain { > struct viommu_dev *viommu; > struct mutex mutex; /* prot...
2020 May 14
0
[PATCH v6] iommu/virtio: Use page size bitmap supported by endpoint
...rty. > > @@ -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(viommu->pgsize_bitmap); > > + viommu_page_size = 1UL << __ffs(vdev->pgsize_bitmap); > > if (viommu_page_size > PAGE_SIZE) { > > dev_err(vdev->dev, > > "granule 0x%lx larger than system page size 0x%lx\n", > > > Looks like this is messed up on 32 bit: e...
2020 May 13
0
[EXT] Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
...t.com > > Subject: [EXT] Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by > > endpoint [...] > > > +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. > > 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,...
2020 Aug 05
0
[PATCH v3 36/38] virtio-iommu: convert to LE accessors
...ndex 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_domain = ~0U; /* Optional features */ -...
2018 Oct 12
3
[PATCH v3 5/7] iommu: Add virtio-iommu driver
...; > + struct virtio_device *vdev; > + > + struct ida domain_ids; > + > + struct virtqueue *vqs[VIOMMU_NR_VQS]; > + spinlock_t request_lock; > + struct list_head requests; > + > + /* Device configuration */ > + struct iommu_domain_geometry geometry; > + u64 pgsize_bitmap; > + u8 domain_bits; > +}; > + > +struct viommu_mapping { > + phys_addr_t paddr; > + struct interval_tree_node iova; > + u32 flags; > +}; > + > +struct viommu_domain { > + struct iommu_domain domain; > + struct viommu_dev *viommu; > + struct mutex...
2018 Oct 12
3
[PATCH v3 5/7] iommu: Add virtio-iommu driver
...; > + struct virtio_device *vdev; > + > + struct ida domain_ids; > + > + struct virtqueue *vqs[VIOMMU_NR_VQS]; > + spinlock_t request_lock; > + struct list_head requests; > + > + /* Device configuration */ > + struct iommu_domain_geometry geometry; > + u64 pgsize_bitmap; > + u8 domain_bits; > +}; > + > +struct viommu_mapping { > + phys_addr_t paddr; > + struct interval_tree_node iova; > + u32 flags; > +}; > + > +struct viommu_domain { > + struct iommu_domain domain; > + struct viommu_dev *viommu; > + struct mutex...
2018 Nov 22
0
[PATCH v5 5/7] iommu: Add virtio-iommu driver
...{ + struct iommu_device iommu; + struct device *dev; + struct virtio_device *vdev; + + struct ida domain_ids; + + struct virtqueue *vqs[VIOMMU_NR_VQS]; + spinlock_t request_lock; + struct list_head requests; + + /* Device configuration */ + struct iommu_domain_geometry geometry; + u64 pgsize_bitmap; + u8 domain_bits; +}; + +struct viommu_mapping { + phys_addr_t paddr; + struct interval_tree_node iova; + u32 flags; +}; + +struct viommu_domain { + struct iommu_domain domain; + struct viommu_dev *viommu; + struct mutex mutex; /* protects viommu pointer */ + unsigned int id; + + spi...
2018 Nov 15
0
[PATCH v4 5/7] iommu: Add virtio-iommu driver
...{ + struct iommu_device iommu; + struct device *dev; + struct virtio_device *vdev; + + struct ida domain_ids; + + struct virtqueue *vqs[VIOMMU_NR_VQS]; + spinlock_t request_lock; + struct list_head requests; + + /* Device configuration */ + struct iommu_domain_geometry geometry; + u64 pgsize_bitmap; + u8 domain_bits; +}; + +struct viommu_mapping { + phys_addr_t paddr; + struct interval_tree_node iova; + u32 flags; +}; + +struct viommu_domain { + struct iommu_domain domain; + struct viommu_dev *viommu; + struct mutex mutex; + unsigned int id; + + spinlock_t mappings_lock; + str...
2018 Jun 21
0
[PATCH v2 2/5] iommu: Add virtio-iommu driver
...{ + struct iommu_device iommu; + struct device *dev; + struct virtio_device *vdev; + + struct ida domain_ids; + + struct virtqueue *vqs[VIOMMU_NR_VQS]; + spinlock_t request_lock; + struct list_head requests; + + /* Device configuration */ + struct iommu_domain_geometry geometry; + u64 pgsize_bitmap; + u8 domain_bits; +}; + +struct viommu_mapping { + phys_addr_t paddr; + struct interval_tree_node iova; + u32 flags; +}; + +struct viommu_domain { + struct iommu_domain domain; + struct viommu_dev *viommu; + struct mutex mutex; + unsigned int id; + + spinlock_t mappings_lock; + str...