[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] bugfix: cannot remove chardev after the vhost-user
From: |
zhangkun |
Subject: |
[Qemu-devel] [PATCH] bugfix: cannot remove chardev after the vhost-user does hot add/del pci device |
Date: |
Fri, 23 Jan 2015 18:01:59 +0800 |
From: zhangkun <address@hidden>
step for vhost-user hotplug:
1.hot add
chardev-add backend=socket,id=charnet0,path=/var/run/vhost-user/tap0
netdev_add type=vhost-user,id=hostnet0,chardev=charnet0
device_add virtio-net-pci,netdev=hostnet0,id=net0
2.hot del
device_del net0
netdev_del hostnet0
chardev-remove charnet0
Signed-off-by: zhangkun <address@hidden>
---
net/vhost-user.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/vhost-user.c b/net/vhost-user.c
index 24e050c..d6936ca 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -72,6 +72,7 @@ static void vhost_user_cleanup(NetClientState *nc)
VhostUserState *s = DO_UPCAST(VhostUserState, nc, nc);
vhost_user_stop(s);
+ qemu_chr_add_handlers(s->chr, NULL, NULL, NULL, NULL);
qemu_purge_queued_packets(nc);
}
--
1.7.12.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] bugfix: cannot remove chardev after the vhost-user does hot add/del pci device,
zhangkun <=