Displaying 20 results from an estimated 65 matches for "find_region".
2020 Apr 15
0
[PATCH nbdkit 4/9] common/regions: Use new vector type to store the list of regions.
...urn 0;
else
- return regions->regions[regions->nr_regions-1].end + 1;
+ return rs->ptr[rs->size-1].end + 1;
}
/* Look up the region corresponding to the given offset. If the
* offset is inside the disk image then this cannot return NULL.
*/
-extern const struct region *find_region (const struct regions *regions,
+extern const struct region *find_region (const regions *regions,
uint64_t offset)
__attribute__((__nonnull__ (1)));
@@ -119,7 +118,7 @@ extern const struct region *find_region (const struct regions *regions,
* If type...
2015 Jul 15
1
[PULL] vhost: cleanups and fixes
...edhat.com>
----------------------------------------------------------------
Cornelia Huck (2):
MAINTAINERS: separate section for s390 virtio drivers
virtio/s390: rename drivers/s390/kvm -> drivers/s390/virtio
Igor Mammedov (3):
vhost: use binary search instead of linear in find_region()
vhost: extend memory regions allocation to vmalloc
vhost: add max_mem_regions module parameter
Michael S. Tsirkin (2):
virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS
virtio: define virtio_pci_cfg_cap in header.
Pierre Morel (1):
9p/trans_virtio: reset virtio d...
2015 Jul 15
1
[PULL] vhost: cleanups and fixes
...edhat.com>
----------------------------------------------------------------
Cornelia Huck (2):
MAINTAINERS: separate section for s390 virtio drivers
virtio/s390: rename drivers/s390/kvm -> drivers/s390/virtio
Igor Mammedov (3):
vhost: use binary search instead of linear in find_region()
vhost: extend memory regions allocation to vmalloc
vhost: add max_mem_regions module parameter
Michael S. Tsirkin (2):
virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS
virtio: define virtio_pci_cfg_cap in header.
Pierre Morel (1):
9p/trans_virtio: reset virtio d...
2011 Dec 16
4
[PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
From: Hongyong Zang <zanghongyong at huawei.com>
Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
to translate GPA to HVA. Since kernel's kvm structure already maintains the
address relationship in its member *kvm_memslots*, these patches use kernel's
kvm_memslots directly without the need of initialization and maintenance of
vhost_memory.
Hongyong
2011 Dec 16
4
[PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
From: Hongyong Zang <zanghongyong at huawei.com>
Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
to translate GPA to HVA. Since kernel's kvm structure already maintains the
address relationship in its member *kvm_memslots*, these patches use kernel's
kvm_memslots directly without the need of initialization and maintenance of
vhost_memory.
Hongyong
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated!
The basic purpose of the patch series is to set $nbdkit_stdio_safe to
"0" or "1" in sh and eval plugin scripts.
To do that, I ended up adding a nicer way to manipulate environ lists,
and to do that, I ended up adding a whole generic vector
implementation which is applicable in a lot of different places.
2016 Jan 18
2
[PATCH RFC] vhost: convert pre sorted vhost memory array to interval tree
...ldmem);
+
+ kvfree(newmem);
return 0;
+
+err:
+ vhost_umem_clean(d);
+ kvfree(newmem);
+ return -EFAULT;
}
long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
@@ -1017,28 +1056,6 @@ done:
}
EXPORT_SYMBOL_GPL(vhost_dev_ioctl);
-static const struct vhost_memory_region *find_region(struct vhost_memory *mem,
- __u64 addr, __u32 len)
-{
- const struct vhost_memory_region *reg;
- int start = 0, end = mem->nregions;
-
- while (start < end) {
- int slot = start + (end - start) / 2;
- reg = mem->regions + slot;
- if (addr >= reg->guest_phys_addr)
- end...
2016 Jan 18
2
[PATCH RFC] vhost: convert pre sorted vhost memory array to interval tree
...ldmem);
+
+ kvfree(newmem);
return 0;
+
+err:
+ vhost_umem_clean(d);
+ kvfree(newmem);
+ return -EFAULT;
}
long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
@@ -1017,28 +1056,6 @@ done:
}
EXPORT_SYMBOL_GPL(vhost_dev_ioctl);
-static const struct vhost_memory_region *find_region(struct vhost_memory *mem,
- __u64 addr, __u32 len)
-{
- const struct vhost_memory_region *reg;
- int start = 0, end = mem->nregions;
-
- while (start < end) {
- int slot = start + (end - start) / 2;
- reg = mem->regions + slot;
- if (addr >= reg->guest_phys_addr)
- end...
2015 Jul 23
0
[PULL v2] virtio/vhost: fixes for 4.2
...edhat.com>
----------------------------------------------------------------
Cornelia Huck (2):
MAINTAINERS: separate section for s390 virtio drivers
virtio/s390: rename drivers/s390/kvm -> drivers/s390/virtio
Igor Mammedov (3):
vhost: use binary search instead of linear in find_region()
vhost: extend memory regions allocation to vmalloc
vhost: add max_mem_regions module parameter
Michael S. Tsirkin (2):
virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS
virtio: define virtio_pci_cfg_cap in header.
Pierre Morel (1):
9p/trans_virtio: reset virtio d...
2015 Jul 23
0
[PULL v2] virtio/vhost: fixes for 4.2
...edhat.com>
----------------------------------------------------------------
Cornelia Huck (2):
MAINTAINERS: separate section for s390 virtio drivers
virtio/s390: rename drivers/s390/kvm -> drivers/s390/virtio
Igor Mammedov (3):
vhost: use binary search instead of linear in find_region()
vhost: extend memory regions allocation to vmalloc
vhost: add max_mem_regions module parameter
Michael S. Tsirkin (2):
virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS
virtio: define virtio_pci_cfg_cap in header.
Pierre Morel (1):
9p/trans_virtio: reset virtio d...
2016 Mar 25
0
[RFC PATCH V2 1/2] vhost: convert pre sorted vhost memory array to interval tree
..._umem_clean(oldumem);
return 0;
+
+err:
+ vhost_umem_clean(newumem);
+ kvfree(newmem);
+ return -EFAULT;
}
long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
@@ -1017,28 +1059,6 @@ done:
}
EXPORT_SYMBOL_GPL(vhost_dev_ioctl);
-static const struct vhost_memory_region *find_region(struct vhost_memory *mem,
- __u64 addr, __u32 len)
-{
- const struct vhost_memory_region *reg;
- int start = 0, end = mem->nregions;
-
- while (start < end) {
- int slot = start + (end - start) / 2;
- reg = mem->regions + slot;
- if (addr >= reg->guest_phys_addr)
- end...
2016 Jan 19
0
[PATCH RFC] vhost: convert pre sorted vhost memory array to interval tree
...vhost_umem_clean(d);
> + kvfree(newmem);
> + return -EFAULT;
> }
>
> long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
> @@ -1017,28 +1056,6 @@ done:
> }
> EXPORT_SYMBOL_GPL(vhost_dev_ioctl);
>
> -static const struct vhost_memory_region *find_region(struct vhost_memory *mem,
> - __u64 addr, __u32 len)
> -{
> - const struct vhost_memory_region *reg;
> - int start = 0, end = mem->nregions;
> -
> - while (start < end) {
> - int slot = start + (end - start) / 2;
> - reg = mem->regions + slot;
> - if...
2016 Apr 27
1
[RFC PATCH V2 1/2] vhost: convert pre sorted vhost memory array to interval tree
...umem_clean(newumem);
> + kvfree(newmem);
> + return -EFAULT;
> }
>
> long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
> @@ -1017,28 +1059,6 @@ done:
> }
> EXPORT_SYMBOL_GPL(vhost_dev_ioctl);
>
> -static const struct vhost_memory_region *find_region(struct vhost_memory *mem,
> - __u64 addr, __u32 len)
> -{
> - const struct vhost_memory_region *reg;
> - int start = 0, end = mem->nregions;
> -
> - while (start < end) {
> - int slot = start + (end - start) / 2;
> - reg = mem->regions + slot;
> - if...
2016 Apr 27
1
[RFC PATCH V2 1/2] vhost: convert pre sorted vhost memory array to interval tree
...umem_clean(newumem);
> + kvfree(newmem);
> + return -EFAULT;
> }
>
> long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
> @@ -1017,28 +1059,6 @@ done:
> }
> EXPORT_SYMBOL_GPL(vhost_dev_ioctl);
>
> -static const struct vhost_memory_region *find_region(struct vhost_memory *mem,
> - __u64 addr, __u32 len)
> -{
> - const struct vhost_memory_region *reg;
> - int start = 0, end = mem->nregions;
> -
> - while (start < end) {
> - int slot = start + (end - start) / 2;
> - reg = mem->regions + slot;
> - if...
2019 Jan 01
3
[PATCH nbdkit] include: Annotate function parameters with attribute((nonnull)).
Should we use attribute((nonnull)) at all? There's a very interesting
history of this in libvirt -- try looking at commit eefb881 plus the
commits referencing eefb881 -- but it does seem to work for me using
recent GCC and Clang.
I only did a few functions because annotating them gets old quickly...
Rich.
2013 Jul 07
2
[PATCH v2 03/11] vhost: Make vhost a separate module
...> @@ -871,6 +890,7 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
> > > done:
> > > return r;
> > > }
> > > +EXPORT_SYMBOL_GPL(vhost_dev_ioctl);
> > >
> > > static const struct vhost_memory_region *find_region(struct vhost_memory *mem,
> > > __u64 addr, __u32 len)
> > > @@ -962,6 +982,7 @@ int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log,
> > > BUG();
> > > return 0;
> > > }
> > > +EXPORT_SYMBOL_GPL(vhost_log_writ...
2013 Jul 07
2
[PATCH v2 03/11] vhost: Make vhost a separate module
...> @@ -871,6 +890,7 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
> > > done:
> > > return r;
> > > }
> > > +EXPORT_SYMBOL_GPL(vhost_dev_ioctl);
> > >
> > > static const struct vhost_memory_region *find_region(struct vhost_memory *mem,
> > > __u64 addr, __u32 len)
> > > @@ -962,6 +982,7 @@ int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log,
> > > BUG();
> > > return 0;
> > > }
> > > +EXPORT_SYMBOL_GPL(vhost_log_writ...
2019 Jan 02
0
[PATCH nbdkit v2 1/2] Annotate internal function parameters with attribute((nonnull)).
...gions.h
index ca9b3d5..4fcaf09 100644
--- a/common/regions/regions.h
+++ b/common/regions/regions.h
@@ -76,25 +76,30 @@ struct regions {
size_t nr_regions;
};
-extern void init_regions (struct regions *regions);
-extern void free_regions (struct regions *regions);
-extern const struct region *find_region (const struct regions *regions, uint64_t offset);
-extern int append_region (struct regions *regions, struct region region);
+extern void init_regions (struct regions *regions)
+ __attribute__((__nonnull__ (1)));
+extern void free_regions (struct regions *regions)
+ __attribute__((__nonnull__ (1)...
2019 Jan 02
4
[PATCH nbdkit v2 0/2] Use of attribute(()).
v1 was here:
https://www.redhat.com/archives/libguestfs/2019-January/msg00008.html
In v2 I have provided two patches:
The first patch extends attribute((nonnull)) to most internal
functions, but not to the external API.
The second patch uses a macro so that attribute((format)) is only used
in the public API on GCC or Clang. At least in theory these headers
could be used by a C compiler which
2016 Mar 25
4
[RFC PATCH V2 0/2] basic device IOTLB support
This patch tries to implement an device IOTLB for vhost. This could be
used with for co-operation with userspace(qemu) implementation of
iommu for a secure DMA environment (DMAR) in guest.
The idea is simple. When vhost meets an IOTLB miss, it will request
the assistance of userspace to do the translation, this is done
through:
- Fill the translation request in a preset userspace address (This