[Qemu-devel] [PATCH v2] usb-host: reset and close libusb_device_handle before qemu exit

2018-12-10 Thread linzhecheng
we should perform these actions as same as usb_host_close. Signed-off-by: linzhecheng diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index b6602ded4e..833250a886 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -988,7 +988,9 @@ static void usb_host_exit_notifier(struct

[Qemu-devel] [PATCH] usb-host: reset and close libusb_device_handle before qemu exit

2018-11-29 Thread linzhecheng
we should perform these things as same as usb_host_close. Signed-off-by: linzhecheng diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index b6602ded4e..2016375e6b 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -988,7 +988,9 @@ static void usb_host_exit_notifier(struct

Re: [Qemu-devel] [BUG] qemu stuck when detach host-usb device

2018-11-26 Thread linzhecheng
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Tuesday, November 27, 2018 2:09 PM > To: linzhecheng > Cc: qemu-devel@nongnu.org; wangxin (U) ; > Zhoujian (jay) ; libusb-de...@lists.sourceforge.net > Subject: Re: [Qemu-devel] [BUG] q

[Qemu-devel] [BUG] qemu stuck when detach host-usb device

2018-11-26 Thread linzhecheng
Description of problem: The guest has a host-usb device(Kingston Technology DataTraveler 100 G3/G4/SE9 G2), which is attached to xhci controller(on host). Qemu will stuck if I detach it from guest. How reproducible: 100% Steps to Reproduce: 1.Use usb stick to copy files in guest ,

Re: [Qemu-devel] [question] live migration about redir-usb

2018-11-26 Thread linzhecheng
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Monday, November 26, 2018 4:50 PM > To: linzhecheng > Cc: qemu-devel@nongnu.org; wangxin (U) ; > Zhoujian (jay) > Subject: Re: [Qemu-devel] [question] live migration about redir-usb >

Re: [Qemu-devel] [question] live migration about redir-usb

2018-11-25 Thread linzhecheng
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Monday, November 26, 2018 2:46 PM > To: linzhecheng > Cc: qemu-devel@nongnu.org; wangxin (U) ; > Zhoujian (jay) > Subject: Re: [Qemu-devel] [question] live migration about redir-usb >

[Qemu-devel] [question] live migration about redir-usb

2018-11-25 Thread linzhecheng
Hi, Gerd I have read this discussion thread about live migration in tcp mode. https://bugzilla.redhat.com/show_bug.cgi?id=1254971 Only spice redirection supports live migration not, but why not tcp mode? Does usbredirserver not support it or qemu?

[Qemu-devel] [PATCH] cirrus_vga/migration: update the bank offset before use

2018-11-22 Thread linzhecheng
From: Wang Xin The cirrus bank0/1 offset should be updated before we update the vram's alias offset. Signed-off-by: Wang Xin diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index d9b854d..a0e7146 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c @@ -2746,11

Re: [Qemu-devel] [PATCH] usb-host: set ifs.detached as true if kernel driver is not active

2018-11-20 Thread linzhecheng
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Tuesday, November 20, 2018 4:25 PM > To: linzhecheng > Cc: qemu-devel@nongnu.org; Zhoujian (jay) ; > wangxin (U) > Subject: Re: [PATCH] usb-host: set ifs.detached as true if kernel driv

[Qemu-devel] [PATCH v2] usb-host: set ifs.detached as true if kernel driver is not active

2018-11-20 Thread linzhecheng
If no kernel driver is active, we can already claim and perform I/O on it without detaching it. Signed-off-by: linzhecheng diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index f31e9cbbb8..b6602ded4e 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1120,6 +1120,9

[Qemu-devel] [PATCH] usb-host: set ifs.detached as true if kernel driver is not active

2018-11-19 Thread linzhecheng
If no kernel driver is active, we can already claim and perform I/O on it without detaching it. Signed-off-by: linzhecheng diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index f31e9cbbb8..db4ae1e6e8 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1119,6 +1119,10

[Qemu-devel] one issue about usb passsthrough devices

2018-10-31 Thread linzhecheng
Hi, all A found a problem about libusb, the reproducing steps are as followed: 1. start up a vm with host-usb devices 2. kill -9 `pgrep qemu` We can not see the usb device on host any more, I think this is because qemu has no chance to release resources to kernel in this case. How can we recover

[Qemu-devel] question about usb passthrough migration

2018-09-28 Thread linzhecheng
Hi, Gerd I'm still trying to realize local live-migration with usb passthrough devices for purpose of upgrading qemu. I've made sure that source and target vms will not access host usb devices at the same time. But when I test USB flash disk copying files during live-migration stage, I

[Qemu-devel] question about usb passthrough migration

2018-09-24 Thread linzhecheng
Hi, Gerd I'm still trying to realize local live-migration with usb passthrough devices for purpose of upgrading qemu. I've make sure source and target vms will not access host usb devices at the same time. But when I test USB flash disk copying files during live-migration stage, I encounter a

Re: [Qemu-devel] Some confusion about live migration of usb device

2018-09-07 Thread linzhecheng
> -Original Message- > From: gerd hoffmann [mailto:kra...@redhat.com] > Sent: Friday, September 07, 2018 2:23 PM > To: CheneyLin > Cc: linzhecheng ; wangxin (U) > ; qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] Some confusion about live migration of usb devic

Re: [Qemu-devel] Some confusion about live migration of usb device

2018-09-06 Thread linzhecheng
> Sent: Thursday, September 06, 2018 8:04 PM > To: linzhecheng > Cc: CheneyLin ; wangxin (U) > ; qemu-devel@nongnu.org > Subject: Re: Some confusion about live migration of usb device > > On Thu, Sep 06, 2018 at 10:25:20AM +, linzhecheng wrote: > > Hi, Gerd > > > >

[Qemu-devel] Some confusion about live migration of usb device

2018-09-06 Thread linzhecheng
Hi, Gerd I'm going through relevant codes about live migration of usb devices, it seems that we will not save/load USBpacket in any vmstate, so pending usb packets will be lost after live migration, is it a problem?

Re: [Qemu-devel] [PATCH] usb-host: insert usb device into hostdevs to be scaned

2018-08-19 Thread linzhecheng
> -Original Message- > From: gerd hoffmann [mailto:kra...@redhat.com] > Sent: Friday, August 17, 2018 2:08 PM > To: CheneyLin > Cc: linzhecheng ; wangxin (U) > ; qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] [PATCH] usb-host: insert usb device into ho

Re: [Qemu-devel] [PATCH] usb-host: insert usb device into hostdevs to be scaned

2018-08-16 Thread linzhecheng
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Thursday, August 16, 2018 6:46 PM > To: linzhecheng > Cc: qemu-devel@nongnu.org; wangxin (U) > Subject: Re: [PATCH] usb-host: insert usb device into hostdevs to be scaned > > On Th

[Qemu-devel] [PATCH] usb-host: insert usb device into hostdevs to be scaned

2018-08-16 Thread linzhecheng
futile to walk devs in usb_host_auto_check periodically if hostdevs is empty, so let's delete the usb_auto_timer. Signed-off-by: linzhecheng diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index f31e9cbbb8..632abaa390 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c

[Qemu-devel] issue about numa configure

2018-07-19 Thread linzhecheng
Hi, all I found that qemu has a constraint in function numa_node_parse now: If (node->has_memdev != have_memdevs) { Error_setg(errp, "qemu: memdev option must be specified for either " "all or no nodes"); Return; } This restricts us from being able

[Qemu-devel] Some issues of hotpluging memory and cpus

2018-06-25 Thread linzhecheng
Hi, all, I had some problems when doing memory hot plugging. After a lot of tests, I was able to stably reproduce the following issues with Windows 2012 R2: 1. If I hot-plug the memory immediately after hot-plugging the CPUs, these memory devices will not be detected by windows OS because I

[Qemu-devel] [PATCH v2] vhost-user: delete net client if necessary

2018-06-11 Thread linzhecheng
As qemu_new_net_client create new ncs but error happens later, ncs will be left in global net_clients list and we can't use them any more, so we need to cleanup them. Signed-off-by: linzhecheng diff --git a/net/vhost-user.c b/net/vhost-user.c index 608b837175..a39f9c9974 100644 --- a/net/vhost

[Qemu-devel] [PATCH] vhost-user: delete net client if necessary

2018-06-11 Thread linzhecheng
As qemu_new_net_client create new ncs but error happens later, ncs will be left in global net_clients list, so we need to cleanup them. Signed-off-by: linzhecheng diff --git a/net/vhost-user.c b/net/vhost-user.c index 608b837175..1c7ee48b60 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c

Re: [Qemu-devel] [PATCH] socket: dont't free msgfds if error equals EAGAIN

2018-05-29 Thread linzhecheng
I think this patch doesn't fix my issue. For more details, please see Gonglei's reply. https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg06296.html > -邮件原件- > 发件人: Marc-André Lureau [mailto:marcandre.lur...@gmail.com] > 发送时间: 2018年5月29日 17:11 > 收件人: linzhecheng > 抄

Re: [Qemu-devel] [PATCH] socket: dont't free msgfds if error equals EAGAIN

2018-05-29 Thread linzhecheng
CC'ing Daniel P. Berrangé , Peter Xu, Marc-André Lureau, Eric Blake, Gonglei > -邮件原件- > 发件人: linzhecheng > 发送时间: 2018年5月29日 10:53 > 收件人: qemu-devel@nongnu.org > 抄送: pbonz...@redhat.com; wangxin (U) ; > linzhecheng > 主题: [PATCH] socket: dont't free msgfds i

[Qemu-devel] [PATCH] socket: dont't free msgfds if error equals EAGAIN

2018-05-28 Thread linzhecheng
Signed-off-by: linzhecheng diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 159e69c3b1..17519ec589 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -134,8 +134,8 @@ static int tcp_chr_write(Chardev *chr, const uint8_t *buf, int len

[Qemu-devel] [PATCH] cpus: remove useless cond signal

2018-05-14 Thread linzhecheng
commit dbadee4 removed qemu_cond_wait in cpu_remove_sync, so it is useless to keep qemu_cond_signal here. Signed-off-by: linzhecheng <linzhech...@huawei.com> diff --git a/cpus.c b/cpus.c index 5bcd3ecf38..c7262484f3 100644 --- a/cpus.c +++ b/cpus.c @@ -1222,7 +1222,6 @@ stati

[Qemu-devel] [Bug 1575607] Re: vm startup failed, qemu returned "kvm run failed Bad address"

2018-05-10 Thread linzhecheng
have resolved it? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1575607 Title: vm startup failed, qemu returned "kvm run failed Bad address" Status in QEMU: New Bug description: create a

Re: [Qemu-devel] [Bug Report] vm paused after succeeding to migrate

2018-04-12 Thread linzhecheng
> -邮件原件- > 发件人: Dr. David Alan Gilbert [mailto:dgilb...@redhat.com] > 发送时间: 2018年4月12日 20:37 > 收件人: linzhecheng <linzhech...@huawei.com>; pbonz...@redhat.com > 抄送: qemu-devel@nongnu.org; wangxin (U) <wangxinxin.w...@huawei.com>; > Zhoujian (jay) &l

[Qemu-devel] [Bug Report] vm paused after succeeding to migrate

2018-04-12 Thread linzhecheng
Hi, all I encounterd a bug when I try to migrate a windows vm. Enviroment information: host A: cpu E5620(model WestmereEP without flag xsave) host B: cpu E5-2643(model SandyBridgeEP with xsave) The reproduce steps is : 1. Start a windows 2008 vm with -cpu host(which means host-passthrough). 2.

[Qemu-devel] [PATCH] cpu: skip unpluged cpu when querying cpus

2018-04-11 Thread linzhecheng
From: XuYandong After vcpu1 thread exiting, vcpu0 thread (received notification) is still waiting for holding qemu_global_mutex in cpu_remove_sync, at this moment, vcpu1 is still in global cpus list. If main thread grab qemu_global_mutex in order to handle qmp command

[Qemu-devel] [PATCH v2] virtio-serial: fix heap-over-flow

2018-03-28 Thread linzhecheng
ead to heap-over-flow. Signed-off-by: linzhecheng <linzhech...@huawei.com> diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index 9470bd7be7..d2dd8ab502 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c @@ -580,13 +580,16 @@ static void s

[Qemu-devel] [PATCH] virtio-serial: fix heap-over-flow

2018-03-27 Thread linzhecheng
ead to heap-over-flow. Signed-off-by: linzhecheng <linzhech...@huawei.com> diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index 9470bd7be7..3695172f37 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c @@ -580,11 +580,12 @@ static void s

[Qemu-devel] [PATCH] tap: delete tap(net client) if net_init_tap_one failed

2018-03-05 Thread linzhecheng
If net_init_tap_one failed but net_tap_fd_init succeeded, we should delete the TAPState *s without vhostforce and has_vhostforce flag. Signed-off-by: linzhecheng <linzhech...@huawei.com> diff --git a/net/tap.c b/net/tap.c index 2b3a36f9b5..1cb8eaf31f 100644 --- a/net/tap.c +++ b/net

[Qemu-devel] [PATCH v2] vhost-user: fix memory leak

2018-02-12 Thread linzhecheng
g_free() was moved from vhost_net_cleanup in commit e6bcb1b, so we should free net after vhost_net_cleanup Signed-off-by: linzhecheng <linzhech...@huawei.com> diff --git a/net/vhost-user.c b/net/vhost-user.c index cb45512506..d024573e45 100644 --- a/net/vhost-user.c +++ b/net/vhost-

[Qemu-devel] 答复: [PATCH] vhost-user: fix memory leak

2018-02-12 Thread linzhecheng
> -邮件原件- > 发件人: Philippe Mathieu-Daudé [mailto:philippe.mathieu.da...@gmail.com] > 代表 Philippe Mathieu-Daudé > 发送时间: 2018年2月13日 11:54 > 收件人: linzhecheng <linzhech...@huawei.com>; qemu-devel@nongnu.org > 抄送: pbonz...@redhat.com; wangxin (U) <wangxinxin.w.

[Qemu-devel] [PATCH] vhost-user: fix memory leak

2018-02-12 Thread linzhecheng
fix memory leak Signed-off-by: linzhecheng <linzhech...@huawei.com> diff --git a/net/vhost-user.c b/net/vhost-user.c index cb45512506..d024573e45 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -109,6 +109,7 @@ static int vhost_user_start(int queues, NetClientState *ncs[], CharB

[Qemu-devel] [PATCH v2] vcpu: join vcpu thread after it exiting

2018-02-01 Thread linzhecheng
As we create vcpu thread with QEMU_THREAD_JOINABLE mode, we should join it after it exiting to cleanup resources. Signed-off-by: linzhecheng <linzhech...@huawei.com> diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index f290f48..5cc1ba2 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/k

[Qemu-devel] [PATCH] vcpu: join vcpu thread after it exiting

2018-01-31 Thread linzhecheng
As we create vcpu thread with QEMU_THREAD_JOINABLE mode, we should join it after it exiting to cleanup resources. Signed-off-by: linzhecheng <linzhech...@huawei.com> diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index f290f48..6ff71e4 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/k

[Qemu-devel] [PATCH] vcpu: create vcpu thread with QEMU_THREAD_DETACHED mode

2018-01-19 Thread linzhecheng
1. If we create vcpu thread with QEMU_THREAD_JOINABLE mode, we will get memory leak when vcpu thread exits, which will happen when hot-unplug vcpus. 2. We should use QLIST_FOREACH_SAFE instead of QLIST_FOREACH if we need to remove the entry in QLIST. Signed-off-by: linzhecheng <li...@zju.edu

[Qemu-devel] [PATCH] scsi: handle the special parameters

2018-01-14 Thread linzhecheng
scsi_disk_emulate_command calls scsi_build_sense(NULL, 0, outbuf, r->buflen, (req->cmd.buf[1] & 1) == 0); But scsi_convert_sense doesn't handle the case when in_buf is NULL or in_len is 0, which will lead to segfault. Signed-off-by: linzhecheng

[Qemu-devel] [PATCH] memory: set ioeventfd_update_pending after address_space_update_ioeventfds

2018-01-14 Thread linzhecheng
We should set ioeventfd_update_pending same as memory_region_update_pending. Signed-off-by: linzhecheng <li...@zju.edu.cn> --- memory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/memory.c b/memory.c index 4b41fb8..0cf39d0 100644 --- a/memory.c +++ b/memory.c @@ -1091,6 +1091,7 @

[Qemu-devel] [PATCH v3] vga: check the validation of memory addr when draw text

2018-01-11 Thread linzhecheng
of the upper left pixel or character of the screen. The address may be out of the range of vga ram. So we should check the validation of memory address when reading or writing it to avoid segfault. Signed-off-by: linzhecheng <linzhech...@huawei.com> --- hw/display/vga.c | 3 +++ 1 file chan

[Qemu-devel] [PATCH v2] vga: check the validation of memory addr when draw text

2018-01-11 Thread linzhecheng
modify the the display memory address of the upper left pixel or character of the screen. The address may be out of the range of vga ram. So we should check the validation of memory address when reading or writing it to avoid segfault. Signed-off-by: linzhecheng <linzhech...@huawei.com> ---

[Qemu-devel] [PATCH] irq: fix memory leak

2017-12-24 Thread linzhecheng
entry is moved from list but is not freed. Signed-off-by: linzhecheng <linzhech...@huawei.com> diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 351b64f77c..3c920db79a 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -3494,6 +3494,7 @@ int kvm_arch_release_virq_post(in

[Qemu-devel] [PATCH] input: fix memory leak

2017-12-24 Thread linzhecheng
If kbd_queue is not empty and queue_count >= queue_limit, we should free evt. Change-Id: Ieeacf90d5e7e370a40452ec79031912d8b864d83 Signed-off-by: linzhecheng <linzhech...@huawei.com> diff --git a/ui/input.c b/ui/input.c index 3e2d324278..e5b78aae9e 100644 --- a/ui/input.c +++ b/u

[Qemu-devel] [PATCH] vga: check the validation of memory addr when draw text

2017-12-24 Thread linzhecheng
of vga ram. So we should check the validation of memory address when reading or writing it to avoid segfault. Signed-off-by: linzhecheng <linzhech...@huawei.com> Change-Id: Ib7466361b18e0a232fc068aad50d2113701786ab diff --git a/hw/display/vga.c b/hw/display/vga.c index a0412000a5..c265572bf3

Re: [Qemu-devel] [PULL 02/46] qemu-thread: fix races on threads that exit very quickly

2017-12-20 Thread linzhecheng
> -邮件原件- > 发件人: Eric Blake [mailto:ebl...@redhat.com] > 发送时间: 2017年12月21日 11:36 > 收件人: linzhecheng <linzhech...@huawei.com>; Paolo Bonzini > <pbonz...@redhat.com>; qemu-devel@nongnu.org; f...@redhat.com > 抄送: wangxin (U) <wangxinxin.w...@huawei.com>

Re: [Qemu-devel] [PULL 02/46] qemu-thread: fix races on threads that exit very quickly

2017-12-20 Thread linzhecheng
> -邮件原件- > 发件人: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] 代表 Paolo Bonzini > 发送时间: 2017年12月21日 1:14 > 收件人: qemu-devel@nongnu.org > 抄送: linzhecheng <linzhech...@huawei.com> > 主题: [PULL 02/46] qemu-thread: fix races on threads that exit very quickly > &g

[Qemu-devel] [Question] vhost-user: hot-unplug vhost-user nic for windows guest OS will fail with 100% reproduce rate

2017-12-07 Thread linzhecheng
Hi, guys I met a problem when hot-unplug vhost-user nic for Windows 2008 rc2 sp1 64 (Guest OS) The xml of nic is as followed: Firstly, I use virsh attach-device win2008 vif.xml to hot-plug a nic for Guest OS. This operation returns success. After guest OS discover nic

[Qemu-devel] [BUG] vhost-user: hot-unplug vhost-user nic for windows guest OS will fail with 100% reproduce rate

2017-12-07 Thread linzhecheng
Hi, guys I met a problem when hot-unplug vhost-user nic for Windows 2008 rc2 sp1 64 (Guest OS) The xml of nic is as followed: Firstly, I use virsh attach-device win2008 vif.xml to hot-plug a nic for Guest OS. This operation returns success. After guest OS discover nic

[Qemu-devel] [PATCH v4] thread: move detach_thread from creating thread to created thread

2017-11-27 Thread linzhecheng
22f2ffc6491b Signed-off-by: linzhecheng <linzhech...@huawei.com> diff --git a/include/qemu/thread-posix.h b/include/qemu/thread-posix.h index f3f47e4..4c6dbb8 100644 --- a/include/qemu/thread-posix.h +++ b/include/qemu/thread-posix.h @@ -44,4 +44,12 @@ struct QemuThread { pthread_t thread; };

[Qemu-devel] [PATCH v3] thread: move detach_thread from creating thread to created thread

2017-11-27 Thread linzhecheng
22f2ffc6491b Signed-off-by: linzhecheng <linzhech...@huawei.com> --- include/qemu/thread-posix.h | 8 include/qemu/thread.h | 1 + util/qemu-thread-posix.c| 45 ++--- 3 files changed, 43 insertions(+), 11 deletions(-) diff --git a/include/

[Qemu-devel] [PATCH v2] thread: move detach_thread from creating thread to created thread

2017-11-27 Thread linzhecheng
ated to avoid this concurrency problem. Change-Id: I2293d5be1526241cf58785d701b922f2ffc6491b Signed-off-by: linzhecheng <linzhech...@huawei.com> --- include/qemu/thread-posix.h | 8 include/qemu/thread.h | 1 + util/qemu-thread-posix.c| 45 ++-

[Qemu-devel] [PATCH] thread: move detach_thread from creating thread to created thread

2017-11-27 Thread linzhecheng
. */ 407__free_tcb (pd); created thread found that pd is detached, so it freed pd, in this case, pd became an invalid address. I rewrite qemu_thread_create to move detach_thread from creating thread to created to avoid this concurrency problem. Signed-off-by: linzhecheng <linzhech..

[Qemu-devel] [PATCH] fix: unrealize virtio device if we fail to hotplug it

2017-10-31 Thread linzhecheng
from vm_change_state_head. Adding unrealize function of virtio-blk device can solve this problem. Signed-off-by: linzhecheng <linzhech...@huawei.com> --- hw/virtio/virtio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 5884ce3480..ea53

[Qemu-devel] [Bug] virtio-blk: qemu will crash if hotplug virtio-blk device failed

2017-10-30 Thread linzhecheng
I found that hotplug virtio-blk device will lead to qemu crash. Re-production steps: 1. Run VM named vm001 2. Create a virtio-blk.xml which contains wrong configurations: 3. Run command : virsh attach-device vm001 vm001 Libvirt will return err msg: error: Failed