Re: [PATCH V4] file-posix: allow -EBUSY error during ioctl(fd, BLKZEROOUT, range) on block

2021-03-25 Thread ChangLimin
>On Thu, Mar 25, 2021 at 8:07 AM ChangLimin wrote: >>On Wed, Mar 24, 2021 at 4:52 PM Max Reitz wrote: >>On 22.03.21 10:25, ChangLimin wrote: >>> For Linux 5.10/5.11, qemu write zeros to a multipath device using >>> ioctl(fd, BLKZEROOUT, range) with cache

Re: [PATCH V4] file-posix: allow -EBUSY error during ioctl(fd, BLKZEROOUT, range) on block

2021-03-25 Thread ChangLimin
>On Wed, Mar 24, 2021 at 4:52 PM Max Reitz wrote: >On 22.03.21 10:25, ChangLimin wrote: >> For Linux 5.10/5.11, qemu write zeros to a multipath device using >> ioctl(fd, BLKZEROOUT, range) with cache none or directsync return -EBUSY >> permanently. > >So as far as I

[PATCH V4] file-posix: allow -EBUSY error during ioctl(fd, BLKZEROOUT, range) on block

2021-03-22 Thread ChangLimin
/stable/linux.git/commit/?id=384d87ef2c954fc58e6c5fd8253e4a1984f5fe02 Fixed in Linux 5.12: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=56887cffe946bb0a90c74429fa94d6110a73119d Signed-off-by: ChangLimin --- block/file-posix.c | 8 ++-- 1 file changed, 6

[PATCH V3] file-posix: allow -EBUSY -EINVAL errors during write zeros on block

2021-03-09 Thread ChangLimin
-dca9a626c...@kernel.dk/ Signed-off-by: ChangLimin --- block/file-posix.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 05079b40ca..4e132db929 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1629,8 +1629,13

Re: [PATCH] file-posix: allow -EBUSY errors during write zeros on block

2021-03-03 Thread ChangLimin
rise_linux/8/html/configuring_device_mapper_multipath/index Where multipath is configured to a SAN LUN, ioctl(fd, BLKZEROOUT, range) to the /dev/dm-x return EBUSY permanently since Linux 5.10. ChangLimin >> Signed-off-by: ChangLimin >> --- >> block/file-posix.c | 7 ++- >>

[PATCH V2] file-posix: allow -EBUSY -EINVAL errors during write zeros on block

2021-03-02 Thread ChangLimin
). Reference commit in Linux 5.10: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=384d87ef2c954fc58e6c5fd8253e4a1984f5fe02 Signed-off-by: ChangLimin --- block/file-posix.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/block/file-posix.c b/block

Re: Re: [Bug 1917394] [NEW] command lspci does not show the IVSHMEM device

2021-03-02 Thread ChangLimin
There is no driver for it. You should write it by youself. Maybe you can refer to http://doc.dpdk.org/guides-1.8/prog_guide/ivshmem_lib.html and dpdk source. Gool luck! From: Sean Kuo Date: 2021-03-02 15:59 To: ChangLimin CC: Bug 1917394; qemu-devel Subject: Re: [Bug 1917394] [NEW] command

Re: [Bug 1917394] [NEW] command lspci does not show the IVSHMEM device

2021-03-01 Thread ChangLimin
Can you give the lspci messages? The below is my output. There is a RAM memory device. $ lspci 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02) 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] 00:01.1 IDE interface: Intel Corporation 82371SB

[PATCH] file-posix: allow -EBUSY errors during write zeros on block

2021-03-01 Thread ChangLimin
5.10: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=384d87ef2c954fc58e6c5fd8253e4a1984f5fe02 Signed-off-by: ChangLimin ---  block/file-posix.c | 7 ++-  1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index

do_fallocate with (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) is not necessary when allocate a new qcow2 cluster

2020-12-21 Thread ChangLimin
From commit https://git.qemu.org/?p=qemu.git;a=commit;h=c8bb23cbdbe32f5c326365e0a82e1b0e68cdcd8a for qcow2 file in ocfs2 filesystem, do_fallocate with (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) will be called when allocate a new cluster. It's not necessary and also cause data error. 1.

[Qemu-devel] What will happen if guest write to a memory address which not exists in any kvm memory slot?

2018-11-27 Thread Changlimin
For a multiple cpu guest, during cpu 0 delete a memory sot then add it, if cpu 1 write the memory address which belong to the deleted memory slot and not exist in PTE, kvm_mmu_page_fault fail, then return the QEMU with the reason KVM_EXIT_MMIO, QEMU will also fail, What will happen in Guest?

[Qemu-devel] [Bug 1785197] Re: qemu 2.12.0 crash during install windows 10 with vga

2018-08-04 Thread changlimin
This commit has fixed it. https://git.qemu.org/?p=qemu.git;a=commit;h=a89fe6c3297 ** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1785197 Title:

[Qemu-devel] [Bug 1785197] Re: qemu 2.12.0 crash during install windows 10 with vga

2018-08-03 Thread changlimin
1. Add breakpoint at vga.c:790 s->vbe_regs[VBE_DISPI_INDEX_ENABLE] = val; (gdb) b vga.c:790 Breakpoint 2 at 0x56100ad10521: file /qemu-2.12/hw/display/vga.c, line 790. (gdb) c Continuing. 2. When breakpoint is hited , val is 0 Thread 5 "CPU 1/KVM" hit Breakpoint 2, vbe_ioport_write_data

[Qemu-devel] [Bug 1785197] Re: qemu 2.12.0 crash during install windows 10 with vga

2018-08-03 Thread changlimin
I have tried many times to reproduce the issue. 1. Add a breakpoint (gdb) b memory_region_snapshot_and_clear_dirty if size==0 Breakpoint 1 at 0x55ef37b7d450: file /qemu-2.12/memory.c, line 1986. 2. Occasionally the breakpoint hited, size is 0 (gdb) c Continuing. Thread 1 "kvm" hit Breakpoint 1,

[Qemu-devel] [Bug 1785197] [NEW] qemu 2.12.0 crash during install windows 10 with vga

2018-08-03 Thread changlimin
Public bug reported: Same issue as https://www.qubes-os.org/doc/windows-vm/ , it's not easy to reproduced. cpu_physical_memory_snapshot_get_dirty: Assertion `start + length <= snap->end’ failed Qemu version is 2.12.0. (gdb) bt #0 0x7f504ed6fc37 in raise () from

[Qemu-devel] qemu 2.12.0 crash during install windows 10 with vga.

2018-08-03 Thread Changlimin
Hi, I have the same issue as https://www.qubes-os.org/doc/windows-vm/ , it's not easy to reproduce. cpu_physical_memory_snapshot_get_dirty: Assertion `start + length <= snap->end' failed Qemu version is 2.12.0. (gdb) bt #0 0x7f504ed6fc37 in raise () from /lib/x86_64-linux-gnu/libc.so.6 #1

[Qemu-devel] [Bug 1401798] Re: Qemu 2.2.0 savevm crash.

2017-11-27 Thread changlimin
** Changed in: qemu Status: Incomplete => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1401798 Title: Qemu 2.2.0 savevm crash. Status in QEMU: Fix Released Bug

Re: [Qemu-devel] Block format 'raw' does not support the option 'locking' when disable image locking with option locking=off

2017-10-26 Thread Changlimin
, October 26, 2017 3:33 PM To: changlimin 00148 (Cloud); Fam Zheng Cc: qemu-devel@nongnu.org; Qemu-block Subject: Re: [Qemu-devel] Block format 'raw' does not support the option 'locking' when disable image locking with option locking=off On 2017-10-26 09:18, Changlimin wrote: > If the qcow2 f

Re: [Qemu-devel] Block format 'raw' does not support the option 'locking' when disable image locking with option locking=off

2017-10-26 Thread Changlimin
To: changlimin 00148 (Cloud); Fam Zheng Cc: qemu-devel@nongnu.org Subject: Re: [Qemu-devel] Block format 'raw' does not support the option 'locking' when disable image locking with option locking=off On 2017-10-26 03:06, Changlimin wrote: > share-rw=on is good for raw format file, but bad for qc

Re: [Qemu-devel] Block format 'raw' does not support the option 'locking' when disable image locking with option locking=off

2017-10-25 Thread Changlimin
share-rw=on is good for raw format file, but bad for qcow2 format file: Failed to get "write" lock Is another process using the image? Is this intented? BR Chang Limin -Original Message- From: Fam Zheng [mailto:f...@redhat.com] Sent: Wednesday, October 25, 2017 9:31 PM To:

[Qemu-devel] Block format 'raw' does not support the option 'locking' when disable image locking with option locking=off

2017-10-25 Thread Changlimin
Hi, When running Oracle RAC, one image is shared between multiple vms, so I want to disable locking with option locking=off, But Block format 'raw' does not support the option 'locking'. How to disable locking? The version is git e822e81e350825dd94f41ee2538ff1432b812eb9 The command line is

Re: [Qemu-devel] qemu-img crash when resize a qcow2 file created with preallocation=full/falloc .

2017-10-25 Thread Changlimin
The latest version from git e822e81e350825dd94f41ee2538ff1432b812eb9 Also ubuntu 17.10 -Original Message- From: Thomas Huth [mailto:th...@redhat.com] Sent: Wednesday, October 25, 2017 3:22 PM To: changlimin 00148 (Cloud); qemu-devel@nongnu.org Cc: Qemu-block; Max Reitz Subject: Re: [Qemu

[Qemu-devel] qemu-img crash when resize a qcow2 file created with preallocation=full/falloc .

2017-10-23 Thread Changlimin
Hi, I am glad to see that qcow2 file created with preallocation=full/falloc can be resized. But when I test it, qemu-img crashs. qemu-img: block/qcow2-refcount.c:530: qcow2_refcount_area: Assertion `!(start_offset % s->cluster_size)' failed. These are commands: qemu-img create -f qcow2 -o

Re: [Qemu-devel] [PATCH v2] pci: relax pci_msi_get_message()

2016-11-24 Thread Changlimin
update the link -device pci-assign,configfd=30,host=05:00.0,id=hostdev0,bus=pci.0,addr=0x3 KVM pci-assign is configured, maybe the same reason as http://lists.nongnu.org/archive/html/qemu-devel/2016-11/msg04649.html please try the patch inside it. Chang limin

Re: [Qemu-devel] [PATCH v2] pci: relax pci_msi_get_message()

2016-11-24 Thread Changlimin
-device pci-assign,configfd=30,host=05:00.0,id=hostdev0,bus=pci.0,addr=0x3 KVM pci-assign is configured, maybe the same reason as http://lists.nongnu.org/archive/html/qemu-devel/2016-11/msg04668.html please try the patch inside it. Chang limin On Fri, Nov 25, 2016 at 06:11:01AM +0200, Michael

Re: [Qemu-devel] [PATCH for-2.8] pci-assign: sync MSI/MSI-X cap and table with PCIDevice

2016-11-24 Thread Changlimin
.@redhat.com] Sent: Thursday, November 24, 2016 8:33 PM To: qemu-devel@nongnu.org; changlimin 00148 (CCPL) Cc: jan.kis...@siemens.com; alex.william...@redhat.com; qemu-sta...@nongnu.org; pbonz...@redhat.com Subject: Re: [PATCH for-2.8] pci-assign: sync MSI/MSI-X cap and table with PCIDevice CC L

[Qemu-devel] [Bug 1562653] Re: Ubuntu 15.10: QEMU VM hang if memory >= 1T

2016-04-04 Thread changlimin
For cpus which have not EPT feature, should change CR3_L_MODE_RESERVED_BITS in arch/x86/include/asm/kvm_host.h: -#define CR3_L_MODE_RESERVED_BITS 0xFF00ULL +#define CR3_L_MODE_RESERVED_BITS 0xFE00ULL -- You received this bug notification because you are a member of qemu-

[Qemu-devel] [Bug 1562653] Re: Ubuntu 15.10: QEMU VM hang if memory >= 1T

2016-03-31 Thread changlimin
The issue is sloved after change cpuid[8008]; --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -2547,7 +2547,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, if (env->features[FEAT_8000_0001_EDX] & CPUID_EXT2_LM) { /* 64 bit processor */ /*

[Qemu-devel] [Bug 1562653] Re: Ubuntu 15.10: QEMU VM hang if memory >= 1T

2016-03-31 Thread changlimin
After I changed PHYS_ADDR_MASK, qemu vm can start when memory >=1024G , but kvm vm still hang. -# define PHYS_ADDR_MASK 0xffLL +# define PHYS_ADDR_MASK 0xfffLL -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Qemu-devel] [Bug 1562653] Re: Ubuntu 15.10: QEMU VM hang if memory >= 1T

2016-03-30 Thread changlimin
I mean vm hang when memory >= 1100G (1024G when enable ide cdrom) instead of 1.5G. If disable hpet, the vm will hang at acpi_ex_system_memory_space_handler when memory >= 1100G If disable kvm, vm is good when memory <= 1020G, but also hang when memory >= 1024G. There is no critical information

[Qemu-devel] [Bug 1472083] [NEW] Qemu 2.1.2 hang when stop command

2015-07-06 Thread changlimin
Public bug reported: Qemu 2.1.2, Linux kernel 3.13.6, this is the stack. #0 in ppoll () from /lib/x86_64-linux-gnu/libc.so.6 #1 in qemu_poll_ns (fds=0x7fa82a8de380, nfds=1, timeout=-1) at qemu-timer.c:314 #2 in aio_poll (ctx=0x7fa82a8b5000, blocking=true) at aio-posix.c:250 #3 in

[Qemu-devel] [Bug 1401798] Re: Qemu 2.2.0 savevm crash.

2015-03-19 Thread changlimin
I think I get the reason. From Qemu 2.2.0, in qcow2_open: l2_cache_size = MAX(DEFAULT_L2_CACHE_BYTE_SIZE/s-cluster_size, MIN_L2_CACHE_SIZE); Here DEFAULT_L2_CACHE_BYTE_SIZE=1M, MIN_L2_CACHE_SIZE=1. If the cluster_size 1M, the l2_cache_size will be greater than 1, it is ok. If the

[Qemu-devel] [Bug 1401798] Re: Qemu 2.2.0 savevm crash.

2014-12-21 Thread changlimin
The bug can be reproduced every time. 1. I install a Ubuntu 14.04 guest. 2. The monitor command is (qemu) snapshot_blkdev_internal drive-virtio-disk0 s1 3. Or (qemu) savevm s1 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Qemu-devel] [Bug 1401798] [NEW] Qemu 2.2.0 savevm crash.

2014-12-12 Thread changlimin
Public bug reported: qemu 2.1.2 is good. (gdb) bt #0 0x74aae445 in raise () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x74ab1bab in abort () from /lib/x86_64-linux-gnu/libc.so.6 #2 0x55997951 in qcow2_cache_find_entry_to_replace (c=0x56389780) at

Re: [Qemu-devel] Sometimes qem-kvm hang at kvm_put_vcpu_events when virsh restore. Both version 0.12.5 / 0.13.0

2010-12-15 Thread changlimin
...@gmail.com To: changlimin changli...@h3c.com Cc: qemu-devel@nongnu.org Sent: Wednesday, December 15, 2010 3:46 PM Subject: Re: [Qemu-devel] Sometimes qem-kvm hang at kvm_put_vcpu_events when virsh restore. Both version 0.12.5 / 0.13.0 2010/12/15 changlimin changli...@h3c.com: BTW windows 2008

Re: [Qemu-devel] Sometimes qem-kvm hang at kvm_put_vcpu_events when virsh restore. Both version 0.12.5 / 0.13.0

2010-12-15 Thread changlimin
I have tried 1 vcpu and 2 vcpus, both sometimes restore fail. - Original Message - From: Mulyadi Santosa mulyadi.sant...@gmail.com To: changlimin changli...@h3c.com Cc: qemu-devel@nongnu.org Sent: Wednesday, December 15, 2010 4:31 PM Subject: Re: [Qemu-devel] Sometimes qem-kvm hang

[Qemu-devel] Sometimes qem-kvm hang at kvm_put_vcpu_events when virsh restore. Both version 0.12.5 / 0.13.0

2010-12-14 Thread changlimin
BTW windows 2008 guest start failed at qem-kvm 0.13.0, but 0.12.5 start success. Best regards