Re: [Qemu-devel] [Migration Bug? ] Occasionally, the content of VM's memory is inconsistent between Source and Destination of migration

2015-03-25 Thread Li Zhijian
a std it seems easily to reproduce this issue by following steps in ubuntu guest 1.  in source side, choose memtest in grub 2. do live migration 3. exit memtest(type Esc in when memory testing) 4. wait migration complete Best regards. Li Zhijian

Re: [Qemu-devel] [PATCH v2 for-2.3] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Li Zhijian
ay). Save the size in virtio_blk_handle_request, and use it when the request is completed. Based on a patch by Wen Congyang. Signed-off-by: Wen Congyang Signed-off-by: Paolo Bonzini Tested-by: Li Zhijian Thanks Li Zhijian --- hw/block/dataplane/virtio-blk.c | 3 +-- hw/block/vi

[Qemu-devel] [PATCH] net: walk through filters reversely if traffic is outgress

2016-01-22 Thread Li Zhijian
Previously, if the netdev has more than one filters, the ingress or outgress traffic pass the filter in the same order. this patch is to make the outgress pass the filter in a reverse order Signed-off-by: Wen Congyang Signed-off-by: Li Zhijian --- include/net/net.h | 4 +++- net/filter.c

Re: [Qemu-devel] COLO: how to flip a secondary to a primary?

2016-01-24 Thread Li Zhijian
hat is now the primary dont need to do anything > special. Yes, you are right. Hailiang or Zhijian can answer this question. Thanks Li Zhijian

Re: [Qemu-devel] [PATCH] net: walk through filters reversely if traffic is outgress

2016-01-24 Thread Li Zhijian
On 01/25/2016 12:58 PM, Jason Wang wrote: On 01/22/2016 04:11 PM, Li Zhijian wrote: Previously, if the netdev has more than one filters, the ingress or outgress traffic pass the filter in the same order. this patch is to make the outgress pass the filter in a reverse order Need a

Re: [Qemu-devel] COLO: how to flip a secondary to a primary?

2016-01-25 Thread Li Zhijian
On 01/26/2016 04:20 AM, Dr. David Alan Gilbert wrote: * Li Zhijian (lizhij...@cn.fujitsu.com) wrote: On 01/25/2016 09:32 AM, Wen Congyang wrote: f) I've not thought about the colo-proxy that much yet - I guess that existing connections need to keep their sequence number o

[Qemu-devel] [PATCH V2] net: awlays walk through filters reversely if traffic is outgress

2016-01-25 Thread Li Zhijian
gt;emulated device After this changes, outgress traffic always pass through filters in a reverse order. Signed-off-by: Wen Congyang Signed-off-by: Li Zhijian --- include/net/net.h | 4 +++- net/filter.c | 21 +++-- net/net.c | 20 +++- 3 files changed

[Qemu-devel] [PATCH V3] net: always walk through filters in reverse if traffic is egress

2016-01-25 Thread Li Zhijian
lated device After this changes, egress traffic always pass through filters in a reverse order. Signed-off-by: Wen Congyang Signed-off-by: Li Zhijian Reviewed-by: Yang Hongyang --- include/net/net.h | 4 +++- net/filter.c | 21 +++-- net/net.c | 20 ++

Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-01-28 Thread Li Zhijian
u-devel/2015-12/msg00758.html after applying this patch, the qemu monitor tell me following message: (qemu) qemu-system-x86_64: net socket is not connected Connection refused Thanks Li Zhijian

Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-01-31 Thread Li Zhijian
On 02/01/2016 10:57 AM, Jason Wang wrote: On 01/29/2016 09:38 AM, Li Zhijian wrote: On 01/28/2016 01:44 PM, Jason Wang wrote: On 01/27/2016 10:40 AM, Zhang Chen wrote: From: ZhangChen Traffic-mirror is a netfilter plugin. It gives qemu the ability to copy and mirror guest'

Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-02-01 Thread Li Zhijian
On 02/01/2016 05:11 PM, Dr. David Alan Gilbert wrote: * Li Zhijian (lizhij...@cn.fujitsu.com) wrote: On 02/01/2016 10:57 AM, Jason Wang wrote: On 01/29/2016 09:38 AM, Li Zhijian wrote: On 01/28/2016 01:44 PM, Jason Wang wrote: On 01/27/2016 10:40 AM, Zhang Chen wrote: From

Re: [Qemu-devel] safety of migration_bitmap_extend

2015-11-13 Thread Li Zhijian
d by ram blocks not including any * gaps due to alignment or unplugs. */ -migration_dirty_pages = ram_bytes_total() >> TARGET_PAGE_BITS; +migration_bitmap_rcu->dirty_pages = ram_bytes_total() >> TARGET_PAGE_BITS; memory_global_dirty_log_start(); migration_bitmap_

Re: [Qemu-devel] [PATCH COLO-Frame v11 32/39] COLO: Separate the process of saving/loading ram and device state

2015-11-26 Thread Li Zhijian
reduce the size of extra memory been used during checkpoint. Besides, we move the colo_flush_ram_cache to the proper position after the above change. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- v11: - Remove load configuration section in qemu_loadvm_state_begin() --- include

Re: [Qemu-devel] [PATCH COLO-Frame v11 18/39] COLO: Flush PVM's cached RAM into SVM's memory

2015-11-26 Thread Li Zhijian
sure flush RAM cache before load device state. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Gonglei --- v11: - Move the place of 'need_flush' (Dave's suggestion) - Remove unused 'DPRINTF("Flush ram_cache\n")' v10: - trace the number of dirt

Re: [Qemu-devel] [PATCH COLO-Frame v11 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2015-11-29 Thread Li Zhijian
On 11/24/2015 05:25 PM, zhanghailiang wrote: We add each netdev a default filter-buffer, which will be used for COLO or Micro-checkpoint to buffer VM's packets. The name of default filter-buffer is 'nop'. For the default filter-buffer, it will not buffer any packets in default. So it has no side

[Qemu-devel] [TCG only][Migration Bug? ] Occasionally, the content of VM's memory is inconsistent between Source and Destination of migration

2015-12-02 Thread Li Zhijian
Hi all, Does anyboday remember the similar issue post by hailiang months ago http://patchwork.ozlabs.org/patch/454322/ At least tow bugs about migration had been fixed since that. And now we found the same issue at the tcg vm(kvm is fine), after migration, the content VM's memory is inconsiste

Re: [Qemu-devel] [TCG only][Migration Bug? ] Occasionally, the content of VM's memory is inconsistent between Source and Destination of migration

2015-12-03 Thread Li Zhijian
On 12/03/2015 05:24 PM, Dr. David Alan Gilbert wrote: * Li Zhijian (lizhij...@cn.fujitsu.com) wrote: Hi all, Does anyboday remember the similar issue post by hailiang months ago http://patchwork.ozlabs.org/patch/454322/ At least tow bugs about migration had been fixed since that. Yes, I

Re: [Qemu-devel] [TCG only][Migration Bug? ] Occasionally, the content of VM's memory is inconsistent between Source and Destination of migration

2015-12-03 Thread Li Zhijian
On 12/03/2015 05:37 PM, Hailiang Zhang wrote: On 2015/12/3 17:24, Dr. David Alan Gilbert wrote: * Li Zhijian (lizhij...@cn.fujitsu.com) wrote: Hi all, Does anyboday remember the similar issue post by hailiang months ago http://patchwork.ozlabs.org/patch/454322/ At least tow bugs about

[Qemu-devel] [PATCH] report a error message if -net socket can not connect to server

2015-12-03 Thread Li Zhijian
From: Li Zhijian -netdev socket,connect=xx:xx now is asynchronous to connect listening server, if we don't start listening server before connecting, no error is detected but we can connect to listening server forever. Just report a error message in this case? Signed-off-by: Li Zh

Re: [Qemu-devel] [Patch v8 2/3] quorum: implement bdrv_add_child() and bdrv_del_child()

2015-12-14 Thread Li Zhijian
On 11/27/2015 02:06 PM, Wen Congyang wrote: Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 8 ++-- block/quorum.c| 124 +- include/block/block.h | 4 ++ 3 files chang

Re: [Qemu-devel] [Patch v8 3/3] qmp: add monitor command to add/remove a child

2015-12-14 Thread Li Zhijian
"id": "test_new_node", +"file": { "driver": "file", + "filename": "test.raw" } } } } +<- { "return": {} } +-> { "execute": "x-blockdev-change", +"arguments": { "parent": "disk1", + "node": "new_node" } } +<- { "return": {} } + +Delete a quorum's node +-> { "execute": "x-blockdev-change", +"arguments": { "parent": "disk1", + "child": "children.2" } } +<- { "return": {} } + +EQMP + +{ .name = "query-named-block-nodes", .args_type = "", .mhandler.cmd_new = qmp_marshal_query_named_block_nodes, -- Best regards. Li Zhijian (8555)

[Qemu-devel] [PATCH 3/4] backends/hostmem-file: fix fb->mem_path leak

2015-12-22 Thread Li Zhijian
Signed-off-by: Li Zhijian --- backends/hostmem-file.c | 8 1 file changed, 8 insertions(+) diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c index e9b6d21..5a73fd0 100644 --- a/backends/hostmem-file.c +++ b/backends/hostmem-file.c @@ -116,11 +116,19

[Qemu-devel] [PATCH 1/4] net/filter: fix nf->netdev_id leak

2015-12-22 Thread Li Zhijian
Cc: Jason Wang Signed-off-by: Li Zhijian --- net/filter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/filter.c b/net/filter.c index 1365bad..f777ba2 100644 --- a/net/filter.c +++ b/net/filter.c @@ -204,6 +204,7 @@ static void netfilter_finalize(Object *obj) if (nf->net

[Qemu-devel] [PATCH 4/4] hw/ppc/spapr: fix spapr->kvm_type leak

2015-12-22 Thread Li Zhijian
Cc: David Gibson Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Li Zhijian --- hw/ppc/spapr.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 6bfb908..65b2d61 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2101,6 +2101,13

[Qemu-devel] [PATCH 2/4] net/dump: fix nfds->filename leak

2015-12-22 Thread Li Zhijian
Cc: Jason Wang Signed-off-by: Li Zhijian --- net/dump.c | 8 1 file changed, 8 insertions(+) diff --git a/net/dump.c b/net/dump.c index ce16a4b..347b5ca 100644 --- a/net/dump.c +++ b/net/dump.c @@ -329,6 +329,13 @@ static void filter_dump_instance_init(Object *obj

[Qemu-devel] [PATCH 0/4] fix memory leak which allocted by the setter of object_property_add_str

2015-12-22 Thread Li Zhijian
free the resources allocted by this setter at the instance finalization. Li Zhijian (4): net/filter: fix nf->netdev_id leak net/dump: fix nfds->filename leak backends/hostmem-file: fix fb->mem_path leak hw/ppc/spapr: fix spapr->kvm_type leak backends/hostmem-file.c | 8

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2015-12-31 Thread Li Zhijian
colo-proxy.h | 24 ++ qemu-options.hx | 6 + trace-events | 8 + vl.c | 3 +- 7 files changed, 1041 insertions(+), 1 deletion(-) create mode 100644 include/qemu/jhash.h create mode 100644 net/colo-proxy.c create mode 100644 net/colo-proxy.h . -- Best regards. Li Zhijian (8555)

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-02-29 Thread Li Zhijian
4 include/qemu/jhash.h create mode 100644 net/colo-proxy.c create mode 100644 net/colo-proxy.h -- 1.9.1 -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK . -- Best regards. Li Zhijian (8555)

Re: [Qemu-devel] [PATCH V2 1/3] net/filter-traffic: add filter-traffic.h

2016-02-29 Thread Li Zhijian
goto err; +} + +buf = g_malloc(size); +iov_to_buf(iov, iovcnt, 0, buf, size); +ret = qemu_chr_fe_write_all(s->chr_out, (uint8_t *)buf, size); +g_free(buf); +if (ret != size) { +goto err; +} + +return 0; + +err: +return ret < 0 ? ret : -EIO; +} + +#endif /* QEMU_FILTER_MIRROR_H */ s/MIRROR/TRAFFIC/ Thanks Li Zhijian

Re: [Qemu-devel] [PATCH V2 2/3] net/filter-redirector:Add filter-redirector

2016-02-29 Thread Li Zhijian
e_claim_no_fail(s->chr_in); +qemu_chr_add_handlers(s->chr_in, redirector_chr_can_read, + redirector_chr_read, NULL, nf); +} + +if (s->outdev) { +s->chr_out = qemu_chr_find(s->outdev); +if (s->chr_out == NULL) { +error_set(errp, ERR

Re: [Qemu-devel] [WIP:COLO: 1] Flush colo ram in parallel

2016-02-29 Thread Li Zhijian
common in real usage scene, Here, the idea of dividing ramblock by address, and flushing them in parallel could be used in colo_init_ram_cache(), where we need to backup the SVM's RAM into cache. Agreed, the backup job is very expensive currently, that is a good optimization. Best regards.

[Qemu-devel] [PATCH 2/2] migration: extend migration_bitmap

2015-06-26 Thread Li Zhijian
Prevously, if we hotplug a device(e.g. device_add e1000) during migration is processing in source side, qemu will add a new ram block but migration_bitmap is not extended. In this case, migration_bitmap will overflow and lead qemu abort unexpectedly. Signed-off-by: Li Zhijian Signed-off-by: Wen

[Qemu-devel] [PATCH 1/2] migration: protect migration_bitmap

2015-06-26 Thread Li Zhijian
Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- migration/ram.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 57368e1..4754aa9 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -222,6 +222,7

[Qemu-devel] [PATCH 0/2] avoid a hotplug operation leading migration's source side abort

2015-06-26 Thread Li Zhijian
5dcc000-55e42000 rw-p 00678000 08:04 14111744 /home/lizj/workspace/qemu/x86_64-softmmu/qemu-system-x86_64 55e42000-5affc000 rw-p 00:00 0 [heap] snip... Li Zhijian (2): migration: protect migration_bitmap migration: extend migra

Re: [Qemu-devel] [PATCH 2/2] migration: extend migration_bitmap

2015-06-26 Thread Li Zhijian
On 06/26/2015 05:05 PM, Juan Quintela wrote: Li Zhijian wrote: Prevously, if we hotplug a device(e.g. device_add e1000) during migration is processing in source side, qemu will add a new ram block but migration_bitmap is not extended. In this case, migration_bitmap will overflow and lead qemu

[Qemu-devel] [PATCH v2 2/2] migration: extend migration_bitmap

2015-06-26 Thread Li Zhijian
Prevously, if we hotplug a device(e.g. device_add e1000) during migration is processing in source side, qemu will add a new ram block but migration_bitmap is not extended. In this case, migration_bitmap will overflow and lead qemu abort unexpectedly. Signed-off-by: Li Zhijian Signed-off-by: Wen

[Qemu-devel] [PATCH v2 1/2] migration: protect migration_bitmap

2015-06-26 Thread Li Zhijian
Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- migration/ram.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 57368e1..4754aa9 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -222,6 +222,7

[Qemu-devel] [PATCH v2 0/2] avoid a hotplug operation leading migration's source side abort

2015-06-26 Thread Li Zhijian
5dcc000-55e42000 rw-p 00678000 08:04 14111744 /home/lizj/workspace/qemu/x86_64-softmmu/qemu-system-x86_64 55e42000-5affc000 rw-p 00:00 0 [heap] snip... Changes from v1 do bitmap_set after bitmap_copy Li Zhijian (2): migration: prot

[Qemu-devel] [PATCH v3 1/2] migration: protect migration_bitmap

2015-07-02 Thread Li Zhijian
Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Juan Quintela --- migration/ram.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 57368e1..187dbbb 100644 --- a/migration/ram.c +++ b

[Qemu-devel] [PATCH v3 0/2] avoid a hotplug operation leading migration's source side abort

2015-07-02 Thread Li Zhijian
y at the same time rather than migration_bitmap pointer. v2 - do bitmap_set after bitmap_copy Li Zhijian (2): migration: protect migration_bitmap migration: extend migration_bitmap exec.c | 5 + include/exec/exec-all.h | 3 +++ migratio

[Qemu-devel] [PATCH v3 2/2] migration: extend migration_bitmap

2015-07-02 Thread Li Zhijian
Prevously, if we hotplug a device(e.g. device_add e1000) during migration is processing in source side, qemu will add a new ram block but migration_bitmap is not extended. In this case, migration_bitmap will overflow and lead qemu abort unexpectedly. Signed-off-by: Li Zhijian Signed-off-by: Wen

Re: [Qemu-devel] [PATCH 09/12] netfilter: add a netbuffer filter

2015-07-29 Thread Li Zhijian
On 07/29/2015 06:51 PM, Yang Hongyang wrote: This filter is to buffer/release packets, this feature can be used when using macrocheckpoing, or other Remus like VM FT solutions, you s/macrocheckpoing/MicroCheckpointing/ the cover letter have the same typo -- Best regards. Li Zhijian

Re: [Qemu-devel] [PATCH COLO-Frame v8 24/34] COLO NIC: Implement colo nic device interface configure()

2015-08-05 Thread Li Zhijian
: zhanghailiang Signed-off-by: Li Zhijian --- I've not quite got this working right yet; after a failover, the secondary hasn't connected the tap to the right bridge; I'm still trying to figure that out. at failover, colo will execute the qemu script(default: /etc/qemu-ifup) to bring

[Qemu-devel] [PATCH] migration: use call_rcu instead of synchronize_rcu

2015-07-09 Thread Li Zhijian
from commit 2ff6403, we make a mistake to call synchronize_rcu() within rcu_read_lock()/rcu_read_unlock() Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Li Zhijian --- migration/ram.c | 49 - 1 file changed, 32 insertions

[Qemu-devel] [POC] colo-proxy in qemu

2015-07-19 Thread Li Zhijian
Hi, all We are planning to implement colo-proxy in qemu to cache and compare packets. This module is one of the important component of COLO project and now it is still in early stage, so any comments and feedback are warmly welcomed, thanks in advance. ## Background COLO FT/HA (COarse-grain LOck

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-20 Thread Li Zhijian
CC Wen Congyang On 07/20/2015 06:32 PM, Stefan Hajnoczi wrote: On Mon, Jul 20, 2015 at 02:42:33PM +0800, Li Zhijian wrote: We are planning to implement colo-proxy in qemu to cache and compare packets. I thought there is a kernel module to do that? Why does the proxy need to be part of the

Re: [Qemu-devel] [PATCH V2 3/3] tests/test-filter-redirector: Add unit test for filter-redirector

2016-03-03 Thread Li Zhijian
+ | | rd0+->+chardev| | +-+ +---+---+ | ^ | +-+ | | | rd1+--+ | +^+| | | +++| +-------+ | rd2<---+sock0 | +-+| +---+ + Thanks Li Zhijian

Re: [Qemu-devel] [PATCH V3 2/3] net/filter-mirror:Add filter-redirector func

2016-03-07 Thread Li Zhijian
ach time when you receive partial len, store them in the buffer and advance the pointer until you receive at least sizeof(len) bytes. qemu_chr_fe_read_all() seem have done this work. Do you mean that we implement a similar code to do that instead of qemu_chr_fe_read_all() thanks Li Zhijian Then

Re: [Qemu-devel] [PATCH V3 2/3] net/filter-mirror:Add filter-redirector func

2016-03-07 Thread Li Zhijian
On 03/07/2016 05:09 PM, Jason Wang wrote: On 03/07/2016 04:26 PM, Li Zhijian wrote: On 03/07/2016 03:56 PM, Jason Wang wrote: On 03/04/2016 08:01 PM, Zhang Chen wrote: Filter-redirector is a netfilter plugin. It gives qemu the ability to redirect net packet. redirector can redirect

Re: [Qemu-devel] [PULL 00/14] Net patches

2016-03-08 Thread Li Zhijian
On 03/09/2016 09:36 AM, Wen Congyang wrote: On 03/08/2016 05:54 PM, Peter Maydell wrote: On 8 March 2016 at 16:06, Zhang Chen wrote: I found the reason for this problem is that unix_connect() have not connect to sock_path before iov_send(). It need time to establish connection. so can we fix

Re: [Qemu-devel] [PATCH] net/filter: rename qemu_netfilter_pass_to_next() to qemu_netfilter_iterate()

2016-03-09 Thread Li Zhijian
until the packet is stolen(filter receiving handler return non-zero). In other words, packet could be handled by several filters at this function. BTW, it's difficult to determine what name is better. Thanks Li Zhijian On Mon, Mar 7, 2016 at 6:03 PM, Zhang Chen mailto:zhangchen.f...@cn.fuji

Re: [Qemu-devel] [PULL 00/14] Net patches

2016-03-09 Thread Li Zhijian
i don't know. Is this because that both qemu accepting the connection and qmp command are working under *iothread*, so that when the qemu command returns, we can guaranteed the connection is accepted ? Thanks Li Zhijian

Re: [Qemu-devel] [Patch 1/1] net/socket: Allocating Large sized arrays to heap

2016-03-13 Thread Li Zhijian
K) @@ -170,7 +170,6 @@ static void net_socket_send(void *opaque) s->index = 0; s->packet_len = 0; s->nc.link_down = true; -memset(s->buf, 0, sizeof(s->buf)); memset(s->nc.info_str, 0, sizeof(s->nc.info_str)); fo

Re: [Qemu-devel] [Patch 1/1] net/net: Allocating Large sized arrays to heap

2016-03-13 Thread Li Zhijian
return nc->info->receive(nc, buffer, offset); } + +g_free(buf); } ssize_t qemu_deliver_packet_iov(NetClientState *sender, -- Best regards. Li Zhijian

Re: [Qemu-devel] [PULL 00/14] Net patches

2016-03-14 Thread Li Zhijian
On 03/15/2016 11:07 AM, Jason Wang wrote: On 03/10/2016 11:51 AM, Li Zhijian wrote: On 03/10/2016 10:28 AM, Jason Wang wrote: On 03/08/2016 05:54 PM, Peter Maydell wrote: On 8 March 2016 at 16:06, Zhang Chen wrote: I found the reason for this problem is that unix_connect() have not

Re: [Qemu-devel] [PATCH] net/filter: rename qemu_netfilter_pass_to_next() to qemu_netfilter_iterate()

2016-03-14 Thread Li Zhijian
On 03/15/2016 11:08 AM, Jason Wang wrote: On 03/09/2016 04:02 PM, Li Zhijian wrote: On 03/08/2016 04:04 PM, Yang Hongyang wrote: Hi Chen, What's the motivation that you want to change this name? The function actually is not intent to iterate every filter. Right. but this fun

Re: [Qemu-devel] [PATCH V2 2/3] colo-compare: track connection and enqueue packet

2016-03-30 Thread Li Zhijian
+---v++---v+ +---v+ |primary | |secondary|primary | |secondary |packet | |packet +|packet | |packet + ++ ++++ ++ Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-

Re: [Qemu-devel] [PATCH V2 3/3] colo-compare: introduce packet comparison thread

2016-03-30 Thread Li Zhijian
On 03/30/2016 07:41 PM, Dr. David Alan Gilbert wrote: [...] >@@ -433,7 +532,9 @@ static void compare_pri_chr_in(void *opaque, const uint8_t *buf, int size) > if (ret == 1) { > if (packet_enqueue(s, PRIMARY_IN)) { > error_report("primary: unsupported packet in"); >-

Re: [Qemu-devel] [PATCH V2 0/3] Introduce COLO-compare

2016-03-30 Thread Li Zhijian
gilb...@redhat.com / Manchester, UK . -- Best regards. Li Zhijian (8555)

Re: [Qemu-devel] [PATCH V2 2/3] colo-compare: track connection and enqueue packet

2016-03-30 Thread Li Zhijian
ill be used, like lizhijian said. I mean you should remove this now, and re-introduce when you integrate to COLO frame Thanks Li Zhijian

Re: [Qemu-devel] [PATCH V2 0/3] Introduce COLO-compare

2016-03-31 Thread Li Zhijian
On 03/31/2016 05:43 PM, Dr. David Alan Gilbert wrote: * Li Zhijian (lizhij...@cn.fujitsu.com) wrote: On 03/30/2016 08:05 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: COLO-compare is a part of COLO project. It is used to compare the network package

Re: [Qemu-devel] [PATCH V2 1/3] colo-compare: introduce colo compare initlization

2016-03-31 Thread Li Zhijian
On 04/01/2016 01:11 PM, Jason Wang wrote: On 03/31/2016 05:24 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: On 03/30/2016 05:25 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: packet come from primary char inde

Re: [Qemu-devel] [PATCH COLO-Frame v16 16/35] COLO: synchronize PVM's state to SVM periodically

2016-04-11 Thread Li Zhijian
On 04/08/2016 02:26 PM, zhanghailiang wrote: Do checkpoint periodically, the default interval is 200ms. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert --- v12: - Add Reviewed-by tag v11: - Fix wrong sleep time for checkpoint period. (Dave&#

[Qemu-devel] [PATCH] vl: chanage runstate only if new state is different from current state

2016-04-13 Thread Li Zhijian
Previously, qemu will abort at following scenario: (qemu) stop (qemu) system_reset (qemu) system_reset (qemu) 2016-04-13T20:54:38.979158Z qemu-system-x86_64: invalid runstate transition: 'prelaunch' -> 'prelaunch' Signed-off-by: Li Zhijian --- vl.c | 4 1 fil

[Qemu-devel] [PATCH v2] vl: change runstate only if new state is different from current state

2016-04-13 Thread Li Zhijian
Previously, qemu will abort at following scenario: (qemu) stop (qemu) system_reset (qemu) system_reset (qemu) 2016-04-13T20:54:38.979158Z qemu-system-x86_64: invalid runstate transition: 'prelaunch' -> 'prelaunch' Signed-off-by: Li Zhijian Acked-by: Paolo Bonzini --- fr

Re: [Qemu-devel] [PATCH] vl: chanage runstate only if new state is different from current state

2016-04-13 Thread Li Zhijian
I send V2 with minor fix - fix patch title typo 'chanage' -> 'change' - coding sytle: 'return ;' -> 'return;' - add Acked tag pls review the V2. Best regards Li Zhijian On 04/13/2016 07:57 PM, Paolo Bonzini wrote: On 13/04/2016 11:27, Li

Re: [Qemu-devel] [PATCH v2] vl: change runstate only if new state is different from current state

2016-04-26 Thread Li Zhijian
ping... Thanks Li Zhijian On 04/14/2016 11:25 AM, Li Zhijian wrote: Previously, qemu will abort at following scenario: (qemu) stop (qemu) system_reset (qemu) system_reset (qemu) 2016-04-13T20:54:38.979158Z qemu-system-x86_64: invalid runstate transition: 'prelaunch' -> '

Re: [Qemu-devel] [PATCH] net/net: Add ReadState for reuse codes

2016-05-09 Thread Li Zhijian
On 05/06/2016 06:56 PM, Zhang Chen wrote: Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- include/net/net.h | 8 ++ net/filter-mirror.c | 60 net/net.c | 56

Re: [Qemu-devel] [PATCH V4 1/2] net/filter-mirror: implement filter-redirector

2016-03-16 Thread Li Zhijian
rimary,port=X,server,nowait -chardev socket,id=s1,host=ip_primary,port=Y,server,nowait -filter-redirector,id=r0,netdev=hn0,queue=tx/rx/all,indev=s0,outdev=s1 Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang Signed-off-by: Li Zhijian --- net/filter-m

Re: [Qemu-devel] [PATCH V4 1/2] net/filter-mirror: implement filter-redirector

2016-03-16 Thread Li Zhijian
v user,id=hn0 -chardev socket,id=s0,host=ip_primary,port=X,server,nowait -chardev socket,id=s1,host=ip_primary,port=Y,server,nowait -filter-redirector,id=r0,netdev=hn0,queue=tx/rx/all,indev=s0,outdev=s1 Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang Signed-off-by: Li Zhijian --- net/filter-m

Re: [Qemu-devel] [PATCH V6 1/2] net/filter-mirror: implement filter-redirector

2016-03-19 Thread Li Zhijian
v user,id=hn0 -chardev socket,id=s0,host=ip_primary,port=X,server,nowait -chardev socket,id=s1,host=ip_primary,port=Y,server,nowait -filter-redirector,id=r0,netdev=hn0,queue=tx/rx/all,indev=s0,outdev=s1 Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang Signed-off-by: Li Zhijian --- net/fi

Re: [Qemu-devel] [PATCH V5 1/2] net/filter-mirror: implement filter-redirector

2016-03-20 Thread Li Zhijian
g Signed-off-by: Li Zhijian --- net/filter-mirror.c | 245 qemu-options.hx | 9 ++ vl.c| 3 +- 3 files changed, 256 insertions(+), 1 deletion(-) diff --git a/net/filter-mirror.c b/net/filter-mirror.c index 1b1ec16..7

[PATCH 2/2] docs/clx: Change to lowercase as others

2023-05-24 Thread Li Zhijian
Using the same style except the 'Topo' abbreviation. Signed-off-by: Li Zhijian --- I'm not a native speaker, feel free to correct me. --- docs/system/devices/cxl.rst | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/system/devices/cxl.rst b/docs

[PATCH 1/2] docs/cxl: Correct CFMW number

2023-05-24 Thread Li Zhijian
The 'Notes:' in this document mentioned CFMW{0-2}, but the figure missed CFMW2. Signed-off-by: Li Zhijian --- I'm totally new to CXL, so i have little confidence to this change :) --- docs/system/devices/cxl.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

[PATCH] hw/clx: Fix CFMW config memory leak

2023-05-29 Thread Li Zhijian
Only 'fw' pointer is marked as g_autofree, so we shoud free other resource manually in error path. Signed-off-by: Li Zhijian --- hw/cxl/cxl-host.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/cxl/cxl-host.c b/hw/cxl/cxl-host.c index 034c7805b3e..d

[PATCH v3] migration/rdma: Fix out of order wrid

2021-09-27 Thread Li Zhijian
pendent send completion queue to distinguish ibv_post_send completion queue from the original mixed completion queue. It helps us to poll the specific CQE we are really interested in. Signed-off-by: Li Zhijian --- V3: rebase code, and combine 2/2 to 1/2 V2: Introduce send completion queue --- mig

[PATCH v4] migration/rdma: Fix out of order wrid

2021-10-28 Thread Li Zhijian
pendent send completion queue to distinguish ibv_post_send completion queue from the original mixed completion queue. It helps us to poll the specific CQE we are really interested in. Signed-off-by: Li Zhijian --- V4: amend log messages # Dave V3: rebase code, and combine

[PATCH v2 1/2] migration: Fix rdma migration failed

2023-09-26 Thread Li Zhijian
flush once each full round of memory") CC: Fabiano Rosas Signed-off-by: Li Zhijian --- V2: put that check at the entry of migrate_multifd_flush_after_each_section() # Peter --- migration/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/options.c b

[PATCH v2 2/2] migration/rdma: zore out head.repeat to make the error more clear

2023-09-26 Thread Li Zhijian
known control message QEMU FILE Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- V2: add reviewed-by tags --- migration/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/rdma.c b/migration/rdma.c index a2a3db35b1..3073d9953c 100644

[PATCH 2/2] migration/rdma: zore out head.repeat to make the error more clear

2023-09-20 Thread Li Zhijian
From: Li Zhijian Previously, we got a confusion error that complains the RDMAControlHeader.repeat: qemu-system-x86_64: rdma: Too many requests in this message (3638950032).Bailing. Actually, it's caused by an unexpected RDMAControlHeader.type. After this patch, error will become: qemu-s

[PATCH 1/2] migration: Fix rdma migration failed

2023-09-20 Thread Li Zhijian
From: Li Zhijian Destination will fail with: qemu-system-x86_64: rdma: Too many requests in this message (3638950032).Bailing. migrate with RDMA is different from tcp. RDMA has its own control message, and all traffic between RDMA_CONTROL_REGISTER_REQUEST and RDMA_CONTROL_REGISTER_FINISHED

[PATCH] hw/cxl: Fix opaque type interpret wrongly

2023-10-12 Thread Li Zhijian
: Introduce CXL components (8.1.x, 8.2.5)") Signed-off-by: Li Zhijian --- hw/cxl/cxl-component-utils.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c index f3bbf0fd131..f27a9d3cf60 100644 --- a/hw/cxl/

[PATCH v2] hw/cxl: Fix CFMW config memory leak

2023-05-30 Thread Li Zhijian
Only 'fw' pointer is marked as g_autofree, so we shoud free other resource manually in error path. Signed-off-by: Li Zhijian --- V2: Delete unnecesarry check --- hw/cxl/cxl-host.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/cxl/cxl-host.c b/

[PATCH v3] hw/cxl: Fix CFMW config memory leak

2023-05-30 Thread Li Zhijian
Allocate targets and targets[n] resources when all sanity checks are passed to avoid memory leaks. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Li Zhijian --- V3: allocte further resource when we can't fail # Philippe V2: Delete unnecesarry check --- hw/cxl/cxl-host.c

[PATCH v2 2/2] hw/cxl: Pass NULL for a NULL MemoryRegionOps

2023-10-18 Thread Li Zhijian
a NULL parameter is enough for a NULL MemoryRegionOps Signed-off-by: Li Zhijian --- hw/cxl/cxl-component-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c index 6214dcdcc12..010ed82edab 100644 --- a/hw/cxl/cxl

[PATCH v2 1/2] hw/cxl: Pass CXLComponentState to cache_mem_ops

2023-10-18 Thread Li Zhijian
ned-off-by: Li Zhijian --- V2: change the source side since cache_mem_ops.{read,write}() will use cxl_cstate. --- hw/cxl/cxl-component-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c index f3bbf0fd131..6214dcdc

[PATCH] MAINTAINERS: email address change

2021-12-30 Thread Li Zhijian
Fujitsu's mail service has migrated to O365 months ago, the lizhij...@cn.fujitsu.com address will stop working on 2022-06-01, change it to my new email address lizhij...@fujitsu.com. Signed-off-by: Li Zhijian --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH] block: Improve backing file validation

2021-05-09 Thread Li Zhijian
se refcount bits: 16 corrupt: false ``` Generally, we don't expect to corrupte the source.raw anyway, while actually it does. Here we validate the realpath of file instead the input string. Signed-off-by: Li Zhijian --- block.c | 46 +++--- 1 fi

[PATCH v2] block: Improve backing file validation

2021-05-10 Thread Li Zhijian
se refcount bits: 16 corrupt: false ``` Generally, we don't expect to corrupte the source.raw anyway, while actually it does. Here we check their inode number instead of file name. Suggested-by: Daniel P. Berrangé Signed-off-by: Li Zhijian --- v2: utilize stat() instead of realp

Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 00/17] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2016-10-26 Thread Li Zhijian
Amit . -- Best regards. Li Zhijian (8555)

Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 00/17] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2016-10-26 Thread Li Zhijian
tperf with TCP_RR, client will get *twice* latency with a Request/Response -- Best regards. Li Zhijian Also, can you tell how did you arrive at the default checkpoint interval? Er, for this value, we referred to Remus in XEN platform. ;) But after we implement COLO with colo proxy, this int

Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 00/17] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2016-10-26 Thread Li Zhijian
On 10/26/2016 05:53 PM, Li Zhijian wrote: On 10/26/2016 04:26 PM, Amit Shah wrote: On (Wed) 26 Oct 2016 [14:43:30], Hailiang Zhang wrote: Hi Amit, On 2016/10/26 14:09, Amit Shah wrote: Hello, On (Tue) 18 Oct 2016 [20:09:56], zhanghailiang wrote: This is the 21th version of COLO frame

Re: [Qemu-devel] [PATCH 2/2] migration: send and check the devices between source and distination at the begining

2016-10-05 Thread Li Zhijian
On 09/30/2016 05:58 PM, Dr. David Alan Gilbert wrote: * Li Zhijian (lizhij...@cn.fujitsu.com) wrote: On 09/30/2016 02:15 PM, Amit Shah wrote: Hi, On (Thu) 29 Sep 2016 [19:06:32], Li Zhijian wrote: Priviously, if the source and distination have different devices, source could goto the

[Qemu-devel] [PATCH 2/2] migration: introduce section type QEMU_VM_SECTION_HEADER

2016-10-05 Thread Li Zhijian
-device virtio-scsi-pci,id=scsi0), after migration, the source goto status "paused (postmigrate)" and distination will exit since detect inconsistent device. Signed-off-by: Li Zhijian --- include/migration/migration.h | 1 + migration/savevm.c| 19 +-- 2 files c

[Qemu-devel] [PATCH 1/2] migration: add qemu_loadvm_section_header() helper

2016-10-05 Thread Li Zhijian
no fuctional changes Signed-off-by: Li Zhijian --- migration/savevm.c | 51 ++- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index 33a2911..c36a675 100644 --- a/migration/savevm.c +++ b

Re: [Qemu-devel] [RFC PATCH V9 5/7] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext

2016-07-21 Thread Li Zhijian
Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- include/sysemu/char.h | 11 - qemu-char.c | 119 +++--- 2 files changed, 84 insertions(+), 46 deletions(-) diff --git a/include/sysemu/char.h b/include/sysemu/char.h index 307fd8f

[Qemu-devel] [PATCH] qemu-options.hx: correct spice options streaming-video default document value to 'off'

2016-07-31 Thread Li Zhijian
since f1d3e58, the code had changed the default value to 'off', so this patch make document and code are consistent. Signed-off-by: Li Zhijian --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index 8e0d9a5..878b

Re: [Qemu-devel] [PATCH] Change the method to calculate dirty-pages-rate

2017-03-13 Thread Li Zhijian
rcu_read(&migration_bitmap_rcu)->bmap = 0b0011, the new_dirty will be 0b1100, and this function will return 2 but not 4 which is expected. the dirty pages in dirty_memory[DIRTY_MEMORY_MIGRATION] are all new, so these should be calculated also. Signed-off-by: Chao Fan Signed-off-by: Li Zhijia

Re: [Qemu-devel] [PATCH] net/net: Bugfix for net_fill_rstate()

2016-08-17 Thread Li Zhijian
? because the callers only concern about the error case. -- Best regards. Li Zhijian On 08/17/2016 08:33 PM, Zhang Chen wrote: When network is busy, we will receive multiple packets at one time. this bug will lost packets that comes late. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian ---

Re: [Qemu-devel] [PATCH 1/4] net/colo-compare.c: Add checkpoint min period to optimize performance

2017-07-06 Thread Li Zhijian
t->creation_ms; +} break; } } -- Best regards. Li Zhijian (8528)

  1   2   3   >