Re: [PATCH v2 0/9] Alpine Linux build fix and CI pipeline

2021-01-18 Thread Thomas Huth
On 18/01/2021 07.37, Jiaxun Yang wrote: Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox. It it popular among Docker guests and embedded applications. Adding it to test against different libc. Patches pending review at v2 are: 7, 8, 9 Tree avi

Re: [PATCH v7 08/13] confidential guest support: Move SEV initialization into arch specific code

2021-01-18 Thread Cornelia Huck
On Mon, 18 Jan 2021 14:03:08 +1100 David Gibson wrote: > On Fri, Jan 15, 2021 at 02:24:25PM +0100, Cornelia Huck wrote: > > On Thu, 14 Jan 2021 10:58:06 +1100 > > David Gibson wrote: > > > > > While we've abstracted some (potential) differences between mechanisms for > > > securing guest memo

Re: [PATCH-for-5.2 2/2] gitlab-ci: Avoid running the EDK2 job when not necessary

2021-01-18 Thread Thomas Huth
On 17/01/2021 19.48, Philippe Mathieu-Daudé wrote: On 11/11/20 10:18 AM, Philippe Mathieu-Daudé wrote: On 11/10/20 4:35 PM, Daniel P. Berrangé wrote: On Tue, Nov 10, 2020 at 01:16:06PM +0100, Philippe Mathieu-Daudé wrote: The EDK2 jobs use the 'changes' keyword, which "makes it possible to def

pending fuzzing patches (was Re: [PATCH 2/2] fuzz: log the arguments used to initialize QEMU)

2021-01-18 Thread Paolo Bonzini
On 17/01/21 21:10, Alexander Bulekov wrote: This is useful for building reproducers. Instead checking the code or the QEMU_FUZZ_ARGS, the arguments are at the top of the crash log. Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/fuzz.c | 11 ++- 1 file changed, 10 insertions(+)

Re: [PATCH v2] ide: atapi: check logical block address and read size (CVE-2020-29443)

2021-01-18 Thread Paolo Bonzini
On 18/01/21 07:32, P J P wrote: From: Prasad J Pandit While processing ATAPI cmd_read/cmd_read_cd commands, Logical Block Address (LBA) maybe invalid OR closer to the last block, leading to an OOB access issues. Add range check to avoid it. Fixes: CVE-2020-29443 Reported-by: Wenxiang Qian Fix

[Bug 1912170] [NEW] NUMA nodes created with memory-backend-ram shows size different than requested

2021-01-18 Thread Rafał Rudnicki
Public bug reported: I created system with 7 NUMA nodes where nodes 0-3 should have 268435456 bytes size and nodes 4-6 exactly 1610612736 bytes size, but when I run "numactl -H" I got different (smaller) sizes. It is essential for me to be able to emulate a system with nodes of exact size - is

Re: [PATCH 4/6] accel/tcg: Declare missing cpu_loop_exit*() stubs

2021-01-18 Thread Claudio Fontana
On 1/17/21 5:48 PM, Philippe Mathieu-Daudé wrote: > cpu_loop_exit*() functions are declared in accel/tcg/cpu-exec-common.c, > and are not available when TCG accelerator is not built. Add stubs so > linking without TCG succeed. > > Problematic files: > > - hw/semihosting/console.c in qemu_semihost

Re: [RFC PATCH 5/6] accel/tcg: Restrict cpu_io_recompile() from other accelerators

2021-01-18 Thread Claudio Fontana
On 1/17/21 5:48 PM, Philippe Mathieu-Daudé wrote: > As cpu_io_recompile() is only called within TCG accelerator > in cputlb.c, declare it locally. > > Signed-off-by: Philippe Mathieu-Daudé It's only used in accel/tcg/cputlb.c, should it be a static function there? > --- > RFC because not sure

Re: [PATCH v3 1/2] hw/intc: Add Loongson Inter Processor Interrupt controller

2021-01-18 Thread Philippe Mathieu-Daudé
Hi Jiaxun, On 1/18/21 2:17 AM, Jiaxun Yang wrote: > Loongson IPI controller is a MMIO based simple level triggered > interrupt controller. It will trigger IRQ to it's upstream > processor when set register is written. > > It also has 4 64bit mailboxes to pass boot information to > secondary proce

Re: [PATCH v3 2/2] hw/mips/loongson3_virt: Add TCG SMP support

2021-01-18 Thread Philippe Mathieu-Daudé
On 1/18/21 2:17 AM, Jiaxun Yang wrote: > loongson3_virt has KVM SMP support in kenrel. > This patch adds TCG SMP support by enable IPI controller > for machine. > > Also add definition about IRQs to enhance readability. > > Note that TCG SMP can only support up to 4 CPUs as we > didn't implement

Re: [RFC PATCH 6/6] softmmu: Restrict watchpoint handlers to TCG accelerator

2021-01-18 Thread Claudio Fontana
On 1/17/21 5:48 PM, Philippe Mathieu-Daudé wrote: > Watchpoint funtions use cpu_restore_state() which is only > available when TCG accelerator is built. Restrict them > to TCG. > > Signed-off-by: Philippe Mathieu-Daudé I am doing some of this in my series, and I did not notice that cpu_watchpoin

Re: [PATCH 1/6] accel/tcg: Make cpu_gen_init() static

2021-01-18 Thread Claudio Fontana
On 1/17/21 5:48 PM, Philippe Mathieu-Daudé wrote: > cpu_gen_init() is TCG specific, only used in tcg/translate-all.c. > No need to export it to other accelerators, declare it statically. > > Signed-off-by: Philippe Mathieu-Daudé > --- > We could also inline the 1-line call.. > --- > include/exec

Re: [PATCH 3/6] accel/tcg: Restrict tb_gen_code() from other accelerators

2021-01-18 Thread Claudio Fontana
On 1/17/21 5:48 PM, Philippe Mathieu-Daudé wrote: > tb_gen_code() is only called within TCG accelerator, > declare it locally. Is this used only in accel/tcg/cpu-exec.c ? Should it be a static function there? Ciao, Claudio > > Signed-off-by: Philippe Mathieu-Daudé > --- > accel/tcg/internal

Re: [PATCH 2/6] accel/tcg: Restrict tb_flush_jmp_cache() from other accelerators

2021-01-18 Thread Claudio Fontana
On 1/17/21 5:48 PM, Philippe Mathieu-Daudé wrote: > tb_flush_jmp_cache() is only called within TCG accelerator, > declare it locally. > > Signed-off-by: Philippe Mathieu-Daudé > --- > We could also inline it in cputlb.c, the single user. That is what I was thinking, I would be more inclined to p

Re: [PATCH] virtio: move 'use-disabled-flag' property to hw_compat_4_2

2021-01-18 Thread Stefano Garzarella
Ping :-) On Fri, Jan 08, 2021 at 06:12:52PM +0100, Stefano Garzarella wrote: Commit 9d7bd0826f introduced a new 'use-disabled-flag' property set to true by default. To allow the migration, we set this property to false in the hw_compat, but in the wrong place (hw_compat_4_1). Since commit 9d7bd

Re: [PATCH 0/6] accel: Restrict TCG-specific code

2021-01-18 Thread Claudio Fontana
On 1/17/21 5:48 PM, Philippe Mathieu-Daudé wrote: > Hi, > > I've prepared some patches to have KVM-only builds. > Some patches are generic - well kind of, instead they are > TCG specific =) - so I'm sending them as a separate series. > > Please review, > > Phil. I am wondering the best way to c

Re: [PATCH 00/18] hw: Mark the device with no migratable fields

2021-01-18 Thread Philippe Mathieu-Daudé
Hi Laurent, On 1/18/21 8:33 AM, Laurent Vivier wrote: > Le 14/01/2021 à 16:49, Philippe Mathieu-Daudé a écrit : >> On 7/9/20 9:19 PM, Peter Maydell wrote: >>> On Fri, 3 Jul 2020 at 21:19, Philippe Mathieu-Daudé wrote: This is a proof-of-concept after chatting with Peter Maydell on

Re: [PATCH v2 0/2] net/eth: Fix stack-buffer-overflow in _eth_get_rss_ex_dst_addr()

2021-01-18 Thread Miroslav Rezanina
On Fri, Jan 15, 2021 at 04:11:24PM +0100, Philippe Mathieu-Daudé wrote: > I had a look at the patch from Miroslav trying to silence a > compiler warning which in fact is a nasty bug. Here is a fix. > https://www.mail-archive.com/qemu-devel@nongnu.org/msg772735.html > > v2: Restrict tests so they

Re: [PATCH v2 1/3] fuzz: enable dynamic args for generic-fuzz configs

2021-01-18 Thread Thomas Huth
On 18/01/2021 00.09, Alexander Bulekov wrote: For some device configurations, it is useful to configure some resources, and adjust QEMU arguments at runtime, prior to fuzzing. This patch adds an "argfunc" to generic the generic_fuzz_config. When specified, it is responsible for configuring the re

Re: [PATCH-for-5.2 2/2] gitlab-ci: Avoid running the EDK2 job when not necessary

2021-01-18 Thread Philippe Mathieu-Daudé
On 1/18/21 9:30 AM, Thomas Huth wrote: > On 17/01/2021 19.48, Philippe Mathieu-Daudé wrote: >> On 11/11/20 10:18 AM, Philippe Mathieu-Daudé wrote: >>> On 11/10/20 4:35 PM, Daniel P. Berrangé wrote: On Tue, Nov 10, 2020 at 01:16:06PM +0100, Philippe Mathieu-Daudé wrote: > The EDK2 jobs use

Re: [PATCH 4/6] accel/tcg: Declare missing cpu_loop_exit*() stubs

2021-01-18 Thread Claudio Fontana
On 1/17/21 5:48 PM, Philippe Mathieu-Daudé wrote: > cpu_loop_exit*() functions are declared in accel/tcg/cpu-exec-common.c, > and are not available when TCG accelerator is not built. Add stubs so > linking without TCG succeed. The reason why stubs are needed here at all seems to be that that the c

Re: pending fuzzing patches (was Re: [PATCH 2/2] fuzz: log the arguments used to initialize QEMU)

2021-01-18 Thread Thomas Huth
On 18/01/2021 09.43, Paolo Bonzini wrote: On 17/01/21 21:10, Alexander Bulekov wrote: This is useful for building reproducers. Instead checking the code or the QEMU_FUZZ_ARGS, the arguments are at the top of the crash log. Signed-off-by: Alexander Bulekov ---   tests/qtest/fuzz/fuzz.c | 11 +++

Re: [PATCH v4 0/3] support NVMe smart critial warning injection

2021-01-18 Thread Klaus Jensen
On Jan 15 11:26, zhenwei pi wrote: > v3 -> v4: > - Drop "Fix overwritten bar.cap". (Already fixed) > > - Avoid to enqueue the duplicate event. > > - Several minor changes for coding style & function/variable name. > > v2 -> v3: > - Introduce "Persistent Memory Region has become read-only or >

Re: [RFC PATCH 6/6] softmmu: Restrict watchpoint handlers to TCG accelerator

2021-01-18 Thread Philippe Mathieu-Daudé
On 1/18/21 10:10 AM, Claudio Fontana wrote: > On 1/17/21 5:48 PM, Philippe Mathieu-Daudé wrote: >> Watchpoint funtions use cpu_restore_state() which is only >> available when TCG accelerator is built. Restrict them >> to TCG. >> >> Signed-off-by: Philippe Mathieu-Daudé > > I am doing some of this

Re: [PATCH 4/6] accel/tcg: Declare missing cpu_loop_exit*() stubs

2021-01-18 Thread Philippe Mathieu-Daudé
On 1/18/21 10:29 AM, Claudio Fontana wrote: > On 1/17/21 5:48 PM, Philippe Mathieu-Daudé wrote: >> cpu_loop_exit*() functions are declared in accel/tcg/cpu-exec-common.c, >> and are not available when TCG accelerator is not built. Add stubs so >> linking without TCG succeed. > > The reason why stu

Re: [PATCH v2 2/9] libvhost-user: Include poll.h instead of sys/poll.h

2021-01-18 Thread Philippe Mathieu-Daudé
On 1/18/21 7:38 AM, Jiaxun Yang wrote: > Musl libc complains about it's wrong usage. > > In file included from ../subprojects/libvhost-user/libvhost-user.h:20, > from ../subprojects/libvhost-user/libvhost-user-glib.h:19, > from ../subprojects/libvhost-user/libvhos

Re: [PATCH v2 3/9] osdep.h: Remove include

2021-01-18 Thread Philippe Mathieu-Daudé
On 1/18/21 7:38 AM, Jiaxun Yang wrote: > From: Michael Forney > > Prior to 2a4b472c3c, sys/signal.h was only included on OpenBSD > (apart from two .c files). The POSIX standard location for this > header is just and in fact, OpenBSD's signal.h includes > sys/signal.h itself. > > Unconditionally

Re: [PATCH v2 4/9] hw/block/nand: Rename PAGE_SIZE to NAND_PAGE_SIZE

2021-01-18 Thread Philippe Mathieu-Daudé
On 1/18/21 7:38 AM, Jiaxun Yang wrote: > As per POSIX specification of limits.h [1], OS libc may define > PAGE_SIZE in limits.h. > > To prevent collosion of definition, we rename PAGE_SIZE here. > > [1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html > > Signed-off-by: Jiaxun Ya

Re: [PATCH v2 5/9] elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE

2021-01-18 Thread Philippe Mathieu-Daudé
On 1/18/21 7:38 AM, Jiaxun Yang wrote: > As per POSIX specification of limits.h [1], OS libc may define > PAGE_SIZE in limits.h. > > To prevent collosion of definition, we rename PAGE_SIZE here. > > [1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html > > Signed-off-by: Jiaxun Ya

[PATCH v2 00/12] hw/block/nvme: misc cmb/pmr patches and bump to v1.4

2021-01-18 Thread Klaus Jensen
From: Klaus Jensen This is a resend of "hw/block/nvme: allow cmb and pmr to coexist" with some more PMR work added (PMR RDS/WDS support). This includes a resurrection of Andrzej's series[1] from back July. Andrzej's main patch basically moved the CMB from BAR 2 into an offset in BAR 4 (located

[PATCH v2 01/12] hw/block/nvme: add size to mmio read/write trace events

2021-01-18 Thread Klaus Jensen
From: Klaus Jensen Add the size of the mmio read/write to the trace event. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 4 ++-- hw/block/trace-events | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 47da73ce2364..bd7e25

[PATCH v2 10/12] hw/block/nvme: move cmb logic to v1.4

2021-01-18 Thread Klaus Jensen
From: Padmakar Kalghatgi Implement v1.4 logic for configuring the Controller Memory Buffer. This is not backward compatible with v1.3, so drivers that only support v1.3 will not be able to use the CMB anymore. Signed-off-by: Padmakar Kalghatgi Signed-off-by: Klaus Jensen --- hw/block/nvme.h

[PATCH v2 03/12] hw/block/nvme: indicate CMB support through controller capabilities register

2021-01-18 Thread Klaus Jensen
From: Andrzej Jakowski This patch sets CMBS bit in controller capabilities register when user configures NVMe driver with CMB support, so capabilites are correctly reported to guest OS. Signed-off-by: Andrzej Jakowski Reviewed-by: Maxim Levitsky Signed-off-by: Klaus Jensen --- include/block/

[PATCH v2 02/12] hw/block/nvme: fix 64 bit register hi/lo split writes

2021-01-18 Thread Klaus Jensen
From: Klaus Jensen 64 bit registers like ASQ and ACQ should be writable by both a hi/lo 32 bit write combination as well as a plain 64 bit write. The spec does not define ordering on the hi/lo split, but the code currently assumes that the low order bits are written first. Additionally, the code

[PATCH v2 06/12] hw/block/nvme: rename PMR/CMB shift/mask fields

2021-01-18 Thread Klaus Jensen
From: Klaus Jensen Use the correct field names. Signed-off-by: Klaus Jensen --- include/block/nvme.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/block/nvme.h b/include/block/nvme.h index 86d7fc2f905c..f3cbe17d0971 100644 --- a/include/block/nvme

[PATCH v2 05/12] hw/block/nvme: allow cmb and pmr to coexist

2021-01-18 Thread Klaus Jensen
From: Klaus Jensen With BAR 4 now free to use, allow PMR and CMB to be enabled simultaneously. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index ec2104fcf3b6..f3bea582b3c

[PATCH v2 11/12] hw/block/nvme: bump to v1.4

2021-01-18 Thread Klaus Jensen
From: Klaus Jensen With the new CMB logic in place, bump the implemented specification version to v1.4. This requires adding the setting the CNTRLTYPE field and modifying the VWC field since 0x00 is no longer a valid value for bits 2:1. Signed-off-by: Klaus Jensen --- include/block/nvme.h | 3

[PATCH v2 08/12] hw/block/nvme: disable PMR at boot up

2021-01-18 Thread Klaus Jensen
From: Klaus Jensen The PMR should not be enabled at boot up. Disable the PMR MemoryRegion initially and implement MMIO for PMRCTL, allowing the host to enable the PMR explicitly. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(

[PATCH v2 04/12] hw/block/nvme: move msix table and pba to BAR 0

2021-01-18 Thread Klaus Jensen
From: Klaus Jensen In the interest of supporting both CMB and PMR to be enabled on the same device, move the MSI-X table and pending bit array out of BAR 4 and into BAR 0. This is a simplified version of the patch contributed by Andrzej Jakowski (see [1]). Leaving the CMB at offset 0 removes the

[PATCH v2 07/12] hw/block/nvme: remove redundant zeroing of PMR registers

2021-01-18 Thread Klaus Jensen
From: Klaus Jensen The controller registers are initially zero. Remove the redundant zeroing. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 35 --- 1 file changed, 35 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index f3bea582b3c0..9ee9570bb6

[PATCH v2 09/12] hw/block/nvme: add PMR RDS/WDS support

2021-01-18 Thread Klaus Jensen
From: Naveen Nagar Add support for the PMRMSCL and PMRMSCU MMIO registers. This allows adding RDS/WDS support for PMR as well. Signed-off-by: Naveen Nagar Signed-off-by: Klaus Jensen --- hw/block/nvme.h | 1 + include/block/nvme.h | 1 + hw/block/nvme.c | 89 ++

Re: [PATCH v6 08/11] iotests: add testenv.py

2021-01-18 Thread Kevin Wolf
Am 16.01.2021 um 12:03 hat Vladimir Sementsov-Ogievskiy geschrieben: > 15.01.2021 16:30, Vladimir Sementsov-Ogievskiy wrote: > > 15.01.2021 16:20, Kevin Wolf wrote: > > > Am 15.01.2021 um 14:10 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > > 15.01.2021 15:45, Kevin Wolf wrote: > > > > > Am 15

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-01-18 Thread Francisco Iglesias
Hi Bin, On [2021 Jan 15] Fri 22:38:18, Bin Meng wrote: > Hi Francisco, > > On Fri, Jan 15, 2021 at 8:26 PM Francisco Iglesias > wrote: > > > > Hi Bin, > > > > On [2021 Jan 15] Fri 10:07:52, Bin Meng wrote: > > > Hi Francisco, > > > > > > On Fri, Jan 15, 2021 at 2:13 AM Francisco Iglesias > > >

Re: [PATCH v2 6/9] tests: Rename PAGE_SIZE definitions

2021-01-18 Thread Philippe Mathieu-Daudé
On 1/18/21 7:38 AM, Jiaxun Yang wrote: > As per POSIX specification of limits.h [1], OS libc may define > PAGE_SIZE in limits.h. > > Self defined PAGE_SIZE is frequently used in tests, to prevent > collosion of definition, we give PAGE_SIZE definitons reasonable > prefixs. > > [1]: https://pubs.o

Re: [PATCH v4 02/10] iotests/297: Rewrite in Python and extend reach

2021-01-18 Thread Max Reitz
On 15.01.21 20:27, Willian Rampazzo wrote: On Fri, Jan 15, 2021 at 2:43 PM Max Reitz wrote: Instead of checking iotests.py only, check all Python files in the qemu-iotests/ directory. Of course, most of them do not pass, so there is an extensive skip list for now. (The only files that do pas

Re: [PATCH-for-5.2 2/2] gitlab-ci: Avoid running the EDK2 job when not necessary

2021-01-18 Thread Daniel P . Berrangé
On Mon, Jan 18, 2021 at 10:26:15AM +0100, Philippe Mathieu-Daudé wrote: > On 1/18/21 9:30 AM, Thomas Huth wrote: > > On 17/01/2021 19.48, Philippe Mathieu-Daudé wrote: > >> On 11/11/20 10:18 AM, Philippe Mathieu-Daudé wrote: > >>> On 11/10/20 4:35 PM, Daniel P. Berrangé wrote: > On Tue, Nov 10

[PATCH v2 12/12] hw/block/nvme: lift cmb restrictions

2021-01-18 Thread Klaus Jensen
From: Klaus Jensen The controller now implements v1.4 and we can lift the restrictions on CMB Data Pointer and Command Independent Locations Support (CDPCILS) and CMB Data Pointer Mixed Locations Support (CDPMLS) since the device really does not care about mixed host/cmb pointers in those cases.

Re: [PATCH v2 9/9] gitlab-ci: Add alpine to pipeline

2021-01-18 Thread Daniel P . Berrangé
On Mon, Jan 18, 2021 at 02:38:08PM +0800, Jiaxun Yang wrote: > We only run build test and check-acceptance as their are too many > failures in checks due to minor string mismatch. Can you give real examples of what's broken here, as that sounds rather suspicious, and I'm not convinced it should be

Re: [PATCH v2] ide: atapi: check logical block address and read size (CVE-2020-29443)

2021-01-18 Thread Philippe Mathieu-Daudé
On 1/18/21 7:32 AM, P J P wrote: > From: Prasad J Pandit > > While processing ATAPI cmd_read/cmd_read_cd commands, > Logical Block Address (LBA) maybe invalid OR closer to the last block, > leading to an OOB access issues. Add range check to avoid it. > > Fixes: CVE-2020-29443 > Reported-by: Wen

Re: [RFC PATCH 1/2] block: Allow changing bs->file on reopen

2021-01-18 Thread Vladimir Sementsov-Ogievskiy
15.01.2021 16:02, Alberto Garcia wrote: When the x-blockdev-reopen was added it allowed reconfiguring the graph by replacing backing files, but changing the 'file' option was forbidden. Because of this restriction some operations are not possible, notably inserting and removing block filters. Th

Re: [PATCH 2/4] hw/misc/pvpanic: add PCI interface support

2021-01-18 Thread Gerd Hoffmann
> --- a/docs/specs/pci-ids.txt > +++ b/docs/specs/pci-ids.txt > @@ -64,6 +64,7 @@ PCI devices (other than virtio): > 1b36:000d PCI xhci usb host adapter > 1b36:000f mdpy (mdev sample device), linux/samples/vfio-mdev/mdpy.c > 1b36:0010 PCIe NVMe device (-device nvme) > +1b36:0011 PCI PVPanic

Re: [PATCH 4/6] accel/tcg: Declare missing cpu_loop_exit*() stubs

2021-01-18 Thread Claudio Fontana
On 1/18/21 10:39 AM, Philippe Mathieu-Daudé wrote: > On 1/18/21 10:29 AM, Claudio Fontana wrote: >> On 1/17/21 5:48 PM, Philippe Mathieu-Daudé wrote: >>> cpu_loop_exit*() functions are declared in accel/tcg/cpu-exec-common.c, >>> and are not available when TCG accelerator is not built. Add stubs so

Re: [PATCH v2 9/9] gitlab-ci: Add alpine to pipeline

2021-01-18 Thread Thomas Huth
On 18/01/2021 11.11, Daniel P. Berrangé wrote: On Mon, Jan 18, 2021 at 02:38:08PM +0800, Jiaxun Yang wrote: We only run build test and check-acceptance as their are too many failures in checks due to minor string mismatch. Can you give real examples of what's broken here, as that sounds rather

Re: [RFC PATCH 0/2] Allow changing bs->file on reopen

2021-01-18 Thread Vladimir Sementsov-Ogievskiy
15.01.2021 16:02, Alberto Garcia wrote: Hi, during the past months we talked about making x-blockdev-reopen stable API, and one of the missing things was having support for changing bs->file. See here for the discusssion (I can't find the message from Kashyap that started the thread in the web a

Re: [PATCH v2 9/9] gitlab-ci: Add alpine to pipeline

2021-01-18 Thread Daniel P . Berrangé
On Mon, Jan 18, 2021 at 11:22:47AM +0100, Thomas Huth wrote: > On 18/01/2021 11.11, Daniel P. Berrangé wrote: > > On Mon, Jan 18, 2021 at 02:38:08PM +0800, Jiaxun Yang wrote: > > > We only run build test and check-acceptance as their are too many > > > failures in checks due to minor string mismatc

Re: [PULL 00/10] pc,pci,virtio: fixes, features

2021-01-18 Thread Peter Maydell
On Sun, 17 Jan 2021 at 11:46, Michael S. Tsirkin wrote: > > The following changes since commit f8e1d8852e393b3fd524fb005e38590063d99bc0: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20210112-1' into staging (2021-01-12 > 21:23:25 +) > > are available in the Git

Re: [PATCH v1 7/7] spapr.c: consider CPU core online state before allowing unplug

2021-01-18 Thread Daniel Henrique Barboza
On 1/17/21 10:18 PM, David Gibson wrote: On Fri, Jan 15, 2021 at 03:52:56PM -0300, Daniel Henrique Barboza wrote: On 1/15/21 2:22 PM, Greg Kurz wrote: On Thu, 14 Jan 2021 15:06:28 -0300 Daniel Henrique Barboza wrote: The only restriction we have when unplugging CPUs is to forbid unplug

Re: [PATCH 00/28] qemu-option, keyval, vl: switch -object/-M/-accel to keyval parsing

2021-01-18 Thread Kevin Wolf
Am 17.01.2021 um 17:48 hat Paolo Bonzini geschrieben: > On 02/12/20 10:02, Paolo Bonzini wrote: > > This series switches -object, -M and -accel from QemuOpts to keyval. > > Monitor commands device_add and netdev_add are also switched to keyval, > > though -device and -netdev for now are not. > > >

Re: [PATCH 3/4] pvpanic : update pvpanic spec document

2021-01-18 Thread Philippe Mathieu-Daudé
On 1/15/21 7:34 PM, Mihai Carabas wrote: > Add pvpanic PCI device support details in docs/specs/pvpanic.txt. > > Signed-off-by: Mihai Carabas > --- > docs/specs/pvpanic.txt | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/docs/specs/pvpanic.txt b/docs/specs

Re: [PATCH v2 8/9] tests/docker: Add dockerfile for Alpine Linux

2021-01-18 Thread Daniel P . Berrangé
On Mon, Jan 18, 2021 at 02:38:07PM +0800, Jiaxun Yang wrote: > Alpine Linux[1] is a security-oriented, lightweight Linux distribution > based on musl libc and busybox. > > It it popular among Docker guests and embedded applications. > > Adding it to test against different libc. > > [1]: https://

[PATCH v5 01/10] iotests.py: Assume a couple of variables as given

2021-01-18 Thread Max Reitz
There are a couple of environment variables that we fetch with os.environ.get() without supplying a default. Clearly they are required and expected to be set by the ./check script (as evidenced by execute_setup_common(), which checks for test_dir and qemu_default_machine to be set, and aborts if t

[PATCH v5 02/10] iotests/297: Rewrite in Python and extend reach

2021-01-18 Thread Max Reitz
Instead of checking iotests.py only, check all Python files in the qemu-iotests/ directory. Of course, most of them do not pass, so there is an extensive skip list for now. (The only files that do pass are 209, 254, 283, and iotests.py.) (Alternatively, we could have the opposite, i.e. an explic

[PATCH v5 04/10] iotests/129: Remove test images in tearDown()

2021-01-18 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Willian Rampazzo --- tests/qemu-iotests/129 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index 0e13244d85..2fc65ada6a 100755 --- a/te

[PATCH v5 05/10] iotests/129: Do not check @busy

2021-01-18 Thread Max Reitz
@busy is false when the job is paused, which happens all the time because that is how jobs yield (e.g. for mirror at least since commit 565ac01f8d3). Back when 129 was added (2015), perhaps there was no better way of checking whether the job was still actually running. Now we have the @status fie

[PATCH v5 03/10] iotests: Move try_remove to iotests.py

2021-01-18 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Willian Rampazzo --- tests/qemu-iotests/124| 8 +--- tests/qemu-iotests/iotests.py | 11 +++ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/qemu-i

[PATCH v5 00/10] iotests: Fix 129 and expand 297’s reach

2021-01-18 Thread Max Reitz
Cover letters: v1: https://lists.nongnu.org/archive/html/qemu-block/2021-01/msg00254.html v2: https://lists.nongnu.org/archive/html/qemu-block/2021-01/msg00296.html v3: https://lists.nongnu.org/archive/html/qemu-block/2021-01/msg00371.html v4: https://lists.nongnu.org/archive/html/qemu-block/2021-0

[PATCH v5 06/10] iotests/129: Use throttle node

2021-01-18 Thread Max Reitz
Throttling on the BB has not affected block jobs in a while, so it is possible that one of the jobs in 129 finishes before the VM is stopped. We can fix that by running the job from a throttle node. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Revie

[PATCH v5 08/10] iotests/129: Limit mirror job's buffer size

2021-01-18 Thread Max Reitz
Issuing 'stop' on the VM drains all nodes. If the mirror job has many large requests in flight, this may lead to significant I/O that looks a bit like 'stop' would make the job try to complete (which is what 129 should verify not to happen). We can limit the I/O in flight by limiting the buffer s

[PATCH v5 09/10] iotests/129: Clean up pylint and mypy complaints

2021-01-18 Thread Max Reitz
And consequentially drop it from 297's skip list. Signed-off-by: Max Reitz Reviewed-by: Willian Rampazzo Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/129 | 4 ++-- tests/qemu-iotests/297 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotes

Re: [PATCH v1 7/7] spapr.c: consider CPU core online state before allowing unplug

2021-01-18 Thread Greg Kurz
On Mon, 18 Jan 2021 12:12:03 +1100 David Gibson wrote: > On Fri, Jan 15, 2021 at 06:22:16PM +0100, Greg Kurz wrote: > > On Thu, 14 Jan 2021 15:06:28 -0300 > > Daniel Henrique Barboza wrote: > > > > > The only restriction we have when unplugging CPUs is to forbid unplug of > > > the boot cpu cor

[PATCH v5 07/10] iotests/129: Actually test a commit job

2021-01-18 Thread Max Reitz
Before this patch, test_block_commit() performs an active commit, which under the hood is a mirror job. If we want to test various different block jobs, we should perhaps run an actual commit job instead. Doing so requires adding an overlay above the source node before the commit is done (and the

[PATCH v5 10/10] iotests/300: Clean up pylint and mypy complaints

2021-01-18 Thread Max Reitz
And consequentially drop it from 297's skip list. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Willian Rampazzo --- tests/qemu-iotests/297 | 2 +- tests/qemu-iotests/300 | 18 +++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a

[Bug 1886793] Re: "go install" command fails while running inside s390x docker container on x86_64 host using qemu

2021-01-18 Thread Nirman Narang
Any update on this? Tried on fresh env, Illegal instruction (core dumped), and Segmentation fault (core dumped) errors are still thrown with go commands. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bug

[PULL v2 00/30] testing, gdbstub and semihosting

2021-01-18 Thread Alex Bennée
The following changes since commit 825a215c003cd028e26c7d19aa5049d957345f43: Merge remote-tracking branch 'remotes/kraxel/tags/audio-20210115-pull-request' into staging (2021-01-15 22:21:21 +) are available in the Git repository at: https://github.com/stsquad/qemu.git tags/pull-testing

Re: [Qemu-devel] [PULL 7/7] hw/usb: avoid format truncation warning when formatting port name

2021-01-18 Thread Philippe Mathieu-Daudé
Hello, On 5/3/19 8:59 AM, Gerd Hoffmann wrote: > From: Daniel P. Berrangé > > hw/usb/hcd-xhci.c: In function ‘usb_xhci_realize’: > hw/usb/hcd-xhci.c:3339:66: warning: ‘%d’ directive output may be truncated > writing between 1 and 10 bytes into a region of size 5 [-Wformat-trunca\ > tion=] > 33

[PULL 0/4] Trivial branch for 6.0 patches

2021-01-18 Thread Laurent Vivier
r-6.0-pull-request for you to fetch changes up to 580e733321511ab4eda7d6ca14ca157d71ea8728: hw/ide/ahci: Replace fprintf() by qemu_log_mask(GUEST_ERROR) (2021-01-18 11= :51:26 +0100) Trivial patches 20210118 Fix memory leaks Use qem

[PULL 1/4] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR)

2021-01-18 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Replace I/O write error reported with error_report() by qemu_log_mask(GUEST_ERROR) which allow filtering. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Stefano Garzarella Message-Id: <20201210172834.178052-1-phi...@redhat.com> Signed-

[PULL 2/4] pl031: Use timer_free() in the finalize function to avoid memleaks

2021-01-18 Thread Laurent Vivier
From: Gan Qixin When running device-introspect-test, a memory leak occurred in the pl031_init function, this patch use timer_free() in the finalize function to fix it. ASAN shows memory leak stack: Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0xab97e1f0 in __interceptor_c

[PULL 4/4] hw/ide/ahci: Replace fprintf() by qemu_log_mask(GUEST_ERROR)

2021-01-18 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Replace fprintf() calls by qemu_log_mask(LOG_GUEST_ERROR). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20210112112955.1849212-1-phi...@redhat.com> Signed-off-by: Laurent Vivier --- hw/ide/ahci.c | 8 +--- 1 file changed, 5 inse

[PULL 3/4] misc/mos6522: Use timer_free() in the finalize function to avoid memleak

2021-01-18 Thread Laurent Vivier
From: Gan Qixin When running device-introspect-test, a memory leak occurred in the mos6522_init function, this patch use timer_free() in the finalize function to fix it. ASAN shows memory leak stack: Direct leak of 96 byte(s) in 2 object(s) allocated from: #0 0xfffd5fe9e1f0 in __interceptor

Re: [Qemu-devel] [PULL 7/7] hw/usb: avoid format truncation warning when formatting port name

2021-01-18 Thread Daniel P . Berrangé
On Mon, Jan 18, 2021 at 12:31:07PM +0100, Philippe Mathieu-Daudé wrote: > Hello, > > On 5/3/19 8:59 AM, Gerd Hoffmann wrote: > > From: Daniel P. Berrangé > > > > hw/usb/hcd-xhci.c: In function ‘usb_xhci_realize’: > > hw/usb/hcd-xhci.c:3339:66: warning: ‘%d’ directive output may be truncated > >

Re: [PATCH-for-5.2? v3 3/9] hw/usb: reorder fields in UASStatus

2021-01-18 Thread Philippe Mathieu-Daudé
On 11/19/20 5:16 PM, Daniele Buono wrote: > Hi Philippe, > > On 11/6/2020 9:28 AM, Philippe Mathieu-Daudé wrote: >> On 11/5/20 11:18 PM, Daniele Buono wrote: >>> The UASStatus data structure has a variable sized field inside of >>> type uas_iu, >>> that however is not placed at the end of the data

Re: [Qemu-devel] [PULL 7/7] hw/usb: avoid format truncation warning when formatting port name

2021-01-18 Thread Philippe Mathieu-Daudé
On 1/18/21 12:35 PM, Daniel P. Berrangé wrote: > On Mon, Jan 18, 2021 at 12:31:07PM +0100, Philippe Mathieu-Daudé wrote: >> Hello, >> >> On 5/3/19 8:59 AM, Gerd Hoffmann wrote: >>> From: Daniel P. Berrangé >>> >>> hw/usb/hcd-xhci.c: In function ‘usb_xhci_realize’: >>> hw/usb/hcd-xhci.c:3339:66: wa

Re: [PATCH v2] ide: atapi: check logical block address and read size (CVE-2020-29443)

2021-01-18 Thread P J P
+-- On Mon, 18 Jan 2021, Paolo Bonzini wrote --+ | Thank you! This looks great. | With the small spacing fix suggested by checkpatch, | Reviewed-by: Paolo Bonzini Thank you. Will send patch v3 with space typo fix. | You may add a small patch on top to clamp s->nb_sectors at (uint64_t)INT_MAX

Re: [RFC PATCH v2 01/20] migration/vmstate: Restrict vmstate_dummy to user-mode

2021-01-18 Thread Dr. David Alan Gilbert
* Philippe Mathieu-Daudé (f4...@amsat.org) wrote: > 'vmstate_dummy' is special and only used for user-mode. Rename > it to something more specific. > It was introduced restricted to user-mode in commit c71c3e99b8 > ("Add a vmstate_dummy struct for CONFIG_USER_ONLY") but this > restriction was late

Re: [PATCH] virtio: move 'use-disabled-flag' property to hw_compat_4_2

2021-01-18 Thread Michael S. Tsirkin
queued, thanks! On Mon, Jan 18, 2021 at 10:19:55AM +0100, Stefano Garzarella wrote: > Ping :-) > > On Fri, Jan 08, 2021 at 06:12:52PM +0100, Stefano Garzarella wrote: > > Commit 9d7bd0826f introduced a new 'use-disabled-flag' property > > set to true by default. > > To allow the migration, we set

[PATCH v3] ide: atapi: check logical block address and read size (CVE-2020-29443)

2021-01-18 Thread P J P
From: Prasad J Pandit While processing ATAPI cmd_read/cmd_read_cd commands, Logical Block Address (LBA) maybe invalid OR closer to the last block, leading to an OOB access issues. Add range check to avoid it. Fixes: CVE-2020-29443 Reported-by: Wenxiang Qian Suggested-by: Paolo Bonzini Reviewed

Re: [PATCH v2] ide: atapi: check logical block address and read size (CVE-2020-29443)

2021-01-18 Thread Paolo Bonzini
On 18/01/21 12:44, P J P wrote: To confirm: * (uint64_t)INT_MAX << 2 is => 8589934588 ~= 8.5G sectors ? Media size would be: 8.5G * 512B(sector) => ~4TB 8.5G * 4096B(sector) => ~32TB * We are limiting IDE media size to ~4TB/~32TB ? s->nb_sectors is in units of 512B, s

Re: [PULL 00/12] riscv-to-apply queue

2021-01-18 Thread Peter Maydell
On Sun, 17 Jan 2021 at 21:54, Alistair Francis wrote: > > The following changes since commit 825a215c003cd028e26c7d19aa5049d957345f43: > > Merge remote-tracking branch > 'remotes/kraxel/tags/audio-20210115-pull-request' into staging (2021-01-15 > 22:21:21 +) > > are available in the Git re

Re: [RFC PATCH v2 15/20] hw/nubus/mac-nubus-bridge: Mark the device with no migratable fields

2021-01-18 Thread Laurent Vivier
Le 17/01/2021 à 20:24, Philippe Mathieu-Daudé a écrit : > This device doesn't have fields to migrate. Be explicit > by using vmstate_qdev_no_state_to_migrate. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/nubus/mac-nubus-bridge.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/h

Re: [PULL 00/30] testing, gdbstub and semihosting

2021-01-18 Thread Alex Bennée
Peter Maydell writes: > On Fri, 15 Jan 2021 at 13:08, Alex Bennée wrote: >> >> The following changes since commit 7c79721606be11b5bc556449e5bcbc331ef6867d: >> >> Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210113' >> into staging (2021-01-14 09:54:29 +) >> >> are av

Re: [PATCH v5 02/10] iotests/297: Rewrite in Python and extend reach

2021-01-18 Thread Vladimir Sementsov-Ogievskiy
18.01.2021 13:57, Max Reitz wrote: Instead of checking iotests.py only, check all Python files in the qemu-iotests/ directory. Of course, most of them do not pass, so there is an extensive skip list for now. (The only files that do pass are 209, 254, 283, and iotests.py.) (Alternatively, we co

Re: [PATCH v2 01/12] hw/block/nvme: add size to mmio read/write trace events

2021-01-18 Thread Minwoo Im
Reviewed-by: Minwoo Im

Re: [PATCH v2] ide: atapi: check logical block address and read size (CVE-2020-29443)

2021-01-18 Thread P J P
+-- On Mon, 18 Jan 2021, Paolo Bonzini wrote --+ | s->nb_sectors is in units of 512B, so the limit would be 4TB. The purpose | is to limit the lba and nb_sectors arguments (which are in 2048B units) of | ide_atapi_cmd_read_{dma,pio} to INT_MAX. * If it's for IDE_CD type, does the patch below lo

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-01-18 Thread Bin Meng
Hi Francisco, On Mon, Jan 18, 2021 at 6:06 PM Francisco Iglesias wrote: > > Hi Bin, > > On [2021 Jan 15] Fri 22:38:18, Bin Meng wrote: > > Hi Francisco, > > > > On Fri, Jan 15, 2021 at 8:26 PM Francisco Iglesias > > wrote: > > > > > > Hi Bin, > > > > > > On [2021 Jan 15] Fri 10:07:52, Bin Meng w

[PATCH 2/2] virtio-scsi-test: Test writing to scsi-cd device

2021-01-18 Thread Kevin Wolf
This tests that trying to write to a (read-only) scsi-cd device backed by a read-write image file doesn't crash and results in the correct error. This is a regression test for https://bugs.launchpad.net/bugs/1906693. Signed-off-by: Kevin Wolf --- tests/qtest/virtio-scsi-test.c | 39

[PATCH 0/2] block: Fix crash on write to read-only devices

2021-01-18 Thread Kevin Wolf
Kevin Wolf (2): block: Separate blk_is_writable() and blk_supports_write_perm() virtio-scsi-test: Test writing to scsi-cd device include/sysemu/block-backend.h | 3 ++- block/block-backend.c | 19 ++--- hw/block/dataplane/xen-block.c | 2 +- hw/block/fdc.c

[PATCH 1/2] block: Separate blk_is_writable() and blk_supports_write_perm()

2021-01-18 Thread Kevin Wolf
Currently, blk_is_read_only() tells whether a given BlockBackend can only be used in read-only mode because its root node is read-only. Some callers actually try to answer a slightly different question: Is the BlockBackend configured to be writable, by taking write permissions on the root node? Th

Re: [PATCH v2 3/3] fuzz: add virtio-9p configurations for fuzzing

2021-01-18 Thread qemu_oss--- via
On Montag, 18. Januar 2021 00:09:24 CET Alexander Bulekov wrote: > virtio-9p devices are often used to expose a virtual-filesystem to the > guest. There have been some bugs reported in this device, such as > CVE-2018-19364, and CVE-2021-20181. We should fuzz this device > > This patch adds two vir

Re: [PATCH v2 02/12] hw/block/nvme: fix 64 bit register hi/lo split writes

2021-01-18 Thread Minwoo Im
On 21-01-18 10:46:55, Klaus Jensen wrote: > From: Klaus Jensen > > 64 bit registers like ASQ and ACQ should be writable by both a hi/lo 32 > bit write combination as well as a plain 64 bit write. The spec does not > define ordering on the hi/lo split, but the code currently assumes that > the low

  1   2   3   4   >