search for: __kmalloc_fake

Displaying 20 results from an estimated 27 matches for "__kmalloc_fake".

2020 Apr 06
0
[PATCH v4 09/12] tools/virtio: switch to virtio_legacy_init/size
...ZE, __user_addr_min, ALIGN); vringh_init_user(&vrh, vdev.features, RINGSIZE, true, vrh.vring.desc, vrh.vring.avail, vrh.vring.used); @@ -506,7 +506,7 @@ int main(int argc, char *argv[]) sgs[1] = &guest_sg[1]; /* May allocate an indirect, so force it to allocate user addr */ - __kmalloc_fake = __user_addr_min + vring_size(RINGSIZE, ALIGN); + __kmalloc_fake = __user_addr_min + vring_legacy_size(RINGSIZE, ALIGN); err = virtqueue_add_sgs(vq, sgs, 1, 1, &err, GFP_KERNEL); if (err) errx(1, "virtqueue_add_sgs: %i", err); @@ -556,7 +556,7 @@ int main(int argc, char *argv[...
2020 Apr 06
0
[PATCH v4 09/12] tools/virtio: switch to virtio_legacy_init/size
...ZE, __user_addr_min, ALIGN); vringh_init_user(&vrh, vdev.features, RINGSIZE, true, vrh.vring.desc, vrh.vring.avail, vrh.vring.used); @@ -506,7 +506,7 @@ int main(int argc, char *argv[]) sgs[1] = &guest_sg[1]; /* May allocate an indirect, so force it to allocate user addr */ - __kmalloc_fake = __user_addr_min + vring_size(RINGSIZE, ALIGN); + __kmalloc_fake = __user_addr_min + vring_legacy_size(RINGSIZE, ALIGN); err = virtqueue_add_sgs(vq, sgs, 1, 1, &err, GFP_KERNEL); if (err) errx(1, "virtqueue_add_sgs: %i", err); @@ -556,7 +556,7 @@ int main(int argc, char *argv[...
2020 Apr 06
0
[PATCH v5 09/12] tools/virtio: switch to virtio_legacy_init/size
...ZE, __user_addr_min, ALIGN); vringh_init_user(&vrh, vdev.features, RINGSIZE, true, vrh.vring.desc, vrh.vring.avail, vrh.vring.used); @@ -506,7 +506,7 @@ int main(int argc, char *argv[]) sgs[1] = &guest_sg[1]; /* May allocate an indirect, so force it to allocate user addr */ - __kmalloc_fake = __user_addr_min + vring_size(RINGSIZE, ALIGN); + __kmalloc_fake = __user_addr_min + vring_legacy_size(RINGSIZE, ALIGN); err = virtqueue_add_sgs(vq, sgs, 1, 1, &err, GFP_KERNEL); if (err) errx(1, "virtqueue_add_sgs: %i", err); @@ -556,7 +556,7 @@ int main(int argc, char *argv[...
2020 Apr 06
0
[PATCH v6 09/12] tools/virtio: switch to virtio_legacy_init/size
...ZE, __user_addr_min, ALIGN); vringh_init_user(&vrh, vdev.features, RINGSIZE, true, vrh.vring.desc, vrh.vring.avail, vrh.vring.used); @@ -506,7 +506,7 @@ int main(int argc, char *argv[]) sgs[1] = &guest_sg[1]; /* May allocate an indirect, so force it to allocate user addr */ - __kmalloc_fake = __user_addr_min + vring_size(RINGSIZE, ALIGN); + __kmalloc_fake = __user_addr_min + vring_legacy_size(RINGSIZE, ALIGN); err = virtqueue_add_sgs(vq, sgs, 1, 1, &err, GFP_KERNEL); if (err) errx(1, "virtqueue_add_sgs: %i", err); @@ -556,7 +556,7 @@ int main(int argc, char *argv[...
2020 Apr 07
0
[PATCH v7 13/19] tools/virtio: switch to virtio_legacy_init/size
...ZE, __user_addr_min, ALIGN); vringh_init_user(&vrh, vdev.features, RINGSIZE, true, vrh.vring.desc, vrh.vring.avail, vrh.vring.used); @@ -506,7 +506,7 @@ int main(int argc, char *argv[]) sgs[1] = &guest_sg[1]; /* May allocate an indirect, so force it to allocate user addr */ - __kmalloc_fake = __user_addr_min + vring_size(RINGSIZE, ALIGN); + __kmalloc_fake = __user_addr_min + vring_legacy_size(RINGSIZE, ALIGN); err = virtqueue_add_sgs(vq, sgs, 1, 1, &err, GFP_KERNEL); if (err) errx(1, "virtqueue_add_sgs: %i", err); @@ -556,7 +556,7 @@ int main(int argc, char *argv[...
2020 Apr 07
0
[PATCH v8 13/19] tools/virtio: switch to virtio_legacy_init/size
...ZE, __user_addr_min, ALIGN); vringh_init_user(&vrh, vdev.features, RINGSIZE, true, vrh.vring.desc, vrh.vring.avail, vrh.vring.used); @@ -506,7 +506,7 @@ int main(int argc, char *argv[]) sgs[1] = &guest_sg[1]; /* May allocate an indirect, so force it to allocate user addr */ - __kmalloc_fake = __user_addr_min + vring_size(RINGSIZE, ALIGN); + __kmalloc_fake = __user_addr_min + vring_legacy_size(RINGSIZE, ALIGN); err = virtqueue_add_sgs(vq, sgs, 1, 1, &err, GFP_KERNEL); if (err) errx(1, "virtqueue_add_sgs: %i", err); @@ -556,7 +556,7 @@ int main(int argc, char *argv[...
2020 Apr 06
1
[PATCH v3 1/2] virtio: stop using legacy struct vring in kernel
...ZE, __user_addr_min, ALIGN); vringh_init_user(&vrh, vdev.features, RINGSIZE, true, vrh.vring.desc, vrh.vring.avail, vrh.vring.used); @@ -506,7 +506,7 @@ int main(int argc, char *argv[]) sgs[1] = &guest_sg[1]; /* May allocate an indirect, so force it to allocate user addr */ - __kmalloc_fake = __user_addr_min + vring_size(RINGSIZE, ALIGN); + __kmalloc_fake = __user_addr_min + vring_legacy_size(RINGSIZE, ALIGN); err = virtqueue_add_sgs(vq, sgs, 1, 1, &err, GFP_KERNEL); if (err) errx(1, "virtqueue_add_sgs: %i", err); @@ -556,7 +556,7 @@ int main(int argc, char *argv[...
2018 Jul 25
3
[PATCH 1/2] tools/virtio: add dma barrier stubs
Fixes: 55e49dc43a8 ("virtio_ring: switch to dma_XX barriers for rpmsg") Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- tools/virtio/asm/barrier.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virtio/asm/barrier.h b/tools/virtio/asm/barrier.h index 0ac3caf90877..d0351f83aebe 100644 --- a/tools/virtio/asm/barrier.h +++
2020 Apr 06
2
[PATCH v2 1/2] virtio: stop using legacy struct vring
...ZE, __user_addr_min, ALIGN); vringh_init_user(&vrh, vdev.features, RINGSIZE, true, vrh.vring.desc, vrh.vring.avail, vrh.vring.used); @@ -506,7 +506,7 @@ int main(int argc, char *argv[]) sgs[1] = &guest_sg[1]; /* May allocate an indirect, so force it to allocate user addr */ - __kmalloc_fake = __user_addr_min + vring_size(RINGSIZE, ALIGN); + __kmalloc_fake = __user_addr_min + vring_legacy_size(RINGSIZE, ALIGN); err = virtqueue_add_sgs(vq, sgs, 1, 1, &err, GFP_KERNEL); if (err) errx(1, "virtqueue_add_sgs: %i", err); @@ -556,7 +556,7 @@ int main(int argc, char *argv[...
2020 Apr 06
2
[PATCH v2 1/2] virtio: stop using legacy struct vring
...ZE, __user_addr_min, ALIGN); vringh_init_user(&vrh, vdev.features, RINGSIZE, true, vrh.vring.desc, vrh.vring.avail, vrh.vring.used); @@ -506,7 +506,7 @@ int main(int argc, char *argv[]) sgs[1] = &guest_sg[1]; /* May allocate an indirect, so force it to allocate user addr */ - __kmalloc_fake = __user_addr_min + vring_size(RINGSIZE, ALIGN); + __kmalloc_fake = __user_addr_min + vring_legacy_size(RINGSIZE, ALIGN); err = virtqueue_add_sgs(vq, sgs, 1, 1, &err, GFP_KERNEL); if (err) errx(1, "virtqueue_add_sgs: %i", err); @@ -556,7 +556,7 @@ int main(int argc, char *argv[...
2013 Feb 18
9
[PATCH 0/5] vringh
This introduces vringh, which are generic accessors for virtio rings (host side). There's a host-side implementation in vhost, but it assumes that the rings are in userspace, and is tied to the vhost implementation. I have patches to adapt it to use vringh, but I'm pushing this in the next merge window for Sjur, who has CAIF patches which need it. This also includes a test program in
2013 Feb 18
9
[PATCH 0/5] vringh
This introduces vringh, which are generic accessors for virtio rings (host side). There's a host-side implementation in vhost, but it assumes that the rings are in userspace, and is tied to the vhost implementation. I have patches to adapt it to use vringh, but I'm pushing this in the next merge window for Sjur, who has CAIF patches which need it. This also includes a test program in
2018 Jul 25
0
[PATCH 2/2] tools/virtio: add kmalloc_array stub
...5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h index fca8381bbe04..fb22bccfbc8a 100644 --- a/tools/virtio/linux/kernel.h +++ b/tools/virtio/linux/kernel.h @@ -52,6 +52,11 @@ static inline void *kmalloc(size_t s, gfp_t gfp) return __kmalloc_fake; return malloc(s); } +static inline void *kmalloc_array(unsigned n, size_t s, gfp_t gfp) +{ + return kmalloc(n * s, gfp); +} + static inline void *kzalloc(size_t s, gfp_t gfp) { void *p = kmalloc(s, gfp); -- MST
2020 Apr 16
0
[PATCH v2 7/8] tools/virtio: Reset index in virtio_test --reset.
...; index 18d5347003eb..dca64d36a882 100644 > --- a/tools/virtio/virtio_test.c > +++ b/tools/virtio/virtio_test.c > @@ -20,7 +20,6 @@ > #include "../../drivers/vhost/test.h" > > #define RANDOM_BATCH -1 > -#define RANDOM_RESET -1 > > /* Unused */ > void *__kmalloc_fake, *__kfree_ignore_start, *__kfree_ignore_end; > @@ -49,6 +48,7 @@ struct vdev_info { > > static const struct vhost_vring_file no_backend = { .fd = -1 }, > backend = { .fd = 1 }; > +static const struct vhost_vring_state null_state = {}; > > bool vq_notify(struct v...
2020 Apr 17
0
[PATCH v2 7/8] tools/virtio: Reset index in virtio_test --reset.
...gt; > +++ b/tools/virtio/virtio_test.c > > > @@ -20,7 +20,6 @@ > > > #include "../../drivers/vhost/test.h" > > > > > > #define RANDOM_BATCH -1 > > > -#define RANDOM_RESET -1 > > > > > > /* Unused */ > > > void *__kmalloc_fake, *__kfree_ignore_start, *__kfree_ignore_end; > > > @@ -49,6 +48,7 @@ struct vdev_info { > > > > > > static const struct vhost_vring_file no_backend = { .fd = -1 }, > > > backend = { .fd = 1 }; > > > +static const struc...
2015 Sep 10
5
[PATCH 0/4] vhost test fixes
This fixes up virtio tests, broken by recent changes to core. Michael S. Tsirkin (4): tools/virtio: fix build after 4.2 changes vhost: move features to core tools/virtio: propagate V=X to kernel build virtio: introduce avail cache drivers/vhost/vhost.h | 4 +++- tools/virtio/asm/barrier.h | 2 ++ tools/virtio/linux/export.h | 3 +++ tools/virtio/linux/kernel.h | 8
2015 Sep 10
5
[PATCH 0/4] vhost test fixes
This fixes up virtio tests, broken by recent changes to core. Michael S. Tsirkin (4): tools/virtio: fix build after 4.2 changes vhost: move features to core tools/virtio: propagate V=X to kernel build virtio: introduce avail cache drivers/vhost/vhost.h | 4 +++- tools/virtio/asm/barrier.h | 2 ++ tools/virtio/linux/export.h | 3 +++ tools/virtio/linux/kernel.h | 8
2013 Jan 17
8
[PATCH 1/6] virtio_host: host-side implementation of virtio rings.
Getting use of virtio rings correct is tricky, and a recent patch saw an implementation of in-kernel rings (as separate from userspace). This patch attempts to abstract the business of dealing with the virtio ring layout from the access (userspace or direct); to do this, we use function pointers, which gcc inlines correctly. Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> ---
2013 Jan 17
8
[PATCH 1/6] virtio_host: host-side implementation of virtio rings.
Getting use of virtio rings correct is tricky, and a recent patch saw an implementation of in-kernel rings (as separate from userspace). This patch attempts to abstract the business of dealing with the virtio ring layout from the access (userspace or direct); to do this, we use function pointers, which gcc inlines correctly. Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> ---
2013 Mar 18
28
[PATCH 00/22] virtqueue_add_sgs, virtqueue_add_outbuf, virtqueue_add_inbuf
Add virtqueue_add_sgs which is more general than virtqueue_add_buf, which makes virtio-scsi and virtio-blk nicer, then add virtqueue_add_inbuf and virtqueue_add_outbuf which handle the more general case, and finally delete virtqueue_add_buf(). I'm hoping this will be the final post of the whole series, and it can move from my pending-rebases tree into virtio-next. Thanks! Rusty. Paolo