search for: kaddr

Displaying 20 results from an estimated 84 matches for "kaddr".

Did you mean: addr
2023 Mar 21
1
[PATCH v3 3/8] vringh: replace kmap_atomic() with kmap_local_page()
...ns(+), 4 deletions(-) diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c index a1e27da54481..0ba3ef809e48 100644 --- a/drivers/vhost/vringh.c +++ b/drivers/vhost/vringh.c @@ -1220,10 +1220,10 @@ static inline int getu16_iotlb(const struct vringh *vrh, if (ret < 0) return ret; - kaddr = kmap_atomic(iov.bv_page); + kaddr = kmap_local_page(iov.bv_page); from = kaddr + iov.bv_offset; *val = vringh16_to_cpu(vrh, READ_ONCE(*(__virtio16 *)from)); - kunmap_atomic(kaddr); + kunmap_local(kaddr); return 0; } @@ -1241,10 +1241,10 @@ static inline int putu16_iotlb(const struct vrin...
2023 Mar 21
1
[PATCH v3 4/8] vringh: support VA with iotlb
...} ret = copy_to_iter(src, translated, &iter); if (ret < 0) @@ -1210,20 +1260,37 @@ static inline int copy_to_iotlb(const struct vringh *vrh, void *dst, static inline int getu16_iotlb(const struct vringh *vrh, u16 *val, const __virtio16 *p) { - struct bio_vec iov; - void *kaddr, *from; + struct iotlb_vec ivec; + union { + struct iovec iovec[1]; + struct bio_vec bvec[1]; + } iov; + __virtio16 tmp; int ret; + ivec.iov.iovec = iov.iovec; + ivec.count = 1; + ivec.is_iovec = vrh->use_va; + /* Atomic read is needed for getu16 */ - ret = iotlb_translate(vrh, (u64)(uin...
2023 Mar 21
5
[PATCH v3 0/8] vdpa_sim: add support for user VA
This series adds support for the use of user virtual addresses in the vDPA simulator devices. The main reason for this change is to lift the pinning of all guest memory. Especially with virtio devices implemented in software. The next step would be to generalize the code in vdpa-sim to allow the implementation of in-kernel software devices. Similar to vhost, but using vDPA so we can reuse the
2008 Oct 27
0
[PATCH 4/4] linux/i386: utilize hypervisor highmem handling helpers
...10-24.orig/arch/i386/mm/highmem-xen.c 2008-10-27 11:56:39.000000000 +0100 +++ head-2008-10-24/arch/i386/mm/highmem-xen.c 2008-10-27 11:56:59.000000000 +0100 @@ -151,9 +151,56 @@ struct page *kmap_atomic_to_page(void *p return pte_page(*pte); } +void clear_highpage(struct page *page) +{ + void *kaddr; + + if (likely(xen_feature(XENFEAT_highmem_assist)) + && PageHighMem(page)) { + struct mmuext_op meo; + + meo.cmd = MMUEXT_CLEAR_PAGE; + meo.arg1.mfn = pfn_to_mfn(page_to_pfn(page)); + if (HYPERVISOR_mmuext_op(&meo, 1, NULL, DOMID_SELF) == 0) + return; + } + + kaddr = kmap_at...
2023 Mar 23
1
[PATCH v3 4/8] vringh: support VA with iotlb
...ret < 0) > @@ -1210,20 +1260,37 @@ static inline int copy_to_iotlb(const struct vringh *vrh, void *dst, > static inline int getu16_iotlb(const struct vringh *vrh, > u16 *val, const __virtio16 *p) > { > - struct bio_vec iov; > - void *kaddr, *from; > + struct iotlb_vec ivec; > + union { > + struct iovec iovec[1]; > + struct bio_vec bvec[1]; > + } iov; > + __virtio16 tmp; > int ret; > > + ivec.iov.iovec = iov.iovec; > + ivec.count = 1;...
2023 Mar 02
8
[PATCH v2 0/8] vdpa_sim: add support for user VA
v2: - rebased on Linus' tree, commit ae3419fbac84 ("vc_screen: don't clobber return value in vcs_read") - removed `struct task_struct *owner` param (unused for now, maybe ?useful to support cgroups) [Jason] - add unbind_mm callback [Jason] - call the new unbind_mm callback during the release [Jason] - avoid to call bind_mm callback after the reset, since the device ?is not
2023 Apr 04
9
[PATCH v5 0/9] vdpa_sim: add support for user VA
This series adds support for the use of user virtual addresses in the vDPA simulator devices. The main reason for this change is to lift the pinning of all guest memory. Especially with virtio devices implemented in software. The next step would be to generalize the code in vdpa-sim to allow the implementation of in-kernel software devices. Similar to vhost, but using vDPA so we can reuse the
2020 Jul 28
0
[vhost:vhost 38/45] include/linux/vdpa.h:43:21: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token
...cluded from include/linux/kernel.h:11, from drivers/vhost/vdpa.c:14: include/linux/scatterlist.h: In function 'sg_set_buf': arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra] 169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory) | ^~ include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0)...
2017 Nov 30
1
[PATCH v18 06/10] virtio_ring: add a new API, virtqueue_add_one_desc
On Wed, Nov 29, 2017 at 09:55:22PM +0800, Wei Wang wrote: > Current virtqueue_add API implementation is based on the scatterlist > struct, which uses kaddr. This is inadequate to all the use case of > vring. For example: > - Some usages don't use IOMMU, in this case the user can directly pass > in a physical address in hand, instead of going through the sg > implementation (e.g. the VIRTIO_BALLOON_F_SG feature) > - Sometimes, a...
2017 Nov 30
1
[PATCH v18 06/10] virtio_ring: add a new API, virtqueue_add_one_desc
On Wed, Nov 29, 2017 at 09:55:22PM +0800, Wei Wang wrote: > Current virtqueue_add API implementation is based on the scatterlist > struct, which uses kaddr. This is inadequate to all the use case of > vring. For example: > - Some usages don't use IOMMU, in this case the user can directly pass > in a physical address in hand, instead of going through the sg > implementation (e.g. the VIRTIO_BALLOON_F_SG feature) > - Sometimes, a...
2019 Mar 12
0
[RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()
On Tue, Mar 12, 2019 at 03:02:54PM -0700, James Bottomley wrote: > I'm sure there must be workarounds elsewhere in the other arch code > otherwise things like this, which appear all over drivers/, wouldn't > work: > > drivers/scsi/isci/request.c:1430 > > kaddr = kmap_atomic(page); > memcpy(kaddr + sg->offset, src_addr, copy_len); > kunmap_atomic(kaddr); > Are you sure "page" is an userland page with an alias address? sg->page_link = (unsigned long)virt_to_page(addr); page_link seems to point to kernel memory. I found an a...
2013 Aug 29
23
[PATCH] Btrfs: optimize key searches in btrfs_search_slot
...c 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -2426,6 +2426,59 @@ done: return ret; } +static int key_search(struct extent_buffer *b, struct btrfs_key *key, + int level, int *prev_cmp, int *slot) +{ + unsigned long eb_offset = 0; + unsigned long len_left = b->len; + char *kaddr = NULL; + unsigned long map_start = 0; + unsigned long map_len = 0; + unsigned long offset; + struct btrfs_disk_key *k = NULL; + struct btrfs_disk_key unaligned; + + if (*prev_cmp != 0) { + *prev_cmp = bin_search(b, key, level, slot); + return *prev_cmp; + } + + if (level == 0) + offset = offset...
2019 May 13
2
[Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag
...pgmap && pgmap->type == MEMORY_DEVICE_FS_DAX + && pfn_t_to_page(pfn)->pgmap == pgmap + && pfn_t_to_page(end_pfn)->pgmap == pgmap + && pfn_t_to_pfn(pfn) == PHYS_PFN(__pa(kaddr)) + && pfn_t_to_pfn(end_pfn) == PHYS_PFN(__pa(end_kaddr))) dax_enabled = true; put_dev_pagemap(pgmap); Thanks, Pankaj
2019 May 13
2
[Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag
...pgmap && pgmap->type == MEMORY_DEVICE_FS_DAX + && pfn_t_to_page(pfn)->pgmap == pgmap + && pfn_t_to_page(end_pfn)->pgmap == pgmap + && pfn_t_to_pfn(pfn) == PHYS_PFN(__pa(kaddr)) + && pfn_t_to_pfn(end_pfn) == PHYS_PFN(__pa(end_kaddr))) dax_enabled = true; put_dev_pagemap(pgmap); Thanks, Pankaj
2020 Jul 03
0
[RFC]: mm,power: introduce MADV_WIPEONSUSPEND
...addr = vma->vm_start; > + nr_pages = (vma->vm_end - addr - 1) / PAGE_SIZE + 1; > + while (nr_pages) { > + int count = min(nr_pages, max_pages_per_loop); > + void *kaddr; > + > + count = get_user_pages_remote(p, mm, addr, > + count, gup_flags, > + pages, NULL, NULL); get_user_pages_remote() can wait for disk I/O (for...
2009 Jul 13
1
[PATCH 1/1] adds mlogs to aops.c
...S2_I(inode)->ip_clusters); + mlog(ML_ERROR, "Size %llu, clusters %u\n", + (unsigned long long)i_size_read(inode), + OCFS2_I(inode)->ip_clusters); dump_stack(); } @@ -217,11 +219,16 @@ int ocfs2_read_inline_data(struct inode *inode, struct page *page, void *kaddr; loff_t size; struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data; + int status = 0; + + mlog_entry("(%llu, %lu, %llu)\n", OCFS2_I(inode)->ip_blkno, + page->index, (unsigned long long)di_bh->b_blocknr); if (!(le16_to_cpu(di->i_dyn_features) & OCFS...
2019 Dec 26
7
[PATCH v2 0/6] KVM: arm64: VCPU preempted check support
This patch set aims to support the vcpu_is_preempted() functionality under KVM/arm64, which allowing the guest to obtain the VCPU is currently running or not. This will enhance lock performance on overcommitted hosts (more runnable VCPUs than physical CPUs in the system) as doing busy waits for preempted VCPUs will hurt system performance far worse than early yielding. We have observed some
2009 Jul 21
1
(no subject)
...S2_I(inode)->ip_clusters); + mlog(ML_ERROR, "Size %llu, clusters %u\n", + (unsigned long long)i_size_read(inode), + OCFS2_I(inode)->ip_clusters); dump_stack(); } @@ -217,11 +219,17 @@ int ocfs2_read_inline_data(struct inode *inode, struct page *page, void *kaddr; loff_t size; struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data; + int status = 0; + + mlog_entry("(%llu, %lu, %llu)\n", + (unsigned long long)OCFS2_I(inode)->ip_blkno, + page->index, (unsigned long long)di_bh->b_blocknr); if (!(le16_to_cpu(di->...
2017 Nov 29
0
[PATCH v18 06/10] virtio_ring: add a new API, virtqueue_add_one_desc
Current virtqueue_add API implementation is based on the scatterlist struct, which uses kaddr. This is inadequate to all the use case of vring. For example: - Some usages don't use IOMMU, in this case the user can directly pass in a physical address in hand, instead of going through the sg implementation (e.g. the VIRTIO_BALLOON_F_SG feature) - Sometimes, a guest physical page may n...
2019 Sep 06
0
[vhost:linux-next 13/15] arch/ia64/include/asm/page.h:51:23: warning: "hpage_shift" is not defined, evaluates to 0
...c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 94 #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 95 ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 96 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 97 ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 98 #ifdef CONFIG_VIRTUAL_MEM_MAP ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005...