Displaying 12 results from an estimated 12 matches for "zhenwei".
2023 May 10
2
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
On Wed, 10 May 2023 10:54:37 +0800, zhenwei pi <pizhenwei at bytedance.com> wrote:
> Both split ring and packed ring use 32bits to describe the length of
> a descriptor: see struct vring_desc and struct vring_packed_desc.
> This means the max segment size supported by virtio is U32_MAX.
>
> An example of virtio_max_dma_s...
2023 May 10
3
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
...blk_config, size_max, &v);
max_size = min(max_size, v);
There is a risk during implicit convert here, once virtio_max_dma_size
returns 4G, max_size becomes 0.
Fixes: e6d6dd6c875e ("virtio: Introduce virtio_max_dma_size()")
Cc: Joerg Roedel <jroedel at suse.de>
Signed-off-by: zhenwei pi <pizhenwei at bytedance.com>
---
drivers/virtio/virtio_ring.c | 12 ++++++++----
include/linux/virtio.h | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index c5310eaf8b46..55cfecf030a1 100644
--- a/d...
2023 May 10
1
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
On Wed, May 10, 2023 at 10:54:37AM +0800, zhenwei pi wrote:
> Both split ring and packed ring use 32bits to describe the length of
> a descriptor: see struct vring_desc and struct vring_packed_desc.
> This means the max segment size supported by virtio is U32_MAX.
>
> An example of virtio_max_dma_size in virtio_blk.c:
> u32 v,...
2023 Jul 04
1
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
On Wed, May 10, 2023 at 10:54:37AM +0800, zhenwei pi wrote:
> Both split ring and packed ring use 32bits to describe the length of
> a descriptor: see struct vring_desc and struct vring_packed_desc.
> This means the max segment size supported by virtio is U32_MAX.
>
> An example of virtio_max_dma_size in virtio_blk.c:
> u32 v,...
2023 May 10
1
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
On Wed, May 10, 2023 at 11:26:54AM +0800, Xuan Zhuo wrote:
> On Wed, 10 May 2023 10:54:37 +0800, zhenwei pi <pizhenwei at bytedance.com> wrote:
> > Both split ring and packed ring use 32bits to describe the length of
> > a descriptor: see struct vring_desc and struct vring_packed_desc.
> > This means the max segment size supported by virtio is U32_MAX.
> >
> > An ex...
2019 Apr 25
2
How to use the pass 'Unroll and Jam'
...```
I also tried to add the option '-debug' to the opt to see if there is the
debug information printed by LoopUnrollAndJam, but nothing.
Thank you very much.
--
Zhen Wei (魏禛)
Master Student
Department of Computer Science & Information Engineering
National Taiwan University
Email: zhenwei.tw at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190425/995af7e9/attachment.html>
2023 May 10
1
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
On Wed, May 10, 2023 at 11:44?AM Michael S. Tsirkin <mst at redhat.com> wrote:
>
> On Wed, May 10, 2023 at 11:26:54AM +0800, Xuan Zhuo wrote:
> > On Wed, 10 May 2023 10:54:37 +0800, zhenwei pi <pizhenwei at bytedance.com> wrote:
> > > Both split ring and packed ring use 32bits to describe the length of
> > > a descriptor: see struct vring_desc and struct vring_packed_desc.
> > > This means the max segment size supported by virtio is U32_MAX.
> >...
2019 Apr 28
2
[PATCH] virtio_console: remove vq buf while unpluging port
...uest report: virtio-ports vport0p1: Error allocating inbufs
The reason is that the port is unplugged and the vq buf still remained.
So, fix two cases in this patch:
1, fix memory leak with attach-device/detach-device.
2, fix logic bug with attach-device/detach-device/attach-device.
Signed-off-by: zhenwei pi <pizhenwei at bytedance.com>
---
drivers/char/virtio_console.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index fbeb719..f6e37f4 100644
--- a/drivers/char/virtio_console.c
+++ b/d...
2019 Apr 28
2
[PATCH] virtio_console: remove vq buf while unpluging port
...uest report: virtio-ports vport0p1: Error allocating inbufs
The reason is that the port is unplugged and the vq buf still remained.
So, fix two cases in this patch:
1, fix memory leak with attach-device/detach-device.
2, fix logic bug with attach-device/detach-device/attach-device.
Signed-off-by: zhenwei pi <pizhenwei at bytedance.com>
---
drivers/char/virtio_console.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index fbeb719..f6e37f4 100644
--- a/drivers/char/virtio_console.c
+++ b/d...
2019 May 24
0
[PATCH] virtio_console: remove vq buf while unpluging port
On Sun, Apr 28, 2019 at 09:50:04AM +0800, zhenwei pi wrote:
> A bug can be easily reproduced:
> Host# cat guest-agent.xml
> <channel type="unix">
> <source mode="bind" path="/var/lib/libvirt/qemu/stretch.agent"/>
> <target type="virtio" name="org.qemu.guest_agent.0"...
2019 May 05
0
[PATCH] virtio_console: remove vq buf while unpluging port
...uest report: virtio-ports vport0p1: Error allocating inbufs
The reason is that the port is unplugged and the vq buf still remained.
So, fix two cases in this patch:
1, fix memory leak with attach-device/detach-device.
2, fix logic bug with attach-device/detach-device/attach-device.
Signed-off-by: zhenwei pi <pizhenwei at bytedance.com>
---
drivers/char/virtio_console.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index fbeb719..f6e37f4 100644
--- a/drivers/char/virtio_console.c
+++ b/d...
2023 Sep 04
1
[PATCH] virtio-blk: fix implicit overflow on virtio_max_dma_size
The following codes have an implicit conversion from size_t to u32:
(u32)max_size = (size_t)virtio_max_dma_size(vdev);
This may lead overflow, Ex (size_t)4G -> (u32)0. Once
virtio_max_dma_size() has a larger size than U32_MAX, use U32_MAX
instead.
Signed-off-by: zhenwei pi <pizhenwei at bytedance.com>
---
drivers/block/virtio_blk.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 1fe011676d07..4a4b9bad551e 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_bl...