search for: map_page

Displaying 20 results from an estimated 134 matches for "map_page".

2020 Feb 04
2
[PATCH 5/5] vdpasim: vDPA device simulator
On 2020/2/4 ??4:21, Zhu Lingshan wrote: >> +static const struct dma_map_ops vdpasim_dma_ops = { >> +??? .map_page = vdpasim_map_page, >> +??? .unmap_page = vdpasim_unmap_page, >> +??? .alloc = vdpasim_alloc_coherent, >> +??? .free = vdpasim_free_coherent, >> +}; >> + > > Hey Jason, > > IMHO, it would be nice if dma_ops of the parent device could be > re-used. vdpa_...
2020 Feb 04
2
[PATCH 5/5] vdpasim: vDPA device simulator
On 2020/2/4 ??4:21, Zhu Lingshan wrote: >> +static const struct dma_map_ops vdpasim_dma_ops = { >> +??? .map_page = vdpasim_map_page, >> +??? .unmap_page = vdpasim_unmap_page, >> +??? .alloc = vdpasim_alloc_coherent, >> +??? .free = vdpasim_free_coherent, >> +}; >> + > > Hey Jason, > > IMHO, it would be nice if dma_ops of the parent device could be > re-used. vdpa_...
2019 Aug 09
6
[RFC PATCH v6 71/92] mm: add support for remote mapping
...wc->rmap_one(page, vma, address, rwc->arg)) + break; + + if (rwc->done && rwc->done(page)) + break; + } + anon_vma_unlock_read(anon_vma); + } +} + +static int mm_remote_invalidate_pte(struct vm_area_struct *map_vma, + unsigned long map_hva, pmd_t *map_pmd, struct page *map_page) +{ + struct mm_struct *map_mm = map_vma->vm_mm; + struct mmu_notifier_range range; + unsigned long mmun_start; + unsigned long mmun_end; + pte_t *ptep; + spinlock_t *ptl; + swp_entry_t entry; + int result = 0; + + mmun_start = map_hva; + mmun_end = map_hva + PAGE_SIZE; + mmu_notifier_range_init...
2020 Sep 15
0
[PATCH 15/18] dma-mapping: add a new dma_alloc_pages API
...arm_nommu_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist const struct dma_map_ops arm_nommu_dma_ops = { .alloc = arm_nommu_dma_alloc, .free = arm_nommu_dma_free, + .alloc_pages = dma_direct_alloc_pages, + .free_pages = dma_direct_free_pages, .mmap = arm_nommu_dma_mmap, .map_page = arm_nommu_dma_map_page, .unmap_page = arm_nommu_dma_unmap_page, diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 8a8949174b1c06..7738b4d23f692f 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -199,6 +199,8 @@ static int arm_dma_supported(struc...
2015 Oct 30
0
[PATCH 2/3] alpha: use common noop dma ops
...(struct device *dev, size_t size, return ret; } -static void alpha_noop_free_coherent(struct device *dev, size_t size, - void *cpu_addr, dma_addr_t dma_addr, - struct dma_attrs *attrs) -{ - free_pages((unsigned long)cpu_addr, get_order(size)); -} - -static dma_addr_t alpha_noop_map_page(struct device *dev, struct page *page, - unsigned long offset, size_t size, - enum dma_data_direction dir, - struct dma_attrs *attrs) -{ - return page_to_pa(page) + offset; -} - -static int alpha_noop_map_sg(struct device *dev, struct scatterlist *sgl, int nents, -...
2015 Nov 05
0
[GIT PULL v4 2/3] alpha/dma: use common noop dma ops
...(struct device *dev, size_t size, return ret; } -static void alpha_noop_free_coherent(struct device *dev, size_t size, - void *cpu_addr, dma_addr_t dma_addr, - struct dma_attrs *attrs) -{ - free_pages((unsigned long)cpu_addr, get_order(size)); -} - -static dma_addr_t alpha_noop_map_page(struct device *dev, struct page *page, - unsigned long offset, size_t size, - enum dma_data_direction dir, - struct dma_attrs *attrs) -{ - return page_to_pa(page) + offset; -} - -static int alpha_noop_map_sg(struct device *dev, struct scatterlist *sgl, int nents, -...
2018 Jul 30
1
[RFC 1/4] virtio: Define virtio_direct_dma_ops structure
...devices which would not > + * either bring in their own DMA OPS from architecture or they would not > + * like to use architecture specific IOMMU based DMA OPS because QEMU > + * expects GPA instead of an IOVA in absence of VIRTIO_F_IOMMU_PLATFORM. > + */ > +dma_addr_t virtio_direct_map_page(struct device *dev, struct page *page, > + unsigned long offset, size_t size, > + enum dma_data_direction dir, > + unsigned long attrs) All these functions should probably be marked static. > +void virtio_direct_unmap_page(struct device *hwdev, dma_addr_t dev_addr, &...
2023 Sep 04
1
[PATCH 2/2] iommu/virtio: Add ops->flush_iotlb_all and enable deferred flush
...uct device *dev, enum iommu_cap cap) > switch (cap) { > case IOMMU_CAP_CACHE_COHERENCY: > return true; > + case IOMMU_CAP_DEFERRED_FLUSH: > + return true; > default: > return false; > } > @@ -1069,6 +1080,7 @@ static struct iommu_ops viommu_ops = { > .map_pages = viommu_map_pages, > .unmap_pages = viommu_unmap_pages, > .iova_to_phys = viommu_iova_to_phys, > + .flush_iotlb_all = viommu_flush_iotlb_all, > .iotlb_sync = viommu_iotlb_sync, > .iotlb_sync_map = viommu_iotlb_sync_map, > .free = viommu_domain_free, >...
2013 Oct 17
42
[PATCH v8 0/19] enable swiotlb-xen on arm and arm64
...i all, this patch series enables xen-swiotlb on arm and arm64. It has been heavily reworked compared to the previous versions in order to achieve better performances and to address review comments. We are not using dma_mark_clean to ensure coherency anymore. We call the platform implementation of map_page and unmap_page. We assume that dom0 has been mapped 1:1 (physical address == machine address), that is what Xen on ARM currently does. As a consequence we only use the swiotlb to handle dma requests involving pages corresponding to grant refs. Obviously these pages cannot be part of the 1:1 becaus...
2020 Aug 19
0
[PATCH 19/28] dma-mapping: replace DMA_ATTR_NON_CONSISTENT with dma_{alloc, free}_pages
...arm_nommu_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist const struct dma_map_ops arm_nommu_dma_ops = { .alloc = arm_nommu_dma_alloc, .free = arm_nommu_dma_free, + .alloc_pages = dma_direct_alloc_pages, + .free_pages = dma_direct_free_pages, .mmap = arm_nommu_dma_mmap, .map_page = arm_nommu_dma_map_page, .unmap_page = arm_nommu_dma_unmap_page, diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 8a8949174b1c06..7738b4d23f692f 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -199,6 +199,8 @@ static int arm_dma_supported(struc...
2015 Nov 05
5
[GIT PULL v4 0/3] dma and virtio prep patches
Andy, to make it obvious which version is the latest, here is a branch The following changes since commit 6a13feb9c82803e2b815eca72fa7a9f5561d7861: Linux 4.3 (2015-11-01 16:05:25 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/borntraeger/linux.git dma for you to fetch changes up to fc7f9754db6ce0c12281da4055281f731d36bdee: s390/dma: Allow
2015 Nov 05
5
[GIT PULL v4 0/3] dma and virtio prep patches
Andy, to make it obvious which version is the latest, here is a branch The following changes since commit 6a13feb9c82803e2b815eca72fa7a9f5561d7861: Linux 4.3 (2015-11-01 16:05:25 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/borntraeger/linux.git dma for you to fetch changes up to fc7f9754db6ce0c12281da4055281f731d36bdee: s390/dma: Allow
2015 Nov 03
5
[PATCHv3 0/3] dma ops and virtio
Andy, this is the next and hopefully last version. Seems to work fine when replacing the previous patches in your tree. I have some reviews/acks for patch 2 and 3. patch 1 still needs one ack. Can you replace the patches in your tree and carry them along with your changes? old introduction: ----- There are some attempts to unify the dma ops (Christoph) as well as some attempts to make virtio use
2015 Nov 03
5
[PATCHv3 0/3] dma ops and virtio
Andy, this is the next and hopefully last version. Seems to work fine when replacing the previous patches in your tree. I have some reviews/acks for patch 2 and 3. patch 1 still needs one ack. Can you replace the patches in your tree and carry them along with your changes? old introduction: ----- There are some attempts to unify the dma ops (Christoph) as well as some attempts to make virtio use
2008 May 19
21
[PATCH 0/5] VT-d support for PV guests
...es in one place. The changes currently hook into get_page_type() in xen/arch/x86/mm.c to map/unmap IOMMU pages when the page types change. This might not be the apropriate place to hook these calls. The patches I''ve added are as follows: xen-vtd-unmap.patch --- Make the VT-d iommu_unmap_page() code actually do something close to useful. xen-ptab-dump.path --- There''s no point in using ''current'' when an IOMMU page fault is raised. Also, add some page type statistics for DomPage debug output. xen-iommu-pv.patch --- Add support for...
2015 Oct 30
8
[PATCHv2 0/3] dma ops and virtio
here is the 2nd version of providing an DMA API for s390. There are some attempts to unify the dma ops (Christoph) as well as some attempts to make virtio use the dma API (Andy). At kernel summit we concluded that we want to use the same code on all platforms, whereever possible, so having a dummy dma_op might be the easiest solution to keep virtio-ccw as similar as possible to
2015 Oct 30
8
[PATCHv2 0/3] dma ops and virtio
here is the 2nd version of providing an DMA API for s390. There are some attempts to unify the dma ops (Christoph) as well as some attempts to make virtio use the dma API (Andy). At kernel summit we concluded that we want to use the same code on all platforms, whereever possible, so having a dummy dma_op might be the easiest solution to keep virtio-ccw as similar as possible to
2023 Sep 06
1
[PATCH 2/2] iommu/virtio: Add ops->flush_iotlb_all and enable deferred flush
...urn true; > > > > + case IOMMU_CAP_DEFERRED_FLUSH: > > > > + return true; > > > > default: > > > > return false; > > > > } > > > > @@ -1069,6 +1080,7 @@ static struct iommu_ops viommu_ops = { > > > > .map_pages = viommu_map_pages, > > > > .unmap_pages = viommu_unmap_pages, > > > > .iova_to_phys = viommu_iova_to_phys, > > > > + .flush_iotlb_all = viommu_flush_iotlb_all, > > > > .iotlb_sync = viommu_iotlb_sync, > > > > .iotlb_...
2023 Sep 06
1
[PATCH 2/2] iommu/virtio: Add ops->flush_iotlb_all and enable deferred flush
...urn true; > > > > + case IOMMU_CAP_DEFERRED_FLUSH: > > > > + return true; > > > > default: > > > > return false; > > > > } > > > > @@ -1069,6 +1080,7 @@ static struct iommu_ops viommu_ops = { > > > > .map_pages = viommu_map_pages, > > > > .unmap_pages = viommu_unmap_pages, > > > > .iova_to_phys = viommu_iova_to_phys, > > > > + .flush_iotlb_all = viommu_flush_iotlb_all, > > > > .iotlb_sync = viommu_iotlb_sync, > > > > .iotlb_...
2016 Jun 15
0
[PATCH v7 00/12] Support non-lru page migration
...lock_irqrestore+0x47/0x5c [ 315.147195] [<ffffffff812275b1>] ? isolate_freepages_block+0x2f9/0x5a6 [ 315.147213] [<ffffffff8127f15c>] ? kasan_poison_shadow+0x2f/0x31 [ 315.147230] [<ffffffff8127f66a>] ? kasan_alloc_pages+0x39/0x3b [ 315.147246] [<ffffffff812267e6>] ? map_pages+0x1f3/0x3ad [ 315.147262] [<ffffffff812265f3>] ? update_pageblock_skip+0x18d/0x18d [ 315.147280] [<ffffffff81115972>] ? up_read+0x1a/0x30 [ 315.147296] [<ffffffff8111ec7e>] ? debug_check_no_locks_freed+0x150/0x22b [ 315.147315] [<ffffffff812842d1>] move_to_new_page+...