similar to: [PATCH 1/1] virtio_ring: fix return code on DMA mapping fails

Displaying 20 results from an estimated 2000 matches similar to: "[PATCH 1/1] virtio_ring: fix return code on DMA mapping fails"

2020 Apr 18
0
[PATCH AUTOSEL 5.5 74/75] virtio-blk: improve virtqueue error to BLK_STS
From: Halil Pasic <pasic at linux.ibm.com> [ Upstream commit 3d973b2e9a625996ee997c7303cd793b9d197c65 ] Let's change the mapping between virtqueue_add errors to BLK_STS statuses, so that -ENOSPC, which indicates virtqueue full is still mapped to BLK_STS_DEV_RESOURCE, but -ENOMEM which indicates non-device specific resource outage is mapped to BLK_STS_RESOURCE. Signed-off-by: Halil
2020 Apr 18
0
[PATCH AUTOSEL 5.4 73/78] virtio-blk: improve virtqueue error to BLK_STS
From: Halil Pasic <pasic at linux.ibm.com> [ Upstream commit 3d973b2e9a625996ee997c7303cd793b9d197c65 ] Let's change the mapping between virtqueue_add errors to BLK_STS statuses, so that -ENOSPC, which indicates virtqueue full is still mapped to BLK_STS_DEV_RESOURCE, but -ENOMEM which indicates non-device specific resource outage is mapped to BLK_STS_RESOURCE. Signed-off-by: Halil
2020 Apr 18
0
[PATCH AUTOSEL 4.19 45/47] virtio-blk: improve virtqueue error to BLK_STS
From: Halil Pasic <pasic at linux.ibm.com> [ Upstream commit 3d973b2e9a625996ee997c7303cd793b9d197c65 ] Let's change the mapping between virtqueue_add errors to BLK_STS statuses, so that -ENOSPC, which indicates virtqueue full is still mapped to BLK_STS_DEV_RESOURCE, but -ENOMEM which indicates non-device specific resource outage is mapped to BLK_STS_RESOURCE. Signed-off-by: Halil
2018 Dec 07
0
[RFC 3/3] virtio_ring: use new vring flags
Switch to using the _SPLIT_ and _PACKED_ variants of vring flags in split ring and packed ring respectively. Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> --- drivers/virtio/virtio_ring.c | 100 +++++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 41 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index cd7e755484e3..2806f69c6c9f
2019 Nov 23
0
[PATCH 1/1] virtio_ring: fix return code on DMA mapping fails
On 11/22/19 7:08 AM, Halil Pasic wrote: > Thanks Michael! > > Actually I also hoped to start a discussion on virtio with encrypted > memory. > > I assume the AMD folks have the most experience with this, and I very > much like to understand how do they master the challenges we are all > facing. > > My understanding of IO in the context of AMD SEV is that the user
2019 Nov 22
3
[PATCH 1/1] virtio_ring: fix return code on DMA mapping fails
Thanks Michael! Actually I also hoped to start a discussion on virtio with encrypted memory. I assume the AMD folks have the most experience with this, and I very much like to understand how do they master the challenges we are all facing. My understanding of IO in the context of AMD SEV is that the user is responsible for choosing the swiotlb command line parameter of the guest kernel so, that
2019 Nov 22
3
[PATCH 1/1] virtio_ring: fix return code on DMA mapping fails
Thanks Michael! Actually I also hoped to start a discussion on virtio with encrypted memory. I assume the AMD folks have the most experience with this, and I very much like to understand how do they master the challenges we are all facing. My understanding of IO in the context of AMD SEV is that the user is responsible for choosing the swiotlb command line parameter of the guest kernel so, that
2019 Sep 06
0
[PATCH] virtio_ring: fix unmap of indirect descriptors
On Fri, Sep 06, 2019 at 02:06:59PM +0200, Matthias Lange wrote: > The function virtqueue_add_split() DMA-maps the scatterlist buffers. In > case a mapping error occurs the already mapped buffers must be unmapped. > This happens by jumping to the 'unmap_release' label. > > In case of indirect descriptors the release is wrong and may leak kernel > memory. Because the
2023 May 26
1
[PATCH] virtio_ring: validate used buffer length
This patch validate the used buffer length provided by the device before trying to use it. This is done by remembering the in buffer length in a dedicated array during virtqueue_add(), then we can fail the virtqueue_get_buf() when we find the device is trying to give us a used buffer length which is greater than we stored before. This validation is disable by default via module parameter to
2023 Mar 02
1
[PATCH vhost v1 06/12] virtio_ring: packed: separate DMA codes
DMA-related logic is separated from the virtqueue_add_vring_packed() to prepare for subsequent support for premapped. DMA address will be saved as sg->dma_address, then virtqueue_add_vring_packed() will use it directly. If it is a premapped scene, the transmitted sgs should have saved DMA address in dma_address, and in virtio core, we need to pass virtqueue_map_sgs(). Signed-off-by: Xuan
2023 May 31
1
[PATCH] virtio_ring: validate used buffer length
On Wed, May 31, 2023 at 03:36:51PM +0800, Jason Wang wrote: > On Wed, May 31, 2023 at 1:50?PM Michael S. Tsirkin <mst at redhat.com> wrote: > > > > On Wed, May 31, 2023 at 09:05:00AM +0800, Jason Wang wrote: > > > On Mon, May 29, 2023 at 6:03?PM Michael S. Tsirkin <mst at redhat.com> wrote: > > > > > > > > On Mon, May 29, 2023 at
2023 May 31
1
[PATCH] virtio_ring: validate used buffer length
On Wed, May 31, 2023 at 04:26:38PM +0800, Jason Wang wrote: > On Wed, May 31, 2023 at 3:36?PM Jason Wang <jasowang at redhat.com> wrote: > > > > On Wed, May 31, 2023 at 1:50?PM Michael S. Tsirkin <mst at redhat.com> wrote: > > > > > > On Wed, May 31, 2023 at 09:05:00AM +0800, Jason Wang wrote: > > > > On Mon, May 29, 2023 at 6:03?PM Michael
2023 Jun 01
1
[PATCH] virtio_ring: validate used buffer length
On Wed, May 31, 2023 at 5:55?PM Michael S. Tsirkin <mst at redhat.com> wrote: > > On Wed, May 31, 2023 at 03:36:51PM +0800, Jason Wang wrote: > > On Wed, May 31, 2023 at 1:50?PM Michael S. Tsirkin <mst at redhat.com> wrote: > > > > > > On Wed, May 31, 2023 at 09:05:00AM +0800, Jason Wang wrote: > > > > On Mon, May 29, 2023 at 6:03?PM Michael S.
2023 Feb 20
1
[PATCH vhost 04/10] virtio_ring: split: introduce virtqueue_add_split_premapped()
On Mon, 20 Feb 2023 13:38:13 +0800, Jason Wang <jasowang at redhat.com> wrote: > On Tue, Feb 14, 2023 at 3:27 PM Xuan Zhuo <xuanzhuo at linux.alibaba.com> wrote: > > > > virtqueue_add_split() only supports virtual addresses, dma is completed > > in virtqueue_add_split(). > > > > In some scenarios (such as the AF_XDP scenario), the memory is allocated
2023 Jun 01
1
[PATCH] virtio_ring: validate used buffer length
On Wed, May 31, 2023 at 6:25?PM Michael S. Tsirkin <mst at redhat.com> wrote: > > On Wed, May 31, 2023 at 04:26:38PM +0800, Jason Wang wrote: > > On Wed, May 31, 2023 at 3:36?PM Jason Wang <jasowang at redhat.com> wrote: > > > > > > On Wed, May 31, 2023 at 1:50?PM Michael S. Tsirkin <mst at redhat.com> wrote: > > > > > > > >
2019 Mar 12
0
[PATCH] virtio_ring: Fix potential mem leak in virtqueue_add_indirect_packed
On 2019/3/12 ??3:06, Yue Haibing wrote: > From: YueHaibing <yuehaibing at huawei.com> > > 'desc' should be freed before leaving from err handing path. > > Fixes: 1ce9e6055fa0 ("virtio_ring: introduce packed ring support") > Signed-off-by: YueHaibing <yuehaibing at huawei.com> > --- > drivers/virtio/virtio_ring.c | 1 + > 1 file changed, 1
2018 May 22
0
[RFC v5 2/5] virtio_ring: support creating packed ring
This commit introduces the support for creating packed ring. All split ring specific functions are added _split suffix. Some necessary stubs for packed ring are also added. Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> --- drivers/virtio/virtio_ring.c | 801 +++++++++++++++++++++++------------ include/linux/virtio_ring.h | 8 +- 2 files changed, 546 insertions(+), 263 deletions(-)
2018 Jul 11
0
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
This commit introduces the support for creating packed ring. All split ring specific functions are added _split suffix. Some necessary stubs for packed ring are also added. Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> --- drivers/virtio/virtio_ring.c | 801 +++++++++++++++++++++++------------ include/linux/virtio_ring.h | 8 +- 2 files changed, 546 insertions(+), 263 deletions(-)
2023 May 17
2
[PATCH vhost v9 01/12] virtio_ring: put mapping error check in vring_map_one_sg
This patch put the dma addr error check in vring_map_one_sg(). The benefits of doing this: 1. make vring_map_one_sg more simple, without calling vring_mapping_error to check the return value. 2. reduce one judgment of vq->use_dma_api. Signed-off-by: Xuan Zhuo <xuanzhuo at linux.alibaba.com> --- drivers/virtio/virtio_ring.c | 37 +++++++++++++++++++++--------------- 1 file changed,
2023 Mar 02
1
[PATCH vhost v1 01/12] virtio_ring: split: refactor virtqueue_add_split() for premapped
This commit splits virtqueue_add_split() to two functions. The purpose of such splitting is to separate DMA operations. The first function includes all codes that may fail before the DMA operation. The subsequent part is used as the second function. In this way, we can perform DMA operations in the middle of the two functions. If the first function fails, we do not need to perform DMA