/linux/include/linux/ |
H A D | iova.h | 33 unsigned long granule; /* pfn granularity for this domain */ member 50 return __ffs(iovad->granule); in iova_shift() 55 return iovad->granule - 1; in iova_mask() 65 return ALIGN(size, iovad->granule); in iova_align() 70 return ALIGN_DOWN(size, iovad->granule); in iova_align_down() 100 void init_iova_domain(struct iova_domain *iovad, unsigned long granule, 153 unsigned long granule, in init_iova_domain() argument
|
H A D | io-pgtable.h | 43 void (*tlb_flush_walk)(unsigned long iova, size_t size, size_t granule, 46 unsigned long iova, size_t granule, void *cookie); 281 size_t size, size_t granule) in io_pgtable_tlb_flush_walk() argument 284 iop->cfg.tlb->tlb_flush_walk(iova, size, granule, iop->cookie); in io_pgtable_tlb_flush_walk() 290 size_t granule) in io_pgtable_tlb_add_page() argument 293 iop->cfg.tlb->tlb_add_page(gather, iova, granule, iop->cookie); in io_pgtable_tlb_add_page()
|
H A D | map_benchmark.h | 29 __u32 granule; /* how many PAGE_SIZE will do map/unmap once a time */ member
|
/linux/drivers/virt/coco/arm-cca-guest/ |
H A D | arm-cca-guest.c | 21 * @granule: PA of the granule to which the token will be written 22 * @offset: Offset within granule to start of buffer in bytes 28 phys_addr_t granule; member 64 info->result = rsi_attestation_token_continue(info->granule, in arm_cca_attestation_continue() 139 info.granule = (unsigned long)virt_to_phys(buf); in arm_cca_report_new() 147 * Schedule a call to retrieve a sub-granule chunk in arm_cca_report_new() 167 * Copy the retrieved token data from the granule in arm_cca_report_new()
|
/linux/arch/arm64/include/asm/ |
H A D | rsi_cmds.h | 132 * @granule: {I}PA of the Granule to which the token will be written. 147 static inline unsigned long rsi_attestation_token_continue(phys_addr_t granule, in rsi_attestation_token_continue() argument 155 granule, offset, size, 0, &res); in rsi_attestation_token_continue()
|
/linux/Documentation/virt/kvm/arm/ |
H A D | hypercalls.rst | 67 | | | | memory protection granule in bytes | 74 permissions. The size of the region is equal to the memory protection granule 100 memory protection granule advertised by ``ARM_SMCCC_KVM_FUNC_HYP_MEMINFO``. 125 region is equal to the memory protection granule advertised by
|
/linux/drivers/iommu/ |
H A D | msm_iommu.c | 139 size_t granule, bool leaf, void *cookie) in __flush_iotlb_range() argument 159 iova += granule; in __flush_iotlb_range() 160 } while (temp_size -= granule); in __flush_iotlb_range() 171 size_t granule, void *cookie) in __flush_iotlb_walk() argument 173 __flush_iotlb_range(iova, size, granule, false, cookie); in __flush_iotlb_walk() 177 unsigned long iova, size_t granule, void *cookie) in __flush_iotlb_page() argument 179 __flush_iotlb_range(iova, granule, granule, true, cookie); in __flush_iotlb_page()
|
H A D | io-pgtable-arm.c | 877 unsigned long granule, page_sizes; in arm_lpae_restrict_pgsizes() local 882 * translation regime for a particular granule. Aim to match in arm_lpae_restrict_pgsizes() 885 * chosen granule. in arm_lpae_restrict_pgsizes() 888 granule = PAGE_SIZE; in arm_lpae_restrict_pgsizes() 890 granule = 1UL << __fls(cfg->pgsize_bitmap & ~PAGE_MASK); in arm_lpae_restrict_pgsizes() 892 granule = 1UL << __ffs(cfg->pgsize_bitmap & PAGE_MASK); in arm_lpae_restrict_pgsizes() 894 granule = 0; in arm_lpae_restrict_pgsizes() 896 switch (granule) { in arm_lpae_restrict_pgsizes() 1105 sl++; /* SL0 format is different for 4K granule size */ in arm_64_lpae_alloc_pgtable_s2() 1281 size_t granule, voi in dummy_tlb_flush() argument 1288 dummy_tlb_add_page(struct iommu_iotlb_gather * gather,unsigned long iova,size_t granule,void * cookie) dummy_tlb_add_page() argument [all...] |
H A D | iova.c | 38 init_iova_domain(struct iova_domain *iovad, unsigned long granule, in init_iova_domain() argument 46 BUG_ON((granule > PAGE_SIZE) || !is_power_of_2(granule)); in init_iova_domain() 52 iovad->granule = granule; in init_iova_domain()
|
H A D | io-pgtable-arm-v7s.c | 786 size_t granule, void *cookie) in dummy_tlb_flush() argument 793 unsigned long iova, size_t granule, in dummy_tlb_add_page() argument 796 dummy_tlb_flush(iova, granule, granule, cookie); in dummy_tlb_add_page() 850 * Distinct mappings of different granule sizes. in arm_v7s_do_selftests()
|
H A D | virtio-iommu.c | 406 unsigned long granule = 1UL << __ffs(vdomain->domain.pgsize_bitmap); in viommu_domain_map_identity() local 408 iova = ALIGN(iova, granule); in viommu_domain_map_identity() 409 limit = ALIGN_DOWN(limit + 1, granule) - 1; in viommu_domain_map_identity() 412 u64 resv_start = ALIGN_DOWN(resv->start, granule); in viommu_domain_map_identity() 413 u64 resv_end = ALIGN(resv->start + resv->length, granule) - 1; in viommu_domain_map_identity() 668 "granule 0x%lx larger than system page size 0x%lx\n", in viommu_domain_alloc_paging()
|
H A D | dma-iommu.c | 428 if (cookie->iovad.granule) { in iommu_put_dma_cookie() 491 start += iovad->granule; in cookie_init_hw_msi_region() 691 if (1UL << order != iovad->granule || in iommu_dma_init_domain() 1184 * the IOMMU granule. Returns non-zero if either the start or end 1185 * address is not aligned to the granule boundary. 1886 size_t bounce_len = min(size, iovad->granule - iova_start_pad); in iommu_dma_iova_link_swiotlb() 2007 end - addr, iovad->granule - iova_start_pad); in iommu_dma_iova_unlink_range_slow() 2126 return domain->iova_cookie->iovad.granule; in cookie_msi_granule()
|
H A D | ipmmu-vmsa.c | 317 size_t granule, void *cookie) in ipmmu_tlb_flush() argument
|
/linux/drivers/iommu/arm/arm-smmu/ |
H A D | qcom_iommu.c | 148 size_t granule, bool leaf, void *cookie) in qcom_iommu_tlb_inv_range_nosync() argument 164 iova += granule; in qcom_iommu_tlb_inv_range_nosync() 165 } while (s -= granule); in qcom_iommu_tlb_inv_range_nosync() 170 size_t granule, void *cookie) in qcom_iommu_tlb_flush_walk() argument 172 qcom_iommu_tlb_inv_range_nosync(iova, size, granule, false, cookie); in qcom_iommu_tlb_flush_walk() 177 unsigned long iova, size_t granule, in qcom_iommu_tlb_add_page() argument 180 qcom_iommu_tlb_inv_range_nosync(iova, granule, granule, true, cookie); in qcom_iommu_tlb_add_page()
|
H A D | arm-smmu.c | 282 size_t granule, void *cookie, int reg) in arm_smmu_tlb_inv_range_s1() argument 297 iova += granule; in arm_smmu_tlb_inv_range_s1() 298 } while (size -= granule); in arm_smmu_tlb_inv_range_s1() 304 iova += granule >> 12; in arm_smmu_tlb_inv_range_s1() 305 } while (size -= granule); in arm_smmu_tlb_inv_range_s1() 310 size_t granule, void *cookie, int reg) in arm_smmu_tlb_inv_range_s2() argument 325 iova += granule >> 12; in arm_smmu_tlb_inv_range_s2() 326 } while (size -= granule); in arm_smmu_tlb_inv_range_s2() 330 size_t granule, void *cookie) in arm_smmu_tlb_inv_walk_s1() argument 338 arm_smmu_tlb_inv_range_s1(iova, size, granule, cooki in arm_smmu_tlb_inv_walk_s1() 345 arm_smmu_tlb_add_page_s1(struct iommu_iotlb_gather * gather,unsigned long iova,size_t granule,void * cookie) arm_smmu_tlb_add_page_s1() argument 353 arm_smmu_tlb_inv_walk_s2(unsigned long iova,size_t size,size_t granule,void * cookie) arm_smmu_tlb_inv_walk_s2() argument 361 arm_smmu_tlb_add_page_s2(struct iommu_iotlb_gather * gather,unsigned long iova,size_t granule,void * cookie) arm_smmu_tlb_add_page_s2() argument 369 arm_smmu_tlb_inv_walk_s2_v1(unsigned long iova,size_t size,size_t granule,void * cookie) arm_smmu_tlb_inv_walk_s2_v1() argument 381 arm_smmu_tlb_add_page_s2_v1(struct iommu_iotlb_gather * gather,unsigned long iova,size_t granule,void * cookie) arm_smmu_tlb_add_page_s2_v1() argument [all...] |
/linux/kernel/dma/ |
H A D | map_benchmark.c | 39 int npages = map->bparam.granule; in map_benchmark_thread() 236 if (map->bparam.granule < 1 || map->bparam.granule > 1024) { in map_benchmark_ioctl() 237 pr_err("invalid granule size\n"); in map_benchmark_ioctl()
|
/linux/arch/powerpc/boot/dts/ |
H A D | microwatt.dts | 119 reservation-granule-size = <64>; 149 reservation-granule-size = <64>;
|
/linux/drivers/gpu/drm/msm/ |
H A D | msm_iommu.c | 361 * and determined at creation time based on the granule size. 414 * and determined at creation time based on the granule size. 455 size_t granule, void *cookie) in msm_iommu_tlb_flush_walk() argument 465 pagetable->tlb->tlb_flush_walk(iova, size, granule, (void *)adreno_smmu->cookie); in msm_iommu_tlb_flush_walk() 471 unsigned long iova, size_t granule, void *cookie) in msm_iommu_tlb_add_page() argument
|
/linux/Documentation/arch/arm64/ |
H A D | memory-tagging-extension.rst | 19 allocation tag for each 16-byte granule in the physical address space. 197 4-bit tag per byte and correspond to a 16-byte MTE tag granule in the 200 **Note**: If ``addr`` is not aligned to a 16-byte granule, the kernel 247 in a byte. With the tag granule of 16 bytes, a 4K page requires 128
|
/linux/arch/arm64/kvm/hyp/nvhe/ |
H A D | mem_protect.c | 482 u64 granule; in host_stage2_adjust_range() local 503 granule = kvm_granule_size(level); in host_stage2_adjust_range() 504 cur.start = ALIGN_DOWN(addr, granule); in host_stage2_adjust_range() 505 cur.end = cur.start + granule; in host_stage2_adjust_range()
|
/linux/Documentation/core-api/ |
H A D | swiotlb.rst | 53 granule, other parts of the granule may contain unrelated kernel data. Since 54 IOMMU access control is per-granule, the untrusted device can gain access to 136 devices. It is set to the granule size - 1 so that the bounce buffer is 189 granule size, and granules cannot be larger than PAGE_SIZE. But if that were to
|
/linux/Documentation/dev-tools/ |
H A D | kasan.rst | 250 Internally, KASAN tracks memory state separately for each memory granule, which 255 For Generic KASAN, the size of each memory granule is 8. The state of each 256 granule is encoded in one shadow byte. Those 8 bytes can be accessible,
|
/linux/drivers/gpu/drm/panfrost/ |
H A D | panfrost_mmu.c | 496 static void mmu_tlb_flush_walk(unsigned long iova, size_t size, size_t granule, in mmu_tlb_flush_walk() argument
|
/linux/Documentation/admin-guide/mm/ |
H A D | nommu-mmap.rst | 118 granule but will only discard the excess if appropriately configured as
|
/linux/drivers/gpu/drm/panthor/ |
H A D | panthor_mmu.c | 426 * and determined at creation time based on the granule size. 454 * 4k granule size at init time. in alloc_pt() 486 * and determined at creation time based on the granule size. 1619 static void mmu_tlb_flush_walk(unsigned long iova, size_t size, size_t granule, void *cookie) in mmu_tlb_flush_walk() argument
|