Re: [RFC PATCH] i386: Add ratelimit for bus locks acquired in guest

2021-03-18 Thread Xiaoyao Li
On 3/19/2021 10:59 AM, Chenyi Qiang wrote: Hi Marcelo, Thank you for your comment. On 3/19/2021 1:32 AM, Marcelo Tosatti wrote: On Wed, Mar 17, 2021 at 04:47:09PM +0800, Chenyi Qiang wrote: Virtual Machines can exploit bus locks to degrade the performance of system. To address this kind of pe

[PATCH v3 00/10] Fixed some bugs and optimized some codes for COLO

2021-03-18 Thread leirao
From: Rao, Lei Changes since v2: --Add a function named packet_new_nocopy. --Continue to optimize the function of colo_flush_ram_cache. Changes since v1: --Reset the state of the auto-converge counters at every checkpoint instead of directly disabling. --Treat th

[PATCH v3 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-03-18 Thread leirao
From: "Rao, Lei" This patch fixes the following: qemu-system-x86_64: invalid runstate transition: 'colo' ->'shutdown' Aborted (core dumped) Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- softmmu/runstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/softmmu/runstate.c b/so

[PATCH v3 01/10] Remove some duplicate trace code.

2021-03-18 Thread leirao
From: "Rao, Lei" There is the same trace code in the colo_compare_packet_payload. Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- net/colo-compare.c | 13 - 1 file changed, 13 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 84db497..9e18baa 100644 --- a

[PATCH v3 07/10] Reset the auto-converge counter at every checkpoint.

2021-03-18 Thread leirao
From: "Rao, Lei" if we don't reset the auto-converge counter, it will continue to run with COLO running, and eventually the system will hang due to the CPU throttle reaching DEFAULT_MIGRATE_MAX_CPU_THROTTLE. Signed-off-by: Lei Rao --- migration/colo.c | 4 migration/ram.c | 10 +

[PATCH v3 03/10] Optimize the function of filter_send

2021-03-18 Thread leirao
From: "Rao, Lei" The iov_size has been calculated in filter_send(). we can directly return the size.In this way, this is no need to repeat calculations in filter_redirector_receive_iov(); Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- net/filter-mirror.c | 8 1 file changed, 4 in

[PATCH v3 06/10] Add the function of colo_compare_cleanup

2021-03-18 Thread leirao
From: "Rao, Lei" This patch fixes the following: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x7f6ae4559859 in __GI_abort () at abort.c:79 #2 0x559aaa386720 in error_exit (err=16, msg=0x559aaa5973d0 <__func__.16227> "qemu_mutex_destroy") at

[PATCH v3 08/10] Reduce the PVM stop time during Checkpoint

2021-03-18 Thread leirao
From: "Rao, Lei" When flushing memory from ram cache to ram during every checkpoint on secondary VM, we can copy continuous chunks of memory instead of 4096 bytes per time to reduce the time of VM stop during checkpoint. Signed-off-by: Lei Rao --- migration/ram.c | 45 +

[PATCH v3 04/10] Remove migrate_set_block_enabled in checkpoint

2021-03-18 Thread leirao
From: "Rao, Lei" We can detect disk migration in migrate_prepare, if disk migration is enabled in COLO mode, we can directly report an error.and there is no need to disable block migration at every checkpoint. Signed-off-by: Lei Rao Signed-off-by: Zhang Chen Reviewed-by: Li Zhijian --- migra

[PATCH v3 09/10] Add the function of colo_bitmap_clear_diry.

2021-03-18 Thread leirao
From: "Rao, Lei" When we use continuous dirty memory copy for flushing ram cache on secondary VM, we can also clean up the bitmap of contiguous dirty page memory. This also can reduce the VM stop time during checkpoint. Signed-off-by: Lei Rao --- migration/ram.c | 29 +-

[PATCH v3 05/10] Add a function named packet_new_nocopy for COLO.

2021-03-18 Thread leirao
From: "Rao, Lei" Use the packet_new_nocopy instead of packet_new in the filter-rewriter module. There will be one less memory copy in the processing of each network packet. Signed-off-by: Lei Rao --- net/colo.c| 23 +++ net/colo.h| 1 + net/filter-r

[PATCH v3 10/10] Fixed calculation error of pkt->header_size in fill_pkt_tcp_info()

2021-03-18 Thread leirao
From: "Rao, Lei" The data pointer has skipped vnet_hdr_len in the function of parse_packet_early().So, we can not subtract vnet_hdr_len again when calculating pkt->header_size in fill_pkt_tcp_info(). Otherwise, it will cause network packet comparsion errors and greatly increase the frequency of c

[PATCH V4 0/7] Bypass specific network traffic in COLO

2021-03-18 Thread Zhang Chen
Due to some real user scenarios don't need to monitor all traffic. And qemu net-filter also need function to more detailed flow control. This series give user ability to bypass kinds of COLO network stream. For example, windows guest user want to enable windows remote desktop to touch guest(UDP/TC

[PATCH V4 2/7] qapi/net.json: Add L4_Connection definition

2021-03-18 Thread Zhang Chen
Add L4_Connection struct for other QMP commands. Except protocol field is necessary, other fields are optional. Signed-off-by: Zhang Chen --- qapi/net.json | 26 ++ 1 file changed, 26 insertions(+) diff --git a/qapi/net.json b/qapi/net.json index 498ea7aa72..cd4a8ed95e 1

[PATCH V4 7/7] net/net.c: Add handler for COLO passthrough connection

2021-03-18 Thread Zhang Chen
Use connection protocol,src port,dst port,src ip,dst ip as the key to bypass certain network traffic in COLO compare. Signed-off-by: Zhang Chen --- net/net.c | 153 ++ 1 file changed, 153 insertions(+) diff --git a/net/net.c b/net/net.c index

[PATCH V4 4/7] hmp-commands: Add new HMP command for COLO passthrough

2021-03-18 Thread Zhang Chen
Add hmp_colo_passthrough_add and hmp_colo_passthrough_del make user can maintain COLO network passthrough list in human monitor. Signed-off-by: Zhang Chen --- hmp-commands.hx | 26 ++ include/monitor/hmp.h | 2 ++ monitor/hmp-cmds.c| 34

[PATCH V4 1/7] qapi/net.json: Add IP_PROTOCOL definition

2021-03-18 Thread Zhang Chen
Add IP_PROTOCOL as enum include TCP,UDP, ICMP... for other QMP commands. Signed-off-by: Zhang Chen --- qapi/net.json | 31 +++ 1 file changed, 31 insertions(+) diff --git a/qapi/net.json b/qapi/net.json index 87361ebd9a..498ea7aa72 100644 --- a/qapi/net.json +++ b/qa

[PATCH V4 5/7] net/colo-compare: Move data structure and define to .h file.

2021-03-18 Thread Zhang Chen
Make other modules can reuse COLO code. Signed-off-by: Zhang Chen --- net/colo-compare.c | 106 - net/colo-compare.h | 106 + 2 files changed, 106 insertions(+), 106 deletions(-) diff --git a/net/colo-compar

[PATCH V4 3/7] qapi/net: Add new QMP command for COLO passthrough

2021-03-18 Thread Zhang Chen
Since the real user scenario does not need COLO to monitor all traffic. Add colo-passthrough-add and colo-passthrough-del to maintain a COLO network passthrough list. Signed-off-by: Zhang Chen --- net/net.c | 10 ++ qapi/net.json | 40 2 files

[PATCH V4 6/7] net/colo-compare: Add passthrough list to CompareState

2021-03-18 Thread Zhang Chen
Add passthrough list for each CompareState. Signed-off-by: Zhang Chen --- net/colo-compare.c | 29 + net/colo-compare.h | 11 +++ 2 files changed, 40 insertions(+) diff --git a/net/colo-compare.c b/net/colo-compare.c index a803f8b888..40af8cd501 100644 --- a/

[PATCH 1/2] floppy: add a regression test for CVE-2020-25741

2021-03-18 Thread Alexander Bulekov
dd if=/dev/zero of=/tmp/fda.img bs=1024 count=1440 cat << EOF | ./qemu-system-i386 -nographic -m 512M -nodefaults \ -accel qtest -fda /tmp/fda.img -qtest stdio outw 0x3f4 0x0500 outb 0x3f5 0x00 outb 0x3f5 0x00 outw 0x3f4 0x00 outb 0x3f5 0x00 outw 0x3f1 0x0400 outw 0x3f4 0x0 outw 0x3f4 0x00 outb 0x3

[PATCH 2/2] floppy: add a regression test for CVE-2021-20196

2021-03-18 Thread Alexander Bulekov
dd if=/dev/zero of=/tmp/fda.img bs=1024 count=1440 cat << EOF | ./qemu-system-i386 -nographic -m 512M -nodefaults \ -accel qtest -fda /tmp/fda.img -qtest stdio outw 0x3f4 0x0500 outb 0x3f5 0x00 outb 0x3f5 0x00 outw 0x3f4 0x00 outb 0x3f5 0x00 outw 0x3f1 0x0400 outw 0x3f4 0x0 outw 0x3f4 0x00 outb 0x3

Re: Serious doubts about Gitlab CI

2021-03-18 Thread Thomas Huth
On 18/03/2021 11.28, Philippe Mathieu-Daudé wrote: On 3/18/21 10:50 AM, Philippe Mathieu-Daudé wrote: On 3/18/21 10:33 AM, Daniel P. Berrangé wrote: [...] It feels like what you hit here is fallout from your account accidentally getting blocked, rather than something which is hitting every con

Re: [PATCH] gitlab-ci: Restrict jobs using Docker to runners having 'docker' tag

2021-03-18 Thread Thomas Huth
On 19/03/2021 01.43, Philippe Mathieu-Daudé wrote: When a job is based on a Docker image [1], or is using a Docker service, it requires a runner with Docker installed. Gitlab shared runners provide the 'docker' tag when they have it installed. Are Gitlab shared runners are limited resources, we

Re: [PATCH 1/2] floppy: add a regression test for CVE-2020-25741

2021-03-18 Thread Markus Armbruster
Alexander Bulekov writes: > dd if=/dev/zero of=/tmp/fda.img bs=1024 count=1440 > cat << EOF | ./qemu-system-i386 -nographic -m 512M -nodefaults \ > -accel qtest -fda /tmp/fda.img -qtest stdio > outw 0x3f4 0x0500 > outb 0x3f5 0x00 > outb 0x3f5 0x00 > outw 0x3f4 0x00 > outb 0x3f5 0x00 > outw 0x3f1

Re: [PULL 5/5] m68k: add Virtual M68k Machine

2021-03-18 Thread Thomas Huth
On 18/03/2021 18.28, Max Reitz wrote: [...] From that it follows that I don’t see much use in testing specific devices either.  Say there’s a platform that provides both virtio-pci and virtio-mmio, the default (say virtio-pci) is fine for the iotests. I see little value in testing virtio-mmio

[PULL v4 0/6] QOM and fdc patches patches for 2021-03-16

2021-03-18 Thread Markus Armbruster
The following changes since commit 8a40754bca14df63c6d2ffe473b68a270dc50679: Merge remote-tracking branch 'remotes/nvme/tags/nvme-next-pull-request' into staging (2021-03-18 19:55:37 +) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qom-fdc-2021-03-16

Re: [PATCH 1/4] m68k: add the virtio devices aliases

2021-03-18 Thread Thomas Huth
On 18/03/2021 23.39, Laurent Vivier wrote: Similarly to 5f629d943cb0 ("s390x: fix s390 virtio aliases"), define the virtio aliases. This allows to start machines with virtio devices without knowledge of the implementation type. For instance, we can use "-device virtio-scsi" on m68k, s390x or PC

Re: [RFC v2 05/13] vhost: Route guest->host notification through shadow virtqueue

2021-03-18 Thread Jason Wang
在 2021/3/18 下午8:04, Eugenio Perez Martin 写道: On Thu, Mar 18, 2021 at 11:48 AM Eugenio Perez Martin wrote: On Thu, Mar 18, 2021 at 10:29 AM Jason Wang wrote: 在 2021/3/18 下午5:18, Eugenio Perez Martin 写道: On Thu, Mar 18, 2021 at 4:11 AM Jason Wang wrote: 在 2021/3/18 上午12:47, Eugenio Perez

<    1   2   3   4