On 2021/1/28 下午10:41, Stefano Garzarella wrote:
Usually iotlb accesses are synchronized with a spinlock.
Let's request it as a new parameter in vringh_set_iotlb() and
hold it when we navigate the iotlb in iotlb_translate() to avoid
race conditions with any new additions/deletions of ranges from
On 2021/1/28 下午9:41, Eli Cohen wrote:
When a change of memory map occurs, the hardware resources are destroyed
and then re-created again with the new memory map. In such case, we need
to restore the hardware available and used indices. The driver failed to
restore the used index which is added h
On 2021/1/28 下午9:41, Eli Cohen wrote:
suspend_vq should only suspend the VQ on not save the current available
index. This is done when a change of map occurs when the driver calls
save_channel_info().
Signed-off-by: Eli Cohen
Acked-by: Jason Wang
---
drivers/vdpa/mlx5/net/mlx5_vnet.c
Hi David,
> From: Parav Pandit
> Sent: Friday, January 29, 2021 12:13 AM
[..]
> ---
> changelog:
> v1->v2:
> - added and used library helpers for socket communication
> - added and used library functions for string processing helpers
> - added and used library functions indent processing hel
vdpa tool is created to create, delete and query vdpa devices.
examples:
Show vdpa management device that supports creating, deleting vdpa devices.
$ vdpa mgmtdev show
vdpasim:
supported_classes net
$ vdpa mgmtdev show -jp
{
"show": {
"vdpasim": {
"supported_classes": [
Add kernel headers to commit from kernel tree [1].
79991caf5202c7 ("vdpa_sim_net: Add support for user supported devices")
[1] https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git branch:
linux-next
Signed-off-by: Parav Pandit
---
include/uapi/linux/vdpa.h | 40 ++
Linux vdpa interface allows vdpa device management functionality.
This includes adding, removing, querying vdpa devices.
vdpa interface also includes showing supported management devices
which support such operations.
This patchset includes kernel uapi headers and a vdpa tool.
examples:
$ vdpa
Hi Arseny,
I reviewed a part, tomorrow I hope to finish the other patches.
Just a couple of comments in the TODOs below.
On Mon, Jan 25, 2021 at 02:09:00PM +0300, Arseny Krasnov wrote:
This patchset impelements support of SOCK_SEQPACKET for virtio
transport.
As SOCK_SEQPACKET gu
On Mon, Jan 25, 2021 at 02:13:18PM +0300, Arseny Krasnov wrote:
This does rest of SOCK_SEQPACKET support:
1) Adds socket ops for SEQPACKET type.
2) Allows to create socket with SEQPACKET type.
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/af_vsock.c | 71 ++
On Mon, Jan 25, 2021 at 02:12:36PM +0300, Arseny Krasnov wrote:
This adds receive loop for SEQPACKET. It looks like receive loop for
SEQPACKET, but there is a little bit difference:
1) It doesn't call notify callbacks.
2) It doesn't care about 'SO_SNDLOWAT' and 'SO_RCVLOWAT' values, because
the
On Mon, Jan 25, 2021 at 02:11:57PM +0300, Arseny Krasnov wrote:
This prepares 'vsock_connectible_recvmg()' to call SEQPACKET receive
loop:
1) Some shared check left in this function, then socket type
specific receive loop is called.
2) Stream receive loop is moved to separate function.
Signed-
I think the patch title should be more explicit, so something like
vsock: generalize function to manage connectible sockets
On Mon, Jan 25, 2021 at 02:11:28PM +0300, Arseny Krasnov wrote:
This prepares af_vsock.c for SEQPACKET support:
1) As both stream and seqpacket sockets are connection orie
vringh_getdesc_iotlb() allocates memory to store the kvec, that
is freed with vringh_kiov_cleanup().
vringh_getdesc_iotlb() is able to reuse a kvec previously allocated,
so in order to avoid to allocate the kvec for each request, we are
not calling vringh_kiov_cleanup() when we finished to handle
Handle VIRTIO_BLK_T_GET_ID request, always answering the
"vdpa_blk_sim" string.
Signed-off-by: Stefano Garzarella
---
v2:
- made 'vdpasim_blk_id' static [Jason]
---
drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/drivers/vdpa/vdpa_sim/vdp
From: Max Gurtovoy
This will allow running vDPA for virtio block protocol.
Signed-off-by: Max Gurtovoy
[sgarzare: various cleanups/fixes]
Signed-off-by: Stefano Garzarella
---
v2:
- rebased on top of other changes (dev_attr, get_config(), notify(), etc.)
- memset to 0 the config structure in v
The previous implementation wrote only the status of each request.
This patch implements a more accurate block device simulator,
providing a ramdisk-like behavior.
Signed-off-by: Stefano Garzarella
---
v2:
- used %zd %zx to print size_t and ssize_t variables in dev_err()
- removed unnecessary new
From: Xie Yongji
With VDUSE, we should be able to support all kinds of virtio devices.
Signed-off-by: Xie Yongji
---
drivers/vhost/vdpa.c | 28 ++--
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index ef688c8c
This new helper returns the total number of bytes covered by
a vringh_kiov.
Suggested-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
include/linux/vringh.h | 11 +++
1 file changed, 11 insertions(+)
diff --git a/include/linux/vringh.h b/include/linux/vringh.h
index 755211ebd195..
In some cases, it may be useful to provide a way to skip a number
of bytes in a vringh_kiov.
Let's implement vringh_kiov_advance() for this purpose, reusing the
code from vringh_iov_xfer().
We replace that code calling the new vringh_kiov_advance().
Signed-off-by: Stefano Garzarella
---
include
__vringh_iov() overwrites the contents of riov and wiov, in fact it
resets the 'i' and 'used' fields, but also the consumed field should
be reset to avoid an inconsistent state.
Signed-off-by: Stefano Garzarella
---
drivers/vhost/vringh.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
The identical mapping used until now created issues when mapping
different virtual pages with the same physical address.
To solve this issue, we can use the iova module, to handle the IOVA
allocation.
For simplicity we use an IOVA allocator with byte granularity.
We add two new functions, vdpasim_
Usually iotlb accesses are synchronized with a spinlock.
Let's request it as a new parameter in vringh_set_iotlb() and
hold it when we navigate the iotlb in iotlb_translate() to avoid
race conditions with any new additions/deletions of ranges from
the ioltb.
Signed-off-by: Stefano Garzarella
---
v1:
https://lore.kernel.org/lkml/93f207c0-61e6-3696-f218-e7d7ea9a7...@redhat.com/
This series is the second part of the v1 linked above. The first part with
refactoring of vdpa_sim has already been merged.
The patches are based on Max Gurtovoy's work and extend the block simulator to
have a ramd
Hello Lai,
On Sun, Jan 24, 2021 at 10:11:14PM +0800, Lai Jiangshan wrote:
> > +
> > + /*
> > +* No need to switch back to the IST stack. The current stack is
> > either
> > +* identical to the stack in the IRET frame or the VC fall-back
> > stack,
> > +* so it is de
24 matches
Mail list logo