Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] vhost-user-blk: prevent using uninitialized vqs

2019-08-22 Thread yuchenlin via Qemu-devel
Raphael Norwitz 於 2019-08-23 04:16 寫道: > > Same rational as: e6cc11d64fc998c11a4dfcde8fda3fc33a74d844 > > Of the 3 virtqueues, seabios only sets cmd, leaving ctrl > and event without a physical address. This can cause > vhost_verify_ring_part_mapping to return ENOMEM, causing > the following

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] vmdk: Fix comment regarding max l1_size coverage

2019-04-24 Thread yuchenlin via Qemu-devel
On 2019-04-24 15:49, Sam Eiderman wrote: Commit b0651b8c246d ("vmdk: Move l1_size check into vmdk_add_extent") extended the l1_size check from VMDK4 to VMDK3 but did not update the default coverage in the moved comment. The previous vmdk4 calculation: (512 * 1024 * 1024) * 512(l2 entries)

Re: [Qemu-devel] [PATCH] e1000: Delay flush queue when receive RCTL

2019-03-24 Thread yuchenlin via Qemu-devel
On 2019-03-25 12:26, Jason Wang wrote: On 2019/3/21 上午9:35, yuchenlin wrote: Ping? On 2019-03-13 14:56, yuchen...@synology.com wrote: From: yuchenlin Due to too early RCT0 interrput, win10x32 may hang on booting. This problem can be reproduced by doing power cycle on win10x32 guest. In

Re: [Qemu-devel] [PATCH] e1000: Delay flush queue when receive RCTL

2019-03-20 Thread yuchenlin via Qemu-devel
Ping? On 2019-03-13 14:56, yuchen...@synology.com wrote: From: yuchenlin Due to too early RCT0 interrput, win10x32 may hang on booting. This problem can be reproduced by doing power cycle on win10x32 guest. In our environment, we have 10 win10x32 and stress power cycle. The problem will

[Qemu-devel] [PATCH] e1000: Delay flush queue when receive RCTL

2019-03-13 Thread yuchenlin--- via Qemu-devel
From: yuchenlin Due to too early RCT0 interrput, win10x32 may hang on booting. This problem can be reproduced by doing power cycle on win10x32 guest. In our environment, we have 10 win10x32 and stress power cycle. The problem will happen about 20 rounds. Below shows some log with comment: The

[Qemu-devel] [PATCH] vmdk: false positive of compat6 with hwversion not set

2019-02-21 Thread yuchenlin--- via Qemu-devel
From: yuchenlin In vmdk_co_create_opts, when it finds hw_version is undefined, it will set it to 4, which misleading the compat6 and hwversion in vmdk_co_do_create. Simply set hw_version to NULL after free, let the logic in vmdk_co_do_create to decide the value of hw_version. This bug can be

Re: [Qemu-devel] [Qemu-block] [PATCH] dmg: Fixing wrong dmg block type value for block terminator.

2019-01-02 Thread yuchenlin via Qemu-devel
On 2018-12-28 22:50, Julio Faracco wrote: This is a trivial patch to fix a wrong value for block terminator. The old value was 0x7fff which is wrong. It was not affecting the code because QEMU dmg block is not handling block terminator right now. Neverthless, it should be fixed.

Re: [Qemu-devel] [PATCH] vga_int: remove unused function protype

2018-10-29 Thread yuchenlin via Qemu-devel
On 2018-10-29 17:44, Gerd Hoffmann wrote: On Mon, Oct 22, 2018 at 04:00:53PM +0800, yuchen...@synology.com wrote: From: yuchenlin Signed-off-by: yuchenlin --- hw/display/vga_int.h | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index

[Qemu-devel] [PATCH] vga_int: remove unused function protype

2018-10-22 Thread yuchenlin--- via Qemu-devel
From: yuchenlin Signed-off-by: yuchenlin --- hw/display/vga_int.h | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index 6e4fa48a79..55c418eab5 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -166,7 +166,6 @@ MemoryRegion

Re: [Qemu-devel] [PATCH] vhost-scsi: prevent using uninitialized vqs

2018-10-21 Thread yuchenlin via Qemu-devel
Ping? On 2018-10-12 17:07, yuchen...@synology.com wrote: From: yuchenlin There are 3 virtqueues (ctrl, event and cmd) for virtio scsi device, but seabios will only set the physical address for the 3rd one (cmd). Then in vhost_virtqueue_start(), virtio_queue_get_desc_addr() will be 0 for ctrl

[Qemu-devel] [PATCH] vhost-scsi: prevent using uninitialized vqs

2018-10-12 Thread yuchenlin--- via Qemu-devel
From: yuchenlin There are 3 virtqueues (ctrl, event and cmd) for virtio scsi device, but seabios will only set the physical address for the 3rd one (cmd). Then in vhost_virtqueue_start(), virtio_queue_get_desc_addr() will be 0 for ctrl and event vq. In this case, ctrl and event vq are not

Re: [Qemu-devel] [PATCH v3] vmdk: align end of file to a sector boundary

2018-10-07 Thread yuchenlin via Qemu-devel
On 2018-10-08 10:38, Fam Zheng wrote: On Fri, 10/05 10:00, yuchenlin wrote: Ping? Hi, This was merged as 51b3c6b73acae1e3fd3c7d441fc86dd17356695f. Fam Hi, Thank you for your information. yuchenlin On 2018-09-13 16:34, Fam Zheng wrote: > On Thu, 09/13 16:29, yuchen...@synology.com

Re: [Qemu-devel] [PATCH v3] vmdk: align end of file to a sector boundary

2018-10-04 Thread yuchenlin via Qemu-devel
Ping? On 2018-09-13 16:34, Fam Zheng wrote: On Thu, 09/13 16:29, yuchen...@synology.com wrote: From: yuchenlin There is a rare case which the size of last compressed cluster is larger than the cluster size, which will cause the file is not aligned at the sector boundary. There are three

[Qemu-devel] [PATCH v3] vmdk: align end of file to a sector boundary

2018-09-13 Thread yuchenlin--- via Qemu-devel
From: yuchenlin There is a rare case which the size of last compressed cluster is larger than the cluster size, which will cause the file is not aligned at the sector boundary. There are three reasons to do it. First, if vmdk doesn't align at the sector boundary, there may be many undefined

Re: [Qemu-devel] [PATCH v2] vmdk: align end of file to a sector boundary

2018-09-13 Thread yuchenlin via Qemu-devel
On 2018-09-13 10:54, Fam Zheng wrote: On Thu, 09/13 10:31, yuchen...@synology.com wrote: From: yuchenlin There is a rare case which the size of last compressed cluster is larger than the cluster size, which will cause the file is not aligned at the sector boundary. The code looks good to

[Qemu-devel] [PATCH v2] vmdk: align end of file to a sector boundary

2018-09-12 Thread yuchenlin--- via Qemu-devel
From: yuchenlin There is a rare case which the size of last compressed cluster is larger than the cluster size, which will cause the file is not aligned at the sector boundary. Signed-off-by: yuchenlin --- v1 -> v2: * Add more detail comment. * Add QEMU_ALIGN_UP to show the intention more

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-12 Thread yuchenlin via Qemu-devel
On 2018-09-12 19:54, Fam Zheng wrote: On Tue, 08/28 11:17, yuchen...@synology.com wrote: From: yuchenlin There is a rare case which the size of last compressed cluster is larger than the cluster size, which will cause the file is not aligned at the sector boundary. Signed-off-by: yuchenlin

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-12 Thread yuchenlin via Qemu-devel
Fam Zheng 於 2018-09-12 17:34 寫道: > On Tue, 08/28 11:17, yuchen...@synology.com wrote: > From: yuchenlin > > > There is a rare case which the size of last > compressed cluster > is larger than the cluster size, which will cause the > file is > not aligned at the sector boundary. I don't

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-04 Thread yuchenlin via Qemu-devel
Ping! yuchen...@synology.com 於 2018-08-28 11:18 寫道: > From: yuchenlin There is a rare case which the size > of last compressed cluster is larger than the cluster size, which will cause > the file is not aligned at the sector boundary. Signed-off-by: yuchenlin > --- block/vmdk.c | 18

[Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-08-27 Thread yuchenlin--- via Qemu-devel
From: yuchenlin There is a rare case which the size of last compressed cluster is larger than the cluster size, which will cause the file is not aligned at the sector boundary. Signed-off-by: yuchenlin --- block/vmdk.c | 18 ++ 1 file changed, 18 insertions(+) diff --git

Re: [Qemu-devel] [PATCH 0/2] Refine some vdi code

2018-07-30 Thread yuchenlin via Qemu-devel
Hi, Stefan I agree that redundancy of If else may helps people to understand the code. However, CONFIG_VDI_WRITE only contributes: #if defined(CONFIG_VDI_WRITE) .bdrv_co_pwritev = vdi_co_pwritev, #endif I think we don't need CONFIG_VDI_WRITE to document the code. As its name implies,

[Qemu-devel] [PATCH 1/2] vdi: remove CONFIG_VDI_WRITE

2018-07-29 Thread yuchenlin--- via Qemu-devel
From: yuchenlin The CONFIG_VDI_WRITE is here when the first time vdi is added. But there is no reason to leave an always on and cannot configure option in the code-side. Signed-off-by: yuchenlin --- block/vdi.c | 5 - 1 file changed, 5 deletions(-) diff --git a/block/vdi.c b/block/vdi.c

[Qemu-devel] [PATCH 0/2] Refine some vdi code

2018-07-29 Thread yuchenlin--- via Qemu-devel
From: yuchenlin This series refine some code in vdi.c, includes: * Remvoe CONFIG_VDI_WRITE because there is no reason to leave an always on and cannot configure option in the code-side. * decouple if else if chain to get more readability. Thanks, yuchenlin yuchenlin (2): vdi: remove

[Qemu-devel] [PATCH 2/2] vdi: refine code for vdi_open

2018-07-29 Thread yuchenlin--- via Qemu-devel
From: yuchenlin When the condition of each if or else if is true, the code flow will goto fail. Which means we can decouple if else if chain to get some readability. Signed-off-by: yuchenlin --- block/vdi.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-)

[Qemu-devel] [PATCH v3] vmdk: return ERROR when cluster sector is larger than vmdk limitation

2018-03-22 Thread yuchenlin--- via Qemu-devel
From: yuchenlin VMDK has a hard limitation of extent size, which is due to the size of grain table entry is 32 bits. It means it can only point to a grain located at offset = 2^32. To avoid writing the user data beyond limitation and record a useless offset in grain

[Qemu-devel] [PATCH v2] vmdk: return ERROR when cluster sector is larger than vmdk limitation

2018-03-22 Thread yuchenlin--- via Qemu-devel
From: yuchenlin VMDK has a hard limitation of extent size, which is due to the size of grain table entry is 32 bits. It means it can only point to a grain located at offset = 2^32. To avoid writing the user data beyond limitation and record a useless offset in grain

[Qemu-devel] [PATCH] vmdk: return ENOTSUP before offset overflow

2018-03-21 Thread yuchenlin--- via Qemu-devel
From: yuchenlin VMDK has a hard limitation of extent size, which is due to the size of grain table entry is 32 bits. It means it can only point to a grain located at offset = 2^32. To prevent offset overflow and record a useless offset in grain table. We should return