Re: [Qemu-devel] [PATCH v2] vl.c: print error message if load fw_cfg file failed

2018-10-08 Thread Li Qiang
Hello Philippe, Philippe Mathieu-Daudé 于2018年10月9日周二 下午1:52写道: > Hi Li, > > On 09/10/2018 04:39, Li Qiang wrote: > > It makes sense to print the error message while reading > > file failed. > > OK > > > > > Change since v1: > > free error > > Changes are useful for reviewer, but not in the git

[Qemu-devel] [PATCH] i386: pc_sysfw: load bios using rom API

2018-10-08 Thread Li Qiang
As the bios is a ROM, just using rom API. AFAICS no functionality changed. Signed-off-by: Li Qiang --- hw/i386/pc_sysfw.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index 091e22dd60..7f469fd582 100644 ---

Re: [Qemu-devel] [PATCH v2] vl.c: print error message if load fw_cfg file failed

2018-10-08 Thread Philippe Mathieu-Daudé
Hi Li, On 09/10/2018 04:39, Li Qiang wrote: > It makes sense to print the error message while reading > file failed. OK > > Change since v1: > free error Changes are useful for reviewer, but not in the git history. You can have them automatically stripped if you place them below the next

[Qemu-devel] [PATCH v2 3/3] Travis support for the acceptance tests

2018-10-08 Thread Cleber Rosa
This enables the execution of the acceptance tests on Travis. Because the Travis environment is based on Ubuntu Trusty, it requires the python3-pip. Note: while another supposedely required component on newer versions (such as on Bionic) split the Python 3 installation further on the

[Qemu-devel] [PATCH v2 2/3] Acceptance tests: add make rule for running them

2018-10-08 Thread Cleber Rosa
The acceptance (aka functional, aka Avocado-based) tests are Python files located in "tests/acceptance" that need to be run with the Avocado libs and test runner. Let's provide a convenient way for QEMU developers to run them, by making use of the tests-venv with the required setup. Also, while

[Qemu-devel] [PATCH v2 0/3] Bootstrap Python venv and acceptance/functional tests

2018-10-08 Thread Cleber Rosa
TL;DR = Allow acceptance tests to be run with `make check-acceptance`. Details === This introduces a Python virtual environment that will be setup within the QEMU build directory, that will contain the exact environment that tests may require. There's one current caveat: it requires

[Qemu-devel] [PATCH v2 1/3] Bootstrap Python venv for tests

2018-10-08 Thread Cleber Rosa
A number of QEMU tests are written in Python, and may benefit from an untainted Python venv. By using make rules, tests that depend on specific Python libs can set that rule as a requiment, along with rules that require the presence or installation of specific libraries. The

Re: [Qemu-devel] [PATCH 09/31] ioapic: Fix error handling in realize()

2018-10-08 Thread Peter Xu
On Mon, Oct 08, 2018 at 07:31:03PM +0200, Markus Armbruster wrote: > Calling error_report() in a function that takes an Error ** argument > is suspicious. ioapic_realize() does that, and then exit()s. > Currently mostly harmless, as the device cannot be hot-plugged. > > Fixes:

[Qemu-devel] [PATCH v2] vl.c: print error message if load fw_cfg file failed

2018-10-08 Thread Li Qiang
It makes sense to print the error message while reading file failed. Change since v1: free error Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daud?? --- vl.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 4e25c78..69fc77c 100644 --- a/vl.c

Re: [Qemu-devel] [PATCH] util: aio-posix: fix a typo

2018-10-08 Thread Fam Zheng
On Sun, 10/07 19:16, Li Qiang wrote: > Cc: qemu-triv...@nongnu.org > Signed-off-by: Li Qiang Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 03/31] cpus hw target: Use warn_report() & friends to report warnings

2018-10-08 Thread David Gibson
On Mon, Oct 08, 2018 at 07:30:57PM +0200, Markus Armbruster wrote: > Calling error_report() in a function that takes an Error ** argument > is suspicious. Convert a few that are actually warnings to > warn_report(). > > While there, split a warning consisting of multiple sentences to > conform

Re: [Qemu-devel] [PATCH 01/31] Use error_fatal to simplify obvious fatal errors (again)

2018-10-08 Thread David Gibson
On Mon, Oct 08, 2018 at 07:30:55PM +0200, Markus Armbruster wrote: > Add a slight improvement of the Coccinelle semantic patch from commit > 07d04a0219b, and use it to clean up. It leaves dead Error * variables > behind, cleaned up manually. > > Cc: David Gibson > Cc: Alexander Graf > Cc: Eric

[Qemu-devel] [Bug 1795527] Re: Malformed audio and video output stuttering after upgrade to QEMU 3.0

2018-10-08 Thread tlloss
UPDATE 2 (STUTTERING ELIMINATED, AUDIO ISSUES _STILL_ PRESENT) I think I've tracked down the source of the stuttering that affected my machine, and it doesn't seem to be QEMU-related. I'm going to write something about it here anyway, waiting to report it to other, more appropriate channels,

[Qemu-devel] [RFC v2 5/5] cputlb: dynamically resize TLBs based on use rate

2018-10-08 Thread Emilio G. Cota
Perform the resizing only on flushes, otherwise we'd have to take a perf hit by either rehashing the array or unnecessarily flushing it. We grow the array aggressively, and reduce the size more slowly. This accommodates mixed workloads, where some processes might be memory-heavy while others are

[Qemu-devel] [RFC v2 1/5] tcg: Add tlb_index and tlb_entry helpers

2018-10-08 Thread Emilio G. Cota
From: Richard Henderson Isolate the computation of an index from an address into a helper before we change that function. Signed-off-by: Richard Henderson [ cota: convert tlb_vaddr_to_host; use atomic_read on addr_write ] Signed-off-by: Emilio G. Cota --- accel/tcg/softmmu_template.h |

[Qemu-devel] [RFC v2 0/5] Dynamic TLB sizing

2018-10-08 Thread Emilio G. Cota
v1: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg01146.html Changes since v1: - Add tlb_index and tlb_entry helpers from Richard - Introduce sizeof_tlb() and tlb_n_entries() - Extract tlb_mask as its own array in CPUArchState, as suggested by Richard. For the associated helpers

[Qemu-devel] [RFC v2 3/5] cputlb: do not evict empty entries to the vtlb

2018-10-08 Thread Emilio G. Cota
Currently we evict an entry to the victim TLB when it doesn't match the current address. But it could be that there's no match because the current entry is empty (i.e. all -1's, for instance via tlb_flush). Do not evict the entry to the vtlb in that case. This change will help us keep track of

[Qemu-devel] [RFC v2 4/5] cputlb: track TLB use rate

2018-10-08 Thread Emilio G. Cota
This paves the way for implementing a dynamically-sized softmmu. Signed-off-by: Emilio G. Cota --- include/exec/cpu-defs.h | 5 + accel/tcg/cputlb.c | 17 ++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/include/exec/cpu-defs.h

[Qemu-devel] [RFC v2 2/5] (XXX) cputlb: introduce indirection for TLB size

2018-10-08 Thread Emilio G. Cota
This paves the way for implementing dynamic TLB resizing. XXX: convert other TCG backends Signed-off-by: Emilio G. Cota --- include/exec/cpu-defs.h | 10 ++ include/exec/cpu_ldst.h | 14 +- accel/tcg/cputlb.c| 18 +++--- tcg/i386/tcg-target.inc.c |

Re: [Qemu-devel] [PATCH v2 7/7] block/qcow2-refcount: fix out-of-file L2 entries to be read-as-zero

2018-10-08 Thread Vladimir Sementsov-Ogievskiy
On 10/09/2018 01:21 AM, Max Reitz wrote: > On 09.10.18 00:14, Vladimir Sementsov-Ogievskiy wrote: >> >> >> On 10/09/2018 01:08 AM, Max Reitz wrote: >>> On 09.10.18 00:02, Vladimir Sementsov-Ogievskiy wrote: On 10/08/2018 11:51 PM, Max Reitz wrote: > On 17.08.18 14:22, Vladimir

Re: [Qemu-devel] [PATCH v1 11/12] hw/arm: versal: Add a model of Xilinx Versal SoC

2018-10-08 Thread Edgar E. Iglesias
On Mon, Oct 08, 2018 at 02:19:09PM +0100, Peter Maydell wrote: > On 3 October 2018 at 16:07, Edgar E. Iglesias > wrote: > > From: "Edgar E. Iglesias" > > > > Add a model of Xilinx Versal SoC. > > > > Signed-off-by: Edgar E. Iglesias > > --- > > default-configs/aarch64-softmmu.mak | 1 + > >

Re: [Qemu-devel] [PATCH v2 7/7] block/qcow2-refcount: fix out-of-file L2 entries to be read-as-zero

2018-10-08 Thread Max Reitz
On 09.10.18 00:14, Vladimir Sementsov-Ogievskiy wrote: > > > On 10/09/2018 01:08 AM, Max Reitz wrote: >> On 09.10.18 00:02, Vladimir Sementsov-Ogievskiy wrote: >>> >>> >>> On 10/08/2018 11:51 PM, Max Reitz wrote: On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: > Rewrite corrupted

[Qemu-devel] possible BUG, ATS12NSOPW fails

2018-10-08 Thread Stefano Stabellini
Hi Peter, I am chasing an address translation error, and it looks like it might be a QEMU bug, because I cannot reproduce the problem on a physical board. The issue is that a requested ATS12NSOPW translation in Xen is reported as failing by QEMU, but actually the address is correct. The workflow

Re: [Qemu-devel] [PATCH v2 7/7] block/qcow2-refcount: fix out-of-file L2 entries to be read-as-zero

2018-10-08 Thread Vladimir Sementsov-Ogievskiy
On 10/09/2018 01:08 AM, Max Reitz wrote: > On 09.10.18 00:02, Vladimir Sementsov-Ogievskiy wrote: >> >> >> On 10/08/2018 11:51 PM, Max Reitz wrote: >>> On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: Rewrite corrupted L2 table entry, which reference space out of underlying file.

Re: [Qemu-devel] [PATCH v2 7/7] block/qcow2-refcount: fix out-of-file L2 entries to be read-as-zero

2018-10-08 Thread Max Reitz
On 09.10.18 00:02, Vladimir Sementsov-Ogievskiy wrote: > > > On 10/08/2018 11:51 PM, Max Reitz wrote: >> On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: >>> Rewrite corrupted L2 table entry, which reference space out of >>> underlying file. >>> >>> Make this L2 table entry

Re: [Qemu-devel] [PATCH v2 04/12] qemu-option: improve qemu_opts_print_help() output

2018-10-08 Thread Max Reitz
First of all, this patch broke iotest 082. But then again, all that'd be needed is a correction of the reference output. However: On 07.09.18 09:59, Marc-André Lureau wrote: > Modify qemu_opts_print_help(): > - to print expected argument type > - skip description if not available > - sort lines

Re: [Qemu-devel] [PATCH v2 7/7] block/qcow2-refcount: fix out-of-file L2 entries to be read-as-zero

2018-10-08 Thread Vladimir Sementsov-Ogievskiy
On 10/08/2018 11:51 PM, Max Reitz wrote: > On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: >> Rewrite corrupted L2 table entry, which reference space out of >> underlying file. >> >> Make this L2 table entry read-as-all-zeros without any allocation. >> >> Signed-off-by: Vladimir

[Qemu-devel] [Bug 1796754] Re: ioctl SIOCGIFCONF causes qemu-aarch64-static to crash with "received signal outside vCPU context"

2018-10-08 Thread Ke Liu
I was hit by this issue when I tried to run some Java program. And it turns out jdk sets the buf to NULL: http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/887e525597f8/src/solaris/native/java/net/NetworkInterface.c#l1042 Setting to NULL is valid according to http://man7.org/linux/man-

Re: [Qemu-devel] [PATCH] qemu-system-hppa: Raise exception 26 on emulated hardware

2018-10-08 Thread Richard Henderson
On 10/7/18 1:51 PM, Helge Deller wrote: > On PCXS chips (PA7000, pa 1.1a), trap #18 is raised on memory faults, > while all later chips (>= PA7100) generate either trap #26, #27 or #28 > (depending on the fault type). > > Since the current qemu emulation emulates a B160L machine (with a >

[Qemu-devel] [PATCH v3 03/10] target/arm: Convert v8 extensions from feature bits to isar tests

2018-10-08 Thread Richard Henderson
Most of the v8 extensions are self-contained within the ISAR registers and are not implied by other feature bits, which makes them the easiest to convert. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.h | 123

[Qemu-devel] [PATCH v3 00/10] target/arm: Rely on id regs instead of features

2018-10-08 Thread Richard Henderson
This edition fixes a number of conflicts with master, and adds a few field definitions from ARMv8.5, courtesy of Philippe. It also fixes a big think-o in a last-minute change to the sve system mode patch set that was applied to master today. That would be patch 1. Sorry for not testing the

[Qemu-devel] [PATCH v3 01/10] target/arm: Fix aarch64_sve_change_el wrt EL0

2018-10-08 Thread Richard Henderson
At present we assert: arm_el_is_aa64: Assertion `el >= 1 && el <= 3' failed. The comment in arm_el_is_aa64 explains why asking about EL0 without extra information is impossible. Add an extra argument to provide it from the surrounding context. Fixes: 0ab5953b00b3 Signed-off-by: Richard

[Qemu-devel] [PATCH v3 02/10] target/arm: Define fields of ISAR registers

2018-10-08 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.h | 88 1 file changed, 88 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 54362ddce8..f00c0444c4 100644 --- a/target/arm/cpu.h +++

Re: [Qemu-devel] [PATCH v1 10/12] target/arm: Add the Cortex-A72

2018-10-08 Thread Edgar E. Iglesias
On Mon, Oct 08, 2018 at 02:10:29PM +0100, Peter Maydell wrote: > On 3 October 2018 at 16:07, Edgar E. Iglesias > wrote: > > From: "Edgar E. Iglesias" > > > > Add the ARM Cortex-A72. > > > > Signed-off-by: Edgar E. Iglesias > > --- > > target/arm/cpu64.c | 59 > >

[Qemu-devel] [PATCH v3 05/10] target/arm: Fix cortex-a7 id_isar0

2018-10-08 Thread Richard Henderson
The incorrect value advertised only thumb2 div without arm div. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index ac46641541..83a6cb535f

[Qemu-devel] [PATCH v3 07/10] target/arm: Convert jazelle from feature bit to isar1 test

2018-10-08 Thread Richard Henderson
Having V6 alone imply jazelle was wrong for cortex-m0. Change to an assertion for V6 & !M. This was harmless, because the only place we tested ARM_FEATURE_JAZELLE was for 'bxj' in disas_arm(), which is unreachable for M-profile cores. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard

[Qemu-devel] [PATCH v3 04/10] target/arm: Align cortex-r5 id_isar0

2018-10-08 Thread Richard Henderson
The missing nibble made it more difficult to read. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index b7d9942aa3..ac46641541 100644 ---

[Qemu-devel] [PATCH v3 06/10] target/arm: Convert division from feature bits to isar0 tests

2018-10-08 Thread Richard Henderson
Both arm and thumb2 division are controlled by the same ISAR field, which takes care of the arm implies thumb case. Having M imply thumb2 division was wrong for cortex-m0, which is v6m and does not have thumb2 at all, much less thumb2 division. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by:

[Qemu-devel] [PATCH v3 09/10] target/arm: Convert sve from feature bit to aa64pfr0 test

2018-10-08 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.h| 16 +++- target/arm/translate-a64.h | 1 + linux-user/aarch64/signal.c | 4 ++-- linux-user/elfload.c| 2 +- linux-user/syscall.c| 10 ++

[Qemu-devel] [PATCH v3 08/10] target/arm: Convert t32ee from feature bit to isar3 test

2018-10-08 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.h | 6 +- linux-user/elfload.c | 2 +- target/arm/cpu.c | 4 target/arm/helper.c | 2 +- target/arm/machine.c | 3 +-- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git

[Qemu-devel] [PATCH v3 10/10] target/arm: Convert v8.2-fp16 from feature bit to aa64pfr0 test

2018-10-08 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.h | 17 +++- target/arm/translate-a64.h | 1 + target/arm/translate.h | 1 + linux-user/elfload.c | 6 +- target/arm/cpu64.c | 9 ++--- target/arm/helper.c

Re: [Qemu-devel] [PATCH 30/31] blockdev: Convert drive_new() to Error

2018-10-08 Thread Max Reitz
On 08.10.18 19:31, Markus Armbruster wrote: > Calling error_report() from within a a function that takes an Error ** > argument is suspicious. drive_new() does that, and its caller > drive_init_func() then exit()s. I'm afraid I don't quite follow you here. There is no function here that takes

Re: [Qemu-devel] [PATCH 29/31] vl: Assert drive_new() does not fail in default_drive()

2018-10-08 Thread Max Reitz
On 08.10.18 19:31, Markus Armbruster wrote: > If creating (empty) default drives fails, it's a bug. Therefore, > assert() is more appropriate than exit(1). > > Cc: Kevin Wolf > Cc: Max Reitz > Signed-off-by: Markus Armbruster > --- > vl.c | 4 +--- > 1 file changed, 1 insertion(+), 3

Re: [Qemu-devel] [PATCH v2 7/7] block/qcow2-refcount: fix out-of-file L2 entries to be read-as-zero

2018-10-08 Thread Max Reitz
On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: > Rewrite corrupted L2 table entry, which reference space out of > underlying file. > > Make this L2 table entry read-as-all-zeros without any allocation. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-refcount.c | 32

Re: [Qemu-devel] [PATCH 30/31] blockdev: Convert drive_new() to Error

2018-10-08 Thread Eric Blake
On 10/8/18 12:31 PM, Markus Armbruster wrote: Calling error_report() from within a a function that takes an Error ** s/a a/a/ argument is suspicious. drive_new() does that, and its caller drive_init_func() then exit()s. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean

Re: [Qemu-devel] [PATCH 29/31] vl: Assert drive_new() does not fail in default_drive()

2018-10-08 Thread Eric Blake
On 10/8/18 12:31 PM, Markus Armbruster wrote: If creating (empty) default drives fails, it's a bug. Therefore, assert() is more appropriate than exit(1). Cc: Kevin Wolf Cc: Max Reitz Signed-off-by: Markus Armbruster --- vl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) The

Re: [Qemu-devel] [PATCH 28/31] fsdev: Clean up error reporting in qemu_fsdev_add()

2018-10-08 Thread Eric Blake
On 10/8/18 12:31 PM, Markus Armbruster wrote: Calling error_report() from within a a function that takes an Error ** s/a a/a/ argument is suspicious. qemu_fsdev_add() does that, and its caller fsdev_init_func() then fails without setting an error. Its caller main(), via

Re: [Qemu-devel] [PATCH v2 2/7] block/qcow2-refcount: avoid eating RAM

2018-10-08 Thread Max Reitz
On 08.10.18 22:22, Vladimir Sementsov-Ogievskiy wrote: > > > On 10/08/2018 06:31 PM, Max Reitz wrote: >> On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: >>> qcow2_inc_refcounts_imrt() (through realloc_refcount_array()) can eat >>> an unpredictable amount of memory on corrupted table

Re: [Qemu-devel] [PATCH 18/31] qom: Clean up error reporting in user_creatable_add_opts_foreach()

2018-10-08 Thread Eric Blake
On 10/8/18 12:31 PM, Markus Armbruster wrote: Calling error_report() in a function that takes an Error ** argument is suspicious. user_creatable_add_opts_foreach() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up

Re: [Qemu-devel] [PATCH 02/31] block: Use warn_report() & friends to report warnings

2018-10-08 Thread Eric Blake
On 10/8/18 12:30 PM, Markus Armbruster wrote: Calling error_report() in a function that takes an Error ** argument is suspicious. Convert a few that are actually warnings to warn_report(). While there, split warnings consisting of multiple sentences to conform to conventions spelled out in

Re: [Qemu-devel] [PATCH 01/31] Use error_fatal to simplify obvious fatal errors (again)

2018-10-08 Thread Eric Blake
On 10/8/18 12:30 PM, Markus Armbruster wrote: Add a slight improvement of the Coccinelle semantic patch from commit 07d04a0219b, which shares the same commit title, but does not actually have a semantic patch, but rather defers to the even older 007b065. But I'm not too worried about either

Re: [Qemu-devel] [Qemu-block] [PATCH v11 07/31] iotests.py: Add node_info()

2018-10-08 Thread Max Reitz
On 08.10.18 21:59, John Snow wrote: > > > On 10/08/2018 03:57 PM, Max Reitz wrote: >> On 08.10.18 21:34, John Snow wrote: >>> >>> >>> On 10/05/2018 07:39 PM, Max Reitz wrote: This function queries a node; since we cannot do that right now, it executes query-named-block-nodes and

Re: [Qemu-devel] [PATCH v2 2/7] block/qcow2-refcount: avoid eating RAM

2018-10-08 Thread Vladimir Sementsov-Ogievskiy
On 10/08/2018 06:31 PM, Max Reitz wrote: > On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: >> qcow2_inc_refcounts_imrt() (through realloc_refcount_array()) can eat >> an unpredictable amount of memory on corrupted table entries, which are >> referencing regions far beyond the end of file.

Re: [Qemu-devel] [PATCH] migration: invalidate cache before source start

2018-10-08 Thread John Snow
On 10/08/2018 11:36 AM, Vladimir Sementsov-Ogievskiy wrote: > 26.06.2018 11:44, Vladimir Sementsov-Ogievskiy wrote: >> 25.06.2018 20:50, Dr. David Alan Gilbert wrote: >>> * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: * Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote:

Re: [Qemu-devel] [PATCH v2 2/7] block/qcow2-refcount: avoid eating RAM

2018-10-08 Thread Vladimir Sementsov-Ogievskiy
On 10/08/2018 06:31 PM, Max Reitz wrote: > On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: >> qcow2_inc_refcounts_imrt() (through realloc_refcount_array()) can eat >> an unpredictable amount of memory on corrupted table entries, which are >> referencing regions far beyond the end of file.

Re: [Qemu-devel] [RFC 2/6] cputlb: do not evict invalid entries to the vtlb

2018-10-08 Thread Emilio G. Cota
On Mon, Oct 08, 2018 at 12:46:26 -0700, Richard Henderson wrote: > On 10/8/18 7:42 AM, Emilio G. Cota wrote: > > On Sun, Oct 07, 2018 at 19:09:01 -0700, Richard Henderson wrote: > >> On 10/6/18 2:45 PM, Emilio G. Cota wrote: > >>> Currently we evict an entry to the victim TLB when it doesn't match

Re: [Qemu-devel] [PATCH v2 1/2] MAINTAINERS: Replace myself with John Snow for block jobs

2018-10-08 Thread John Snow
On 09/26/2018 02:05 PM, Jeff Cody wrote: > I'll not be involved with day-to-day qemu development, and John > Snow is a block jobs wizard. Have him take over block job > maintainership duties. > ... I didn't realize he wrote it like this, and I am told I should accept compliments, ... Well,

Re: [Qemu-devel] [PATCH v2 6/7] block/qcow2-refcount: fix out-of-file L1 entries to be zero

2018-10-08 Thread Max Reitz
On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: > Zero out corrupted L1 table entry, which reference L2 table out of > underlying file. > Zero L1 table entry means that "the L2 table and all clusters described > by this L2 table are unallocated." > > Signed-off-by: Vladimir

[Qemu-devel] [Bug 1796754] [NEW] ioctl SIOCGIFCONF causes qemu-aarch64-static to crash with "received signal outside vCPU context"

2018-10-08 Thread Ke Liu
Public bug reported: To reproduce it, compile the attached crash.c under aarch64 to a.out and execute on x86_64 qemu-aarch64-static ./a.out It will print the following and crash: socket=3 qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x60038cd6 qemu:handle_cpu_signal

Re: [Qemu-devel] [Qemu-block] [PATCH v11 07/31] iotests.py: Add node_info()

2018-10-08 Thread Max Reitz
On 08.10.18 21:34, John Snow wrote: > > > On 10/05/2018 07:39 PM, Max Reitz wrote: >> This function queries a node; since we cannot do that right now, it >> executes query-named-block-nodes and returns the matching node's object. >> >> Signed-off-by: Max Reitz >> --- >>

Re: [Qemu-devel] [Qemu-block] [PATCH v11 07/31] iotests.py: Add node_info()

2018-10-08 Thread John Snow
On 10/08/2018 03:57 PM, Max Reitz wrote: > On 08.10.18 21:34, John Snow wrote: >> >> >> On 10/05/2018 07:39 PM, Max Reitz wrote: >>> This function queries a node; since we cannot do that right now, it >>> executes query-named-block-nodes and returns the matching node's object. >>> >>>

Re: [Qemu-devel] [PATCH v1 06/12] net: cadence_gem: Add support for selecting the DMA MemoryRegion

2018-10-08 Thread Edgar E. Iglesias
On Mon, Oct 08, 2018 at 01:30:20PM +0100, Peter Maydell wrote: > On 3 October 2018 at 16:07, Edgar E. Iglesias > wrote: > > From: "Edgar E. Iglesias" > > > > Add support for selecting the Memory Region that the GEM > > will do DMA to. > > > > Signed-off-by: Edgar E. Iglesias > > --- > >

Re: [Qemu-devel] [PATCH v1 09/12] target-arm: powerctl: Enable HVC when starting CPUs to EL2

2018-10-08 Thread Edgar E. Iglesias
On Mon, Oct 08, 2018 at 01:41:36PM +0100, Peter Maydell wrote: > On 3 October 2018 at 16:07, Edgar E. Iglesias > wrote: > > From: "Edgar E. Iglesias" > > > > When QEMU provides the equivalent of the EL3 firmware, we > > need to enable HVCs in scr_el3 when turning on CPUs that > > target EL2. >

Re: [Qemu-devel] [PATCH v1 06/12] net: cadence_gem: Add support for selecting the DMA MemoryRegion

2018-10-08 Thread Edgar E. Iglesias
On Mon, Oct 08, 2018 at 01:24:51PM +0100, Peter Maydell wrote: > On 3 October 2018 at 16:07, Edgar E. Iglesias > wrote: > > From: "Edgar E. Iglesias" > > > > Add support for selecting the Memory Region that the GEM > > will do DMA to. > > > > Signed-off-by: Edgar E. Iglesias > > --- > > > >

Re: [Qemu-devel] [PATCH v2 5/7] block/qcow2-refcount: check_refcounts_l2: split fix_l2_entry_to_zero

2018-10-08 Thread Max Reitz
On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: > Split entry repairing to separate function, to be reused later. > > Note: entry in in-memory l2 table (local variable in > check_refcounts_l2) is not updated after this patch. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- >

Re: [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain

2018-10-08 Thread Eric Blake
On 10/8/18 11:40 AM, Kevin Wolf wrote: Am 08.10.2018 um 17:43 hat Peter Maydell geschrieben: Looking at the backtraces I'm wondering if this is the result of an implicit reliance on the order in which per-thread destructors are called (which is left unspecified by POSIX) -- the destructor

Re: [Qemu-devel] [Qemu-block] [PATCH 05/10] docs/devel/testing.rst: add missing newlines after code block

2018-10-08 Thread John Snow
On 10/04/2018 12:18 PM, Cleber Rosa wrote: > The line immediate following a ".. code::" block is considered > to contains arguments to the "code directive". The lack of a > new line gives me during at parse time: > >testing.rst:63: (ERROR/3) Error in "code" directive: >maximum 1

Re: [Qemu-devel] [RFC 2/6] cputlb: do not evict invalid entries to the vtlb

2018-10-08 Thread Richard Henderson
On 10/8/18 7:42 AM, Emilio G. Cota wrote: > On Sun, Oct 07, 2018 at 19:09:01 -0700, Richard Henderson wrote: >> On 10/6/18 2:45 PM, Emilio G. Cota wrote: >>> Currently we evict an entry to the victim TLB when it doesn't match >>> the current address. But it could be that there's no match because

Re: [Qemu-devel] [Qemu-block] [PATCH 09/10] scripts/qemu.py: use a more consistent docstring style

2018-10-08 Thread John Snow
On 10/04/2018 12:18 PM, Cleber Rosa wrote: > Signed-off-by: Cleber Rosa > --- > dtc | 2 +- > scripts/qemu.py | 65 +++-- > 2 files changed, 42 insertions(+), 25 deletions(-) > > diff --git a/dtc b/dtc > index 88f18909db..e54388015a

Re: [Qemu-devel] [Qemu-block] [PATCH v11 07/31] iotests.py: Add node_info()

2018-10-08 Thread John Snow
On 10/05/2018 07:39 PM, Max Reitz wrote: > This function queries a node; since we cannot do that right now, it > executes query-named-block-nodes and returns the matching node's object. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/iotests.py | 7 +++ > 1 file changed, 7

Re: [Qemu-devel] insecure git submodule URLs

2018-10-08 Thread Eric Blake
On 7/15/18 7:56 PM, Jann Horn via Qemu-devel wrote: On Sun, Jul 15, 2018 at 11:18 PM Peter Maydell wrote: On 15 July 2018 at 20:50, Jann Horn via Qemu-devel wrote: I noticed that when I build QEMU from git for the first time, it pulls in submodules over the insecure git:// protocol - in

Re: [Qemu-devel] [PULL 0/8] softfloat queue

2018-10-08 Thread Eric Blake
Adding Jeff and Stefan On 10/8/18 8:47 AM, Peter Maydell wrote: On 5 October 2018 at 19:01, Richard Henderson wrote: The following changes since commit ae7a4c0a4604bcfed40170db6cca576c44d872a2: Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20181004' into staging (2018-10-05

Re: [Qemu-devel] [PATCH v2 2/2] docs: Document vCPU hotplug procedure

2018-10-08 Thread Eric Blake
On 10/1/18 3:59 AM, Igor Mammedov wrote: Anyway, what about this: The command returns an object with a "qom-path" member for each present CPU. In this case, it shows an IvyBridge-IBRS-x86_64-cpu in socket 0. It returns an object without a "qom-path" for every possibly CPU

Re: [Qemu-devel] [PATCH] sdl2: Support all virtio-gpu formats

2018-10-08 Thread Max Reitz
On 08.10.18 20:50, Max Reitz wrote: > There are some 2D resource formats that can be used through virtio-gpu, > but which are not supported by SDL2 when used for a scanout; these are > all alpha-channel formats and also XBGR (RGBX in non-BE pixman). Oops, it's the other way round. The virtio-gpu

Re: [Qemu-devel] [PATCH 05/31] vfio: Clean up error reporting after previous commit

2018-10-08 Thread Alex Williamson
On Mon, 8 Oct 2018 19:30:59 +0200 Markus Armbruster wrote: > The previous commit changed vfio's warning messages from > > vfio warning: DEV-NAME: Could not frobnicate > > to > > warning: vfio DEV-NAME: Could not frobnicate > > To match this change, change error messages from > >

Re: [Qemu-devel] [PATCH 04/31] vfio: Use warn_report() & friends to report warnings

2018-10-08 Thread Alex Williamson
On Mon, 8 Oct 2018 19:30:58 +0200 Markus Armbruster wrote: > The vfio code reports warnings like > > error_report(WARN_PREFIX "Could not frobnicate", DEV-NAME); > > where WARN_PREFIX is defined so the message comes out as > > vfio warning: DEV-NAME: Could not frobnicate > > This

[Qemu-devel] [PATCH] sdl2: Support all virtio-gpu formats

2018-10-08 Thread Max Reitz
There are some 2D resource formats that can be used through virtio-gpu, but which are not supported by SDL2 when used for a scanout; these are all alpha-channel formats and also XBGR (RGBX in non-BE pixman). Add these formats in the switch converting pixman to SDL format constants so a guest

Re: [Qemu-devel] [PATCH 14/14] block: Stop passing flags to bdrv_reopen_queue_child()

2018-10-08 Thread Max Reitz
On 08.10.18 20:13, Alberto Garcia wrote: > On Mon 08 Oct 2018 04:48:50 AM CEST, Max Reitz wrote: > >>> +/* Old values are used for options that aren't set yet */ >>> +old_options = qdict_clone_shallow(bs->options); >>> +bdrv_join_options(bs, options, old_options); >>> +

Re: [Qemu-devel] [PATCH] tcg: Add tlb_index and tlb_entry helpers

2018-10-08 Thread Emilio G. Cota
On Sun, Oct 07, 2018 at 18:05:22 -0700, Richard Henderson wrote: > Isolate the computation of an index from an address into a > helper before we change that function. > > Signed-off-by: Richard Henderson > --- > > Emilio, this should make your dynamic tlb sizing patch 1/6 > significantly

[Qemu-devel] [PATCH v1 4/5] RISC-V: Add missing free for plic_hart_config

2018-10-08 Thread Alistair Francis
From: Michael Clark Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: Alistair Francis Signed-off-by: Michael Clark Reviewed-by: Alistair Francis --- hw/riscv/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index

[Qemu-devel] [PATCH v1 2/5] RISC-V: Move non-ops from op_helper to cpu_helper

2018-10-08 Thread Alistair Francis
From: Michael Clark This patch makes op_helper.c contain only instruction operation helpers used by translate.c and moves any unrelated cpu helpers into cpu_helper.c. No logic is changed by this patch. Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: Palmer Dabbelt Cc: Alistair Francis

[Qemu-devel] [PATCH v1 5/5] RISC-V: Don't add NULL bootargs to device-tree

2018-10-08 Thread Alistair Francis
From: Michael Clark Cc: Palmer Dabbelt Cc: Alistair Francis Signed-off-by: Michael Clark Reviewed-by: Alistair Francis --- hw/riscv/sifive_u.c | 4 +++- hw/riscv/spike.c| 6 -- hw/riscv/virt.c | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH v1 3/5] RISC-V: Update CSR and interrupt definitions

2018-10-08 Thread Alistair Francis
From: Michael Clark * Add user-mode CSR defininitions. * Reorder CSR definitions to match the specification. * Change H mode interrupt comment to 'reserved'. * Remove unused X_COP interrupt. * Add user-mode interrupts. * Remove erroneous until comments on machine mode interrupts. * Move together

[Qemu-devel] [PATCH v1 0/5] Misc RISC-V patches

2018-10-08 Thread Alistair Francis
These are some patches that I have cherry picked from Michael's RISC-V tree that are ready to be applied. Unless anyone has any comments against these I'll send a PR later this week. Michael Clark (5): RISC-V: Allow setting and clearing multiple irqs RISC-V: Move non-ops from op_helper to

[Qemu-devel] [PATCH v1 1/5] RISC-V: Allow setting and clearing multiple irqs

2018-10-08 Thread Alistair Francis
From: Michael Clark Change the API of riscv_set_local_interrupt to take a write mask and value to allow setting and clearing of multiple local interrupts atomically in a single call. Rename the new function to riscv_cpu_update_mip. Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: Palmer

Re: [Qemu-devel] [PATCH v2 0/3] HMP/snapshot changes - do not use ID anymore

2018-10-08 Thread Daniel Henrique Barboza
ping On 9/6/18 8:11 AM, Daniel Henrique Barboza wrote: changes in v2: - removed the "RFC" marker; - added a new patch (patch 2) that removes bdrv_snapshot_delete_by_id_or_name from the code; - made changes in patch 1 as suggested by Murilo; - previous patch set link:

Re: [Qemu-devel] [PATCH 14/14] block: Stop passing flags to bdrv_reopen_queue_child()

2018-10-08 Thread Alberto Garcia
On Mon 08 Oct 2018 04:48:50 AM CEST, Max Reitz wrote: >> +/* Old values are used for options that aren't set yet */ >> +old_options = qdict_clone_shallow(bs->options); >> +bdrv_join_options(bs, options, old_options); >> +qobject_unref(old_options); >> + >> +/* We have the

Re: [Qemu-devel] [PATCH v9 0/3] wakeup-from-suspend and system_wakeup changes

2018-10-08 Thread Daniel Henrique Barboza
ping On 9/18/18 3:52 PM, Daniel Henrique Barboza wrote: changes in v9, all proposed by Mike Roth: - added a new 'qemu_register_wakeup_support' to be called by the wake-up implementations to register the support in vl.c (patch 1) - changed versions from 3.0.0 to 3.1.0 (patch 1) - added back

[Qemu-devel] [PATCH v4 4/4] cputlb: read CPUTLBEntry.addr_write atomically

2018-10-08 Thread Emilio G. Cota
Updates can come from other threads, so readers that do not take tlb_lock must use atomic_read to avoid undefined behaviour (UB). This and the previous commit result on average in no performance loss, as the following experiments (run on an Intel i7-6700K CPU @ 4.00GHz) show. 1. aarch64

[Qemu-devel] [PATCH v4 2/4] cputlb: fix assert_cpu_is_self macro

2018-10-08 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/cputlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 502eea2850..f6b388c961 100644 --- a/accel/tcg/cputlb.c +++

[Qemu-devel] [PATCH v4 1/4] exec: introduce tlb_init

2018-10-08 Thread Emilio G. Cota
Paves the way for the addition of a per-TLB lock. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/exec/exec-all.h | 8 accel/tcg/cputlb.c | 4 exec.c | 1 + 3 files changed, 13 insertions(+) diff --git a/include/exec/exec-all.h

[Qemu-devel] [PATCH v4 3/4] cputlb: serialize tlb updates with env->tlb_lock

2018-10-08 Thread Emilio G. Cota
Currently we rely on atomic operations for cross-CPU invalidations. There are two cases that these atomics miss: cross-CPU invalidations can race with either (1) vCPU threads flushing their TLB, which happens via memset, or (2) vCPUs calling tlb_reset_dirty on their TLB, which updates .addr_write

[Qemu-devel] [PATCH v4 0/4] per-TLB lock

2018-10-08 Thread Emilio G. Cota
v3: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg01087.html Changes since v3: - Add R-b's - Add comment to copy_tlb_helper_locked to note that it can only be called from the TLB owner thread. The series is checkpatch-clean. You can fetch it from:

Re: [Qemu-devel] [PATCH 25/31] numa: Clean up error reporting in parse_numa()

2018-10-08 Thread Eduardo Habkost
On Mon, Oct 08, 2018 at 07:31:19PM +0200, Markus Armbruster wrote: > Calling error_report() in a function that takes an Error ** argument > is suspicious. parse_numa() does that, and then fails without setting > an error. Its caller main(), via qemu_opts_foreach(), is fine with > it, but clean

Re: [Qemu-devel] [PATCH 14/31] numa: Fix QMP command set-numa-node error handling

2018-10-08 Thread Eduardo Habkost
On Mon, Oct 08, 2018 at 07:31:08PM +0200, Markus Armbruster wrote: > Calling error_report() in a function that takes an Error ** argument > is suspicious. parse_numa_node() does that, and then exit()s. It > also passes _fatal to machine_set_cpu_numa_node(). Both wrong. > Attempting to configure

[Qemu-devel] [RFC v1 1/1] qemu-iotests: Fix output for testcase 082

2018-10-08 Thread Farhan Ali
Commit 9cbef9d68ee: qemu-option: improve qemu_opts_print_help() output, changed some of the output for qemu-img tool but did not update the corresponding 082 test case file. This broke qemu-iotests. Signed-off-by: Farhan Ali --- tests/qemu-iotests/082.out | 956

Re: [Qemu-devel] [PATCH 08/14] block: Use bdrv_reopen_set_read_only() in external_snapshot_commit()

2018-10-08 Thread Alberto Garcia
On Mon 08 Oct 2018 03:31:08 AM CEST, Max Reitz wrote: > On 19.09.18 16:47, Alberto Garcia wrote: >> This patch replaces the bdrv_reopen() calls that set and remove the >> BDRV_O_RDWR flag with the new bdrv_reopen_set_read_only() function. > > Ha! Got you! It's just one call this time, not

[Qemu-devel] [PATCH 30/31] blockdev: Convert drive_new() to Error

2018-10-08 Thread Markus Armbruster
Calling error_report() from within a a function that takes an Error ** argument is suspicious. drive_new() does that, and its caller drive_init_func() then exit()s. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway: * Convert drive_new() to Error * Update

[Qemu-devel] [PATCH 22/31] vl: Clean up error reporting in parse_fw_cfg()

2018-10-08 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. parse_fw_cfg() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Signed-off-by: Markus Armbruster --- vl.c | 17

[Qemu-devel] [PATCH 07/31] 9pfs: Fix CLI parsing crash on error

2018-10-08 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. 9p-handle.c's handle_parse_opts() does that, and then fails without setting an error. Wrong. Its caller crashes when it tries to report the error: $ qemu-system-x86_64 -nodefaults -fsdev

  1   2   3   >