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: [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,

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

[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

[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

[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 ---

[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

[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

[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 +++

[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 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 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

[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

[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

[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 +

[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 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 ---

[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 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 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

[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 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 ---

[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

[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

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

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

2021-03-18 Thread Chenyi Qiang
On 3/19/2021 9:23 AM, Xiaoyao Li wrote: On 3/17/2021 4:47 PM, Chenyi Qiang wrote: [...]   MemTxAttrs kvm_arch_post_run(CPUState *cpu, struct kvm_run *run)   {   X86CPU *x86_cpu = X86_CPU(cpu); @@ -4236,6 +4271,11 @@ MemTxAttrs kvm_arch_post_run(CPUState *cpu, struct kvm_run *run)  

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

2021-03-18 Thread Chenyi Qiang
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 performance DOS attack, bus lock VM exit is

[PATCH v1] MAINTAINERS: Fix tests/migration maintainers

2021-03-18 Thread huangy81
From: Hyman Huang(黄勇) Signed-off-by: Hyman Huang(黄勇) --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 25fc49d1dc..20e2387c66 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2525,6 +2525,7 @@ M: Cleber Rosa S: Odd Fixes F: scripts/*.py F:

[PATCH] i386/cpu: Expose AVX_VNNI instruction to guset

2021-03-18 Thread Yang Zhong
Expose AVX (VEX-encoded) versions of the Vector Neural Network Instructions to guest. The bit definition: CPUID.(EAX=7,ECX=1):EAX[bit 4] AVX_VNNI The following instructions are available when this feature is present in the guest. 1. VPDPBUS: Multiply and Add Unsigned and Signed Bytes 2.

Re: [PATCH] net/slirp: Fix incorrect permissions on samba >= 2.0.5

2021-03-18 Thread Niklas Hambüchen
On 2/23/21 3:41 AM, Niklas Hambüchen wrote: > This broke `-net user,smb=/path/to/folder`: Hey, just a short ping on whether anyone would have a moment to review this `qemu-trivial` patch; it would be very nice to have SMB support to work out of the box again. Thanks!

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

2021-03-18 Thread Xiaoyao Li
On 3/17/2021 4:47 PM, Chenyi Qiang wrote: [...] MemTxAttrs kvm_arch_post_run(CPUState *cpu, struct kvm_run *run) { X86CPU *x86_cpu = X86_CPU(cpu); @@ -4236,6 +4271,11 @@ MemTxAttrs kvm_arch_post_run(CPUState *cpu, struct kvm_run *run) } else { env->eflags &= ~IF_MASK;

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

2021-03-18 Thread Philippe Mathieu-Daudé
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'd like to add more runners to QEMU repositories

[PATCH v4 2/2] hw/riscv: allow ramfb on virt

2021-03-18 Thread Asherah Connor
Allow ramfb on virt. This lets `-device ramfb' work. Signed-off-by: Asherah Connor Reviewed-by: Bin Meng Reviewed-by: Alistair Francis --- (no changes since v2) Changes in v2: * Add ramfb as allowed on riscv virt machine class. hw/riscv/virt.c | 3 +++ 1 file changed, 3 insertions(+)

[PATCH v4 1/2] hw/riscv: Add fw_cfg support to virt

2021-03-18 Thread Asherah Connor
Provides fw_cfg for the virt machine on riscv. This enables using e.g. ramfb later. Signed-off-by: Asherah Connor Reviewed-by: Bin Meng Reviewed-by: Alistair Francis --- Changes in v4: * Adapt for changes made in c65d7080d8 "hw/riscv: migrate fdt field to generic MachineState". Changes

[PATCH v4 0/2] hw/riscv: Add fw_cfg support, allow ramfb

2021-03-18 Thread Asherah Connor
This is version 4 of the series to bring fw_cfg and ramfb support to riscv's virt machine, adapted for the latest master. It is still tested as working against a modified U-Boot with ramfb support. Changes in v4: * Adapt for changes made in c65d7080d8 "hw/riscv: migrate fdt field to generic

Re: CXL 2.0 memory device design

2021-03-18 Thread Ben Widawsky
On 21-03-17 14:40:58, Ben Widawsky wrote: > Phil, Igor, Markus > > TL;DR: What to do about multiple capacities in a single device, and what to do > about interleave? > > I've hacked together a basic CXL 2.0 implementation which exposes a CXL "Type > 3" > memory device (CXL 2.0 Chapter 2.3). For

RE: [RFC 0/1] Use dmabufs for display updates instead of pixman

2021-03-18 Thread Kasireddy, Vivek
Hi Gerd, Thank you for taking the time to explain how support for blob resources needs to be added. We are going to get started soon and here are the tasks we are planning to do in order of priority: 1) Add support for VIRTIO_GPU_BLOB_MEM_GUEST + VIRTIO_GPU_BLOB_FLAG_USE_SHAREABLE 2) Upgrade Qemu

Re: [PATCH v3 1/2] hw/riscv: Add fw_cfg support to virt

2021-03-18 Thread Asherah Connor
Hi Alistair, On 21/03/18 05:03:p, Alistair Francis wrote: > I'm guessing the failure is because of "hw/riscv: migrate fdt field to > generic MachineState" which moved the fdt element to the MachineState. > > The fix should just be to change s->fdt to mc->fdt. Yes, looks like it. I'll fix it up

Re: [PULL v3 0/6] QOM and fdc patches patches for 2021-03-16

2021-03-18 Thread Peter Maydell
On Thu, 18 Mar 2021 at 12:27, Markus Armbruster wrote: > > The following changes since commit 571d413b5da6bc6f1c2aaca8484717642255ddb0: > > Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20210316' > into staging (2021-03-17 21:02:37 +) > > are available in the Git

Re: [PULL v2 00/11] emulated nvme updates and fixes

2021-03-18 Thread Peter Maydell
On Thu, 18 Mar 2021 at 11:58, Klaus Jensen wrote: > > From: Klaus Jensen > > Hi Peter, > > The following changes since commit b12498fc575f2ad30f09fe78badc7fef526e2d76: > > Merge remote-tracking branch > 'remotes/vivier/tags/q800-for-6.0-pull-request' into staging (2021-03-18 > 10:05:37

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

2021-03-18 Thread Philippe Mathieu-Daudé
On 3/18/21 11:39 PM, 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 >

Re: [PATCH for 6.0 v2] hw/intc/i8259: Refactor pic_read_irq() to avoid uninitialized variable

2021-03-18 Thread Richard Henderson
On 3/18/21 10:09 AM, Philippe Mathieu-Daudé wrote: +int irq2; + if (irq == 2) { irq2 = pic_get_irq(slave_pic); Move the declaration in here: int irq2 = ... r~

Re: [PATCH 3/4] iotests: test m68k with the virt machine

2021-03-18 Thread Philippe Mathieu-Daudé
On 3/18/21 11:39 PM, Laurent Vivier wrote: > This allows to cover the virtio tests with a 32bit big-endian > virtio-mmio machine. > > Signed-off-by: Laurent Vivier > --- > tests/qemu-iotests/testenv.py | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Philippe Mathieu-Daudé

[PATCH 3/4] iotests: test m68k with the virt machine

2021-03-18 Thread Laurent Vivier
This allows to cover the virtio tests with a 32bit big-endian virtio-mmio machine. Signed-off-by: Laurent Vivier --- tests/qemu-iotests/testenv.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py index 1fbec854c1f7..6d27712617a3

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

2021-03-18 Thread Laurent Vivier
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, and the device will be

[PATCH 4/4] iotests: iothreads need ioeventfd

2021-03-18 Thread Laurent Vivier
And ioeventfd are only available with virtio-scsi-pci, so don't use the alias and add a rule to require virtio-scsi-pci for the tests that use iothreads. Signed-off-by: Laurent Vivier --- tests/qemu-iotests/127| 4 ++-- tests/qemu-iotests/256| 2 ++ tests/qemu-iotests/iotests.py

[PATCH 2/4] iotests: Revert "iotests: use -ccw on s390x for 040, 139, and 182"

2021-03-18 Thread Laurent Vivier
Commit f1d5516ab583 introduces a test in some iotests to check if the machine is a s390-ssw-virtio and to select virtio-*-ccw rather than virtio-*-pci. We don't need that because QEMU already provides aliases to use the correct virtio interface according to the machine type. This patch removes

[PATCH 0/4] iotests: fix failures with non-PCI machines

2021-03-18 Thread Laurent Vivier
Tests are executed using virtio-*-pci even on a non PCI machine. The problem can be easily fixed using the virtio aliases (virtio-*), to run virtio-*-ccw on s390x and virtio-*-device on m68k. A first attempt was tried with virtio-*-ccw by detecting the machine type, this series removes it to use

Re: [PATCH for-6.0 v2 4/5] hw/core/loader: Add new function rom_ptr_for_as()

2021-03-18 Thread Richard Henderson
On 3/18/21 3:28 PM, Peter Maydell wrote: On Thu, 18 Mar 2021 at 21:14, Richard Henderson wrote: On 3/18/21 1:02 PM, Peter Maydell wrote: + * Note that we do not check @as against the 'as' member in the + * 'struct Rom' returned by rom_ptr(). The Rom::as is the + * AddressSpace

Re: [PATCH v3 1/2] hw/riscv: Add fw_cfg support to virt

2021-03-18 Thread Alistair Francis
On Thu, Mar 18, 2021 at 5:25 PM Alistair Francis wrote: > > On Sun, Feb 28, 2021 at 6:17 AM Asherah Connor wrote: > > > > Provides fw_cfg for the virt machine on riscv. This enables > > using e.g. ramfb later. > > > > Signed-off-by: Asherah Connor > > This patch doesn't compile, I see this

Re: [PATCH for-6.0 v2 4/5] hw/core/loader: Add new function rom_ptr_for_as()

2021-03-18 Thread Peter Maydell
On Thu, 18 Mar 2021 at 21:14, Richard Henderson wrote: > > On 3/18/21 1:02 PM, Peter Maydell wrote: > >>> + * Note that we do not check @as against the 'as' member in the > >>> + * 'struct Rom' returned by rom_ptr(). The Rom::as is the > >>> + * AddressSpace which the rom blob should

Re: [PATCH v3 1/2] hw/riscv: Add fw_cfg support to virt

2021-03-18 Thread Alistair Francis
On Sun, Feb 28, 2021 at 6:17 AM Asherah Connor wrote: > > Provides fw_cfg for the virt machine on riscv. This enables > using e.g. ramfb later. > > Signed-off-by: Asherah Connor This patch doesn't compile, I see this error: ../hw/riscv/virt.c: In function ‘create_fw_cfg’:

Re: [PATCH for-6.0 v2 4/5] hw/core/loader: Add new function rom_ptr_for_as()

2021-03-18 Thread Richard Henderson
On 3/18/21 1:02 PM, Peter Maydell wrote: + * Note that we do not check @as against the 'as' member in the + * 'struct Rom' returned by rom_ptr(). The Rom::as is the + * AddressSpace which the rom blob should be written to... ... Should you really have this special case? Nowhere is

Re: [PATCH for-6.0 v2 3/5] memory: Add offset_in_region to flatview_cb arguments

2021-03-18 Thread Philippe Mathieu-Daudé
On 3/18/21 6:48 PM, Peter Maydell wrote: > The function flatview_for_each_range() calls a callback for each > range in a FlatView. Currently the callback gets the start and > length of the range and the MemoryRegion involved, but not the offset > within the MemoryRegion. Add this to the

Re: [PATCH for-6.0 v2 2/5] memory: Document flatview_for_each_range()

2021-03-18 Thread Philippe Mathieu-Daudé
On 3/18/21 6:48 PM, Peter Maydell wrote: > Add a documentation comment describing flatview_for_each_range(). > > Signed-off-by: Peter Maydell > --- > include/exec/memory.h | 26 -- > 1 file changed, 24 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] MAINTAINERS: Fix tests/migration maintainers

2021-03-18 Thread Eric Blake
On 3/18/21 11:40 AM, huang...@chinatelecom.cn wrote: > From: Hyman > > Signed-off-by: Hyman It looks unusual to have a single name in your authorship and S-o-b line. Generally, this line should represent (a version of) your legal name, as you are making a legal claim:

Re: [PATCH for-6.0 v2 1/5] memory: Make flatview_cb return bool, not int

2021-03-18 Thread Philippe Mathieu-Daudé
On 3/18/21 6:48 PM, Peter Maydell wrote: > The return value of the flatview_cb callback passed to the > flatview_for_each_range() function is zero if the iteration through > the ranges should continue, or non-zero to break out of it. Use a > bool for this rather than int. > > Signed-off-by:

Re: Serious doubts about Gitlab CI

2021-03-18 Thread Philippe Mathieu-Daudé
On 3/18/21 8:52 PM, John Snow wrote: > On 3/18/21 3:46 PM, Stefan Hajnoczi wrote: >> On Wed, Mar 17, 2021 at 09:29:32PM +0100, Philippe Mathieu-Daudé wrote: >>> Now I'm having serious doubts about Gitlab usefulness for the QEMU >>> community... >> >> The QEMU Project has 50,000 minutes of GitLab

Re: [RFC v5 1/6] qmp: add QMP command x-debug-query-virtio

2021-03-18 Thread Eric Blake
On 3/18/21 11:29 AM, Jonah Palmer wrote: > From: Laurent Vivier > > This new command lists all the instances of VirtIODevice with > their path and virtio type > > Signed-off-by: Laurent Vivier > Reviewed-by: Eric Blake > Signed-off-by: Jonah Palmer > --- We've missed soft freeze for 6.0,

Re: [PATCH] target/riscv: Make VSTIP and VSEIP read-only in hip

2021-03-18 Thread Alistair Francis
On Thu, Mar 11, 2021 at 4:49 AM Georg Kotheimer wrote: > > Signed-off-by: Georg Kotheimer Thanks! Applied to riscv-to-apply.next Alistair > --- > target/riscv/csr.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/target/riscv/csr.c b/target/riscv/csr.c >

Re: [PATCH] target/riscv: Adjust privilege level for HLV(X)/HSV instructions

2021-03-18 Thread Alistair Francis
On Thu, Mar 11, 2021 at 5:32 AM Georg Kotheimer wrote: > > According to the specification the "field SPVP of hstatus controls the > privilege level of the access" for the hypervisor virtual-machine load > and store instructions HLV, HLVX and HSV. > > Signed-off-by: Georg Kotheimer Thanks!

Re: Serious doubts about Gitlab CI

2021-03-18 Thread Paolo Bonzini
On 18/03/21 20:46, Stefan Hajnoczi wrote: The QEMU Project has 50,000 minutes of GitLab CI quota. Let's enable GitLab Merge Requests so that anyone can submit a merge request and get CI coverage. Each merge request consumes about 2500. That won't last long. Paolo

Re: of AVR target page size

2021-03-18 Thread Peter Maydell
On Thu, 18 Mar 2021 at 20:05, Dr. David Alan Gilbert wrote: > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > On Thu, 18 Mar 2021 at 10:45, Dr. David Alan Gilbert > > wrote: > > > > > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > > > Also, what does the > > > > /* 0x80 is

Re: [PATCH 3/3] i386: Make sure kvm_arch_set_tsc_khz() succeeds on migration when 'hv-reenlightenment' was exposed

2021-03-18 Thread Dr. David Alan Gilbert
* Vitaly Kuznetsov (vkuzn...@redhat.com) wrote: > KVM doesn't fully support Hyper-V reenlightenment notifications on > migration. In particular, it doesn't support emulating TSC frequency > of the source host by trapping all TSC accesses so unless TSC scaling > is supported on the destination host

[PATCH 0/1] iotests: fix 051.out expected output after error

2021-03-18 Thread Connor Kuehl
Oops, sorry about the churn. I can see why this would have caused a failure but I'm surprised I can't reproduce this when I run the test locally. Christian, would you be willing to test this patch out as a quick sanity check too? Connor Kuehl (1): iotests: fix 051.out expected output after

[PATCH 1/1] iotests: fix 051.out expected output after error text touchups

2021-03-18 Thread Connor Kuehl
A patch was recently applied that touched up some error messages that pertained to key names like 'node-name'. The trouble is it only updated tests/qemu-iotests/051.pc.out and not tests/qemu-iotests/051.out as well. Do that now. Fixes: 785ec4b1b9 ("block: Clarify error messages pertaining to

Re: of AVR target page size

2021-03-18 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Thu, 18 Mar 2021 at 10:45, Dr. David Alan Gilbert > wrote: > > > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > > Also, what does the > > > /* 0x80 is reserved in migration.h start with 0x100 next */ > > > comment refer to?

Re: of AVR target page size

2021-03-18 Thread Dr. David Alan Gilbert
* Michael Rolnik (mrol...@gmail.com) wrote: > how do I test my fix? Is there a procedure? As long as your TARGET_PAGE_SIZE is now 512 or bigger you should be OK as long as your AVR stuff still works. If you want you can try and do a live migrate between two copies of qemu, but that does assume

Re: [PULL v4 00/42] Block layer patches and object-add QAPIfication

2021-03-18 Thread Peter Maydell
On Thu, 18 Mar 2021 at 09:48, Kevin Wolf wrote: > > The following changes since commit 571d413b5da6bc6f1c2aaca8484717642255ddb0: > > Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20210316' > into staging (2021-03-17 21:02:37 +) > > are available in the Git repository

Re: [PULL v2 00/13] misc patches removing deprecated features

2021-03-18 Thread Peter Maydell
On Thu, 18 Mar 2021 at 09:30, Daniel P. Berrangé wrote: > > The following changes since commit 571d413b5da6bc6f1c2aaca8484717642255ddb0: > > Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20210316' > into staging (2021-03-17 21:02:37 +) > > are available in the Git

Re: Serious doubts about Gitlab CI

2021-03-18 Thread John Snow
On 3/18/21 3:46 PM, Stefan Hajnoczi wrote: On Wed, Mar 17, 2021 at 09:29:32PM +0100, Philippe Mathieu-Daudé wrote: Now I'm having serious doubts about Gitlab usefulness for the QEMU community... The QEMU Project has 50,000 minutes of GitLab CI quota. Let's enable GitLab Merge Requests so that

Re: How to create vhdx differencing disk using qemu-img

2021-03-18 Thread John Snow
On 3/17/21 10:37 PM, qi zhou wrote: When I create vhdx differencing disk using qemu-img, It says  qemu-img: xxx.vhd Backing file not supported for file format 'vhdx' The command I used is qemu-img create -f vhdx -b test.vhdx test-snapshot.vhdx Here is my questions 1. Is vhdx format [full]

Re: Serious doubts about Gitlab CI

2021-03-18 Thread Stefan Hajnoczi
On Wed, Mar 17, 2021 at 09:29:32PM +0100, Philippe Mathieu-Daudé wrote: > Now I'm having serious doubts about Gitlab usefulness for the QEMU > community... The QEMU Project has 50,000 minutes of GitLab CI quota. Let's enable GitLab Merge Requests so that anyone can submit a merge request and get

Re: iotest 051 failure on s390

2021-03-18 Thread John Snow
On 3/18/21 12:32 PM, Christian Borntraeger wrote: On s390 with latest master I do get 051   fail   [17:30:00] [17:30:05]   5.4s output mismatch (see 051.out.bad) --- /home/cborntra/REPOS/qemu/tests/qemu-iotests/051.out +++ 051.out.bad @@ -61,13 +61,13 @@  (qemu) quit  

Re: Microsoft and Intel NVDIMM ACPI _DSM interfaces status?

2021-03-18 Thread Stefan Hajnoczi
On Thu, Mar 18, 2021 at 02:00:29AM +, Dexuan Cui wrote: > > From: Laszlo Ersek > > Sent: Wednesday, March 17, 2021 3:45 PM > > > The specs for the Intel interface are available here: > > > ... > > > This is the interface that QEMU emulates. It has been reported that > > > Windows 2016 Server

Re: Microsoft and Intel NVDIMM ACPI _DSM interfaces status?

2021-03-18 Thread Stefan Hajnoczi
On Wed, Mar 17, 2021 at 04:52:03PM -0700, Dan Williams wrote: > On Wed, Mar 17, 2021 at 4:49 AM Stefan Hajnoczi wrote: > > > > Hi, > > Microsoft and Intel developed two different ACPI NVDIMM _DSM interfaces. > > > > The specs for the Intel interface are available here: > >

Re: [PATCH for-6.0 v2 4/5] hw/core/loader: Add new function rom_ptr_for_as()

2021-03-18 Thread Peter Maydell
On Thu, 18 Mar 2021 at 18:44, Richard Henderson wrote: > > On 3/18/21 11:48 AM, Peter Maydell wrote: > > + > > +void *rom_ptr_for_as(AddressSpace *as, hwaddr addr, size_t size) > > +{ > > +/* > > + * Find any ROM data for the given guest address range. If there > > + * is a ROM blob

Re: [PULL 00/38] tcg patch queue for 6.0

2021-03-18 Thread Peter Maydell
On Wed, 17 Mar 2021 at 15:34, Richard Henderson wrote: > > The following changes since commit 5d1428d6c43942cfb40a909e4c30a5cbb81bda8f: > > Merge remote-tracking branch > 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20210315' into staging > (2021-03-17 09:07:28 +) > > are available in the

[PATCH 1/2] plugins: Update qemu-plugins.symbols to match qemu-plugins.h

2021-03-18 Thread Yonggang Luo
Reorder the function symbols that consistence with qemu-plugins.h Signed-off-by: Yonggang Luo --- plugins/qemu-plugins.symbols | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/plugins/qemu-plugins.symbols b/plugins/qemu-plugins.symbols index

[PATCH 2/2] plugins: Move all typedef and type declaration to the front of the qemu-plugin.h

2021-03-18 Thread Yonggang Luo
Signed-off-by: Yonggang Luo --- include/qemu/qemu-plugin.h | 187 ++--- 1 file changed, 92 insertions(+), 95 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 97cdfd7761..2cb17f3051 100644 --- a/include/qemu/qemu-plugin.h +++

[PATCH 0/2] Fix qemu-plugins.symbols and improve qemu-plugins.h

2021-03-18 Thread Yonggang Luo
Yonggang Luo (2): plugins: Update qemu-plugins.symbols to match qemu-plugins.h plugins: Move all typedef and type declaration to the front of the qemu-plugin.h include/qemu/qemu-plugin.h | 187 +-- plugins/qemu-plugins.symbols | 25 +++-- 2 files

Re: [PATCH for-6.0 v2 5/5] target/arm: Make M-profile VTOR loads on reset handle memory aliasing

2021-03-18 Thread Richard Henderson
On 3/18/21 11:48 AM, Peter Maydell wrote: For Arm M-profile CPUs, on reset the CPU must load its initial PC and SP from a vector table in guest memory. Because we can't guarantee reset ordering, we have to handle the possibility that the ROM blob loader's reset function has not yet run when the

Re: [PATCH for-6.0 v2 4/5] hw/core/loader: Add new function rom_ptr_for_as()

2021-03-18 Thread Richard Henderson
On 3/18/21 11:48 AM, Peter Maydell wrote: For accesses to rom blob data before or during reset, we have a function rom_ptr() which looks for a rom blob that would be loaded to the specified address, and returns a pointer into the rom blob data corresponding to that address. This allows board or

Re: [PATCH for-6.0 v2 2/5] memory: Document flatview_for_each_range()

2021-03-18 Thread Richard Henderson
On 3/18/21 11:48 AM, Peter Maydell wrote: Add a documentation comment describing flatview_for_each_range(). Signed-off-by: Peter Maydell --- include/exec/memory.h | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH for-6.0 v2 3/5] memory: Add offset_in_region to flatview_cb arguments

2021-03-18 Thread Richard Henderson
On 3/18/21 11:48 AM, Peter Maydell wrote: The function flatview_for_each_range() calls a callback for each range in a FlatView. Currently the callback gets the start and length of the range and the MemoryRegion involved, but not the offset within the MemoryRegion. Add this to the callback's

Re: [PATCH for-6.0 v2 1/5] memory: Make flatview_cb return bool, not int

2021-03-18 Thread Richard Henderson
On 3/18/21 11:48 AM, Peter Maydell wrote: The return value of the flatview_cb callback passed to the flatview_for_each_range() function is zero if the iteration through the ranges should continue, or non-zero to break out of it. Use a bool for this rather than int. Signed-off-by: Peter Maydell

Re: [PATCH v8 16/35] Hexagon (target/hexagon/conv_emu.[ch]) utility functions

2021-03-18 Thread Richard Henderson
On 3/18/21 12:03 PM, Taylor Simpson wrote: Here's an example from float_convs from single: f32(-0x1.31f75000p-40:0xab98fba8) Softfloat:to uint64: 0 (INEXACT ) Hexagon:to uint64: 0 (INVALID) Ahh, so an ieee conformance issue in hexagon -- failure to defer the sign check til

Re: [PATCH v2 0/6] esp: fix asserts/segfaults discovered by fuzzer

2021-03-18 Thread Paolo Bonzini
On 18/03/21 00:02, Mark Cave-Ayland wrote: Recently there have been a number of issues raised on Launchpad as a result of fuzzing the am53c974 (ESP) device. I spent some time over the past couple of days checking to see if anything had improved since my last patchset: from what I can tell the

Re: [PATCH 2/3] migration: Inhibit virtio-balloon for the duration of background snapshot

2021-03-18 Thread David Hildenbrand
On 18.03.21 18:46, Andrey Gruzdev wrote: The same thing as for incoming postcopy - we cannot deal with concurrent RAM discards when using background snapshot feature in outgoing migration. Signed-off-by: Andrey Gruzdev --- hw/virtio/virtio-balloon.c | 8 ++-- include/migration/misc.h

Re: KVM_MEM_READONLY slot flag not working properly

2021-03-18 Thread Paolo Bonzini
On 18/03/21 18:40, Lorenzo Susini wrote: Well I'm sorry but I didn't know IDT was marked as read only by Linux. If it is read only, how can you register any new interrupt handler? I guess it's a way of securing stuff against malicious attacks. I was taking for granted that the IDT was written

RE: [PATCH v8 16/35] Hexagon (target/hexagon/conv_emu.[ch]) utility functions

2021-03-18 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Thursday, March 18, 2021 10:36 AM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: phi...@redhat.com; alex.ben...@linaro.org; laur...@vivier.eu; > a...@rev.ng; Brian Cain > Subject: Re: [PATCH v8 16/35] Hexagon

Re: [PATCH] intc/i8259: avoid (false positive) gcc warning

2021-03-18 Thread BALATON Zoltan
On Thu, 18 Mar 2021, Philippe Mathieu-Daudé wrote: On 3/18/21 5:11 PM, Christian Borntraeger wrote: On 18.03.21 17:03, Paolo Bonzini wrote: On 18/03/21 16:47, Christian Borntraeger wrote: some copiler versions are smart enough to detect a potentially uninitialized variable, but are not smart

[PATCH for-6.0 v2 2/5] memory: Document flatview_for_each_range()

2021-03-18 Thread Peter Maydell
Add a documentation comment describing flatview_for_each_range(). Signed-off-by: Peter Maydell --- include/exec/memory.h | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 22c10b8496a..71a1841943e

[PATCH for-6.0 v2 5/5] target/arm: Make M-profile VTOR loads on reset handle memory aliasing

2021-03-18 Thread Peter Maydell
For Arm M-profile CPUs, on reset the CPU must load its initial PC and SP from a vector table in guest memory. Because we can't guarantee reset ordering, we have to handle the possibility that the ROM blob loader's reset function has not yet run when the CPU resets, in which case the data in an

Re: [PATCH 3/3] i386: Make sure kvm_arch_set_tsc_khz() succeeds on migration when 'hv-reenlightenment' was exposed

2021-03-18 Thread Marcelo Tosatti
On Thu, Mar 18, 2021 at 05:38:00PM +0100, Vitaly Kuznetsov wrote: > Paolo Bonzini writes: > > > On 18/03/21 17:02, Vitaly Kuznetsov wrote: > >> KVM doesn't fully support Hyper-V reenlightenment notifications on > >> migration. In particular, it doesn't support emulating TSC frequency > >> of the

[PATCH for-6.0 v2 0/5] arm: Make M-profile VTOR loads on reset handle memory aliasin

2021-03-18 Thread Peter Maydell
For Arm M-profile CPUs, on reset the CPU must load its initial PC and SP from a vector table in guest memory. Because we can't guarantee reset ordering, we have to handle the possibility that the ROM blob loader's reset function has not yet run when the CPU resets, in which case the data in an

Re: [PATCH v2] docs/devel/testing.rst: Fix references to unit tests

2021-03-18 Thread Willian Rampazzo
On Thu, Mar 18, 2021 at 2:49 PM Wainer dos Santos Moschetta wrote: > > With the recent move of the unit tests to tests/unit directory some > instructions under the "Unit tests" section became imprecise, which > are fixed by this change. > > Fixes: da668aa15b99 ("tests: Move unit tests into a

[PATCH for-6.0 v2 3/5] memory: Add offset_in_region to flatview_cb arguments

2021-03-18 Thread Peter Maydell
The function flatview_for_each_range() calls a callback for each range in a FlatView. Currently the callback gets the start and length of the range and the MemoryRegion involved, but not the offset within the MemoryRegion. Add this to the callback's arguments; we're going to want it for a new

[PATCH 2/3] migration: Inhibit virtio-balloon for the duration of background snapshot

2021-03-18 Thread Andrey Gruzdev
The same thing as for incoming postcopy - we cannot deal with concurrent RAM discards when using background snapshot feature in outgoing migration. Signed-off-by: Andrey Gruzdev --- hw/virtio/virtio-balloon.c | 8 ++-- include/migration/misc.h | 2 ++ migration/migration.c | 8

[PATCH 3/3] migration: Pre-fault memory before starting background snasphot

2021-03-18 Thread Andrey Gruzdev
This commit solves the issue with userfault_fd WP feature that background snapshot is based on. For any never poluated or discarded memory page, the UFFDIO_WRITEPROTECT ioctl() would skip updating PTE for that page, thereby loosing WP setting for it. So we need to pre-fault pages for each RAM

  1   2   3   4   >