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
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
> -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
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 , ma
> -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
>
> -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
>
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?
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 +274
> -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
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
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
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 e
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
encounte
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
> -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
> 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
> >
> >
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?
> -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
> -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
it's 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/us
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 to
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 cann
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/
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
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
> 收件人: linzheche
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 fre
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
commit dbadee4 removed qemu_cond_wait in cpu_remove_sync, so it is
useless to keep qemu_cond_signal here.
Signed-off-by: linzhecheng
diff --git a/cpus.c b/cpus.c
index 5bcd3ecf38..c7262484f3 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1222,7 +1222,6 @@ static void *qemu_kvm_cpu_thread_fn(void *arg
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 v
> -邮件原件-
> 发件人: Dr. David Alan Gilbert [mailto:dgilb...@redhat.com]
> 发送时间: 2018年4月12日 20:37
> 收件人: linzhecheng ; pbonz...@redhat.com
> 抄送: qemu-devel@nongnu.org; wangxin (U) ;
> Zhoujian (jay) ; quint...@redhat.com
> 主题: Re: [Qemu-devel] [Bug Report] vm pause
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. Mi
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 "info
cpus",
qmp_query_cp
lead to heap-over-flow.
Signed-off-by: linzhecheng
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 set_config(VirtIODevice *vdev, const
lead to heap-over-flow.
Signed-off-by: linzhecheng
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 set_config(VirtIODevice *vdev, const
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
diff --git a/net/tap.c b/net/tap.c
index 2b3a36f9b5..1cb8eaf31f 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -651,7 +651,7 @@ static
g_free() was moved from vhost_net_cleanup in commit e6bcb1b, so we should
free net after vhost_net_cleanup
Signed-off-by: linzhecheng
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
> -邮件原件-
> 发件人: Philippe Mathieu-Daudé [mailto:philippe.mathieu.da...@gmail.com]
> 代表 Philippe Mathieu-Daudé
> 发送时间: 2018年2月13日 11:54
> 收件人: linzhecheng ; qemu-devel@nongnu.org
> 抄送: pbonz...@redhat.com; wangxin (U) ;
> lidonglin ; m...@redhat.com
> 主题: Re: [Q
fix memory leak
Signed-off-by: linzhecheng
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[], CharBackend *be)
err:
if (net
As we create vcpu thread with QEMU_THREAD_JOINABLE mode,
we should join it after it exiting to cleanup resources.
Signed-off-by: linzhecheng
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/kvm/kvm-all.c
@@ -282,9 +282,9
As we create vcpu thread with QEMU_THREAD_JOINABLE mode,
we should join it after it exiting to cleanup resources.
Signed-off-by: linzhecheng
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/kvm/kvm-all.c
@@ -282,9 +282,9
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
diff --git a
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
--
We should set ioeventfd_update_pending same as memory_region_update_pending.
Signed-off-by: linzhecheng
---
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 @@ void
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
---
hw/display/vga.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw
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
---
hw/display/vga.c | 3 +++
1 file changed, 3 insertions
entry is moved from list but is not freed.
Signed-off-by: linzhecheng
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(int virq)
if (entry->v
If kbd_queue is not empty and queue_count >= queue_limit,
we should free evt.
Change-Id: Ieeacf90d5e7e370a40452ec79031912d8b864d83
Signed-off-by: linzhecheng
diff --git a/ui/input.c b/ui/input.c
index 3e2d324278..e5b78aae9e 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -421,6 +421,8 @@ v
vga ram. So we should check the validation of memory address
when reading or writing it to avoid segfault.
Signed-off-by: linzhecheng
Change-Id: Ib7466361b18e0a232fc068aad50d2113701786ab
diff --git a/hw/display/vga.c b/hw/display/vga.c
index a0412000a5..c265572bf3 100644
--- a/hw/display/vga.c
> -邮件原件-
> 发件人: Eric Blake [mailto:ebl...@redhat.com]
> 发送时间: 2017年12月21日 11:36
> 收件人: linzhecheng ; Paolo Bonzini
> ; qemu-devel@nongnu.org; f...@redhat.com
> 抄送: wangxin (U)
> 主题: Re: [Qemu-devel] [PULL 02/46] qemu-thread: fix races on threads that
> exit ve
> -邮件原件-
> 发件人: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] 代表 Paolo Bonzini
> 发送时间: 2017年12月21日 1:14
> 收件人: qemu-devel@nongnu.org
> 抄送: linzhecheng
> 主题: [PULL 02/46] qemu-thread: fix races on threads that exit very quickly
>
> From: 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 succe
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 succe
58785d701b922f2ffc6491b
Signed-off-by: linzhecheng
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;
};
+typedef stru
58785d701b922f2ffc6491b
Signed-off-by: linzhecheng
---
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/thread-
d to
created
to avoid this concurrency problem.
Change-Id: I2293d5be1526241cf58785d701b922f2ffc6491b
Signed-off-by: linzhecheng
---
include/qemu/thread-posix.h | 8
include/qemu/thread.h | 1 +
util/qemu-thread-posix.c| 45 ++---
3 f
(pd))
406/* Free the TCB. */
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: linzhechen
be removed
from vm_change_state_head.
Adding unrealize function of virtio-blk device can solve this problem.
Signed-off-by: linzhecheng
---
hw/virtio/virtio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 5884ce3480..ea532dc35f 100644
--- a
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 t
58 matches
Mail list logo