[PATCH] qmp-shell: Suppress banner and prompt when stdin is not a TTY

2021-01-16 Thread Dov Murik
Detect whether qmp-shell's standard input is not a TTY; in such case, assume a non-interactive mode, which suppresses the welcome banner and the "(QEMU)" prompt. This allows for easier consumption of qmp-shell's output in scripts. Example usage before this change: $ printf "query-status\nque

[Bug 1757363] Re: infinite loop due to improper deal with "eret" on mips32

2021-01-16 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1757363 Title: infinite lo

[Bug 1681688] Re: qemu live migration failed

2021-01-16 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1681688 Title: qemu live m

Re: [PATCH v1 1/1] riscv: Pass RISCVHartArrayState by pointer

2021-01-16 Thread Alistair Francis
On Sat, Jan 16, 2021 at 2:32 PM Philippe Mathieu-Daudé wrote: > > On 1/16/21 12:00 AM, Alistair Francis wrote: > > We were accidently passing RISCVHartArrayState by value instead of > > pointer. The type is 824 bytes long so let's correct that and pass it by > > pointer instead. > > > > Fixes: Cov

Re: [PATCH v1 1/1] riscv: Pass RISCVHartArrayState by pointer

2021-01-16 Thread Philippe Mathieu-Daudé
On 1/16/21 12:00 AM, Alistair Francis wrote: > We were accidently passing RISCVHartArrayState by value instead of > pointer. The type is 824 bytes long so let's correct that and pass it by > pointer instead. > > Fixes: Coverity CID 1438099 > Fixes: Coverity CID 1438100 > Fixes: Coverity CID 143810

Re: Recent TCG commit breaks PPC

2021-01-16 Thread Philippe Mathieu-Daudé
On 1/16/21 8:46 PM, BALATON Zoltan wrote: > On Sat, 16 Jan 2021, Richard Henderson wrote: >> On 1/16/21 4:38 AM, BALATON Zoltan wrote: >>> >>> Commit 8fe35e0444be (tcg/optimize: Use tcg_constant_internal with >>> constant >>> folding) seems to break PPC emulation for me: >>> >>> Thread 3 "qemu-syst

[PATCH v6 14/14] block/qcow2: refactor qcow2_update_options_prepare error paths

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Keep setting ret close to setting errp and don't merge different error paths into one. This way it's more obvious that we don't return error without setting errp. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- block/qcow2.c | 11 --- 1 file changed, 8 insert

[PATCH v6 13/14] block/qed: bdrv_qed_do_open: deal with errp

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Set errp always on failure. Generic bdrv_open_driver supports driver functions which can return negative value and forget to set errp. That's a strange thing.. Let's improve bdrv_qed_do_open to not behave this way. This allows to simplify code in bdrv_qed_co_invalidate_cache(). Signed-off-by: Vlad

[PATCH v6 12/14] block/qcow2: simplify qcow2_co_invalidate_cache()

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
qcow2_do_open correctly sets errp on each failure path. So, we can simplify code in qcow2_co_invalidate_cache() and drop explicit error propagation. Add ERRP_GUARD() as mandated by the documentation in include/qapi/error.h so that error_prepend() is actually called even if errp is &error_fatal. S

[PATCH v6 08/14] block/qcow2: qcow2_get_specific_info(): drop error propagation

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Don't use error propagation in qcow2_get_specific_info(). For this refactor qcow2_get_bitmap_info_list, its current interface is rather weird. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Reviewed-by: Alberto Garcia --- block/qcow2.h| 4 ++-- block/qcow2-bitmap.c

[PATCH v6 11/14] block/qcow2: read_cache_sizes: return status value

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
It's better to return status together with setting errp. It allows to reduce error propagation. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Reviewed-by: Alberto Garcia --- block/qcow2.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --gi

[PATCH v6 07/14] blockjob: return status from block_job_set_speed()

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Better to return status together with setting errp. It allows to avoid error propagation in the caller. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Reviewed-by: Alberto Garcia --- include/block/blockjob.h | 2 +- blockjob.c | 18 -- 2 files

[PATCH v6 10/14] block/qcow2-bitmap: return status from qcow2_store_persistent_dirty_bitmaps

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
It's better to return status together with setting errp. It makes possible to avoid error propagation. While being here, put ERRP_GUARD() to fix error_prepend(errp, ...) usage inside qcow2_store_persistent_dirty_bitmaps() (see the comment above ERRP_GUARD() definition in include/qapi/error.h) Sig

[PATCH v6 00/14] block: deal with errp: part I

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
v6: 01: fix uninitialized ret 02,14: add Alberto's r-b Vladimir Sementsov-Ogievskiy (14): block: return status from bdrv_append and friends block: use return status of bdrv_append() block: check return value of bdrv_open_child and drop error propagation blockdev: fix drive_backup_prepa

[PATCH v6 09/14] block/qcow2-bitmap: improve qcow2_load_dirty_bitmaps() interface

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
It's recommended for bool functions with errp to return true on success and false on failure. Non-standard interfaces don't help to understand the code. The change is also needed to reduce error propagation. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Gre

[PATCH v4 21/23] simplebench/bench_block_job: use correct shebang line with python3

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- scripts/simplebench/bench_block_job.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/simplebench/bench_block_job.py b/scripts/simplebench/bench_block_job.py index 9808d696cf..a0dda1dc4e 100755 -

[PATCH v6 06/14] block/mirror: drop extra error propagation in commit_active_start()

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Let's check return value of mirror_start_job to check for failure instead of local_err. Rename ret to job, as ret is usually integer variable. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Reviewed-by: Alberto Garcia --- block/mirror.c | 12 +--- 1 file changed, 5

[PATCH v4 23/23] simplebench: add bench-backup.py

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Add script to benchmark new backup architecture. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/simplebench/bench-backup.py | 167 1 file changed, 167 insertions(+) create mode 100755 scripts/simplebench/bench-backup.py diff --git a/scripts/simplebench/ben

[PATCH v6 04/14] blockdev: fix drive_backup_prepare() missed error

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
We leak local_err and don't report failure to the caller. It's definitely wrong, let's fix. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Reviewed-by: Alberto Garcia --- blockdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev

[PATCH v4 16/23] block/backup: drop extra gotos from backup_run()

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/backup.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/block/backup.c b/block/backup.c index 5522c0f3fe..466608ee55 100644 --- a/block/backup.c +++ b/block/backup.c @@ -236,7 +236,7 @@

[PATCH v6 03/14] block: check return value of bdrv_open_child and drop error propagation

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
This patch is generated by cocci script: @@ symbol bdrv_open_child, errp, local_err; expression file; @@ file = bdrv_open_child(..., -&local_err +errp ); - if (local_err) + if (!file) { ... - error_propagate(err

[PATCH v6 01/14] block: return status from bdrv_append and friends

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
The recommended use of qemu error api assumes returning status together with setting errp and avoid void functions with errp parameter. Let's improve bdrv_append and some friends to reduce error-propagation overhead in further patches. Choose int return status, because bdrv_replace_node_common() h

[PATCH v4 13/23] iotests: 219: prepare for backup over block-copy

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
The further change of moving backup to be a one block-copy call will make copying chunk-size and cluster-size two separate things. So, even with 64k cluster sized qcow2 image, default chunk would be 1M. Test 219 depends on specified chunk-size. Update it for explicit chunk-size for backup as for mi

[PATCH v4 14/23] iotests: 257: prepare for backup over block-copy

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Iotest 257 dumps a lot of in-progress information of backup job, such as offset and bitmap dirtiness. Further commit will move backup to be one block-copy call, which will introduce async parallel requests instead of plain cluster-by-cluster copying. To keep things deterministic, allow only one wor

[PATCH v6 05/14] block: drop extra error propagation for bdrv_set_backing_hd

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
bdrv_set_backing_hd now returns status, let's use it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Reviewed-by: Alberto Garcia --- block.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index 0951d3b2c1..9483edb500 100644 --- a

[PATCH v4 19/23] block/block-copy: drop unused block_copy_set_progress_callback()

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Drop unused code. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/block-copy.h | 6 -- block/block-copy.c | 15 --- 2 files changed, 21 deletions(-) diff --git a/include/block/block-copy.h b/include/block/block-copy.h index 7821850f

[PATCH v4 17/23] backup: move to block-copy

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
This brings async request handling and block-status driven chunk sizes to backup out of the box, which improves backup performance. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/backup.c | 187 +++-- 1 file changed, 120

[PATCH v4 18/23] qapi: backup: disable copy_range by default

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Further commit will add a benchmark (scripts/simplebench/bench-backup.py), which will show that backup works better with async parallel requests (previous commit) and disabled copy_range. So, let's disable copy_range by default. Note: the option was added several commits ago with default to true,

[PATCH v4 15/23] block/block-copy: make progress_bytes_callback optional

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
We are going to stop use of this callback in the following commit. Still the callback handling code will be dropped in a separate commit. So, for now let's make it optional. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/block-copy.c | 4 +++- 1 file changed, 3 ins

[PATCH v6 02/14] block: use return status of bdrv_append()

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Now bdrv_append returns status and we can drop all the local_err things around it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- block.c | 6 ++ block/backup-top.c | 23 +++ block/commit.c | 6 ++--

[PATCH v4 12/23] iotests: 185: prepare for backup over block-copy

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
The further change of moving backup to be a one block-copy call will make copying chunk-size and cluster-size two separate things. So, even with 64k cluster sized qcow2 image, default chunk would be 1M. 185 test however assumes, that with speed limited to 64K, one iteration would result in offset=6

[PATCH v4 11/23] iotests: 56: prepare for backup over block-copy

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
After introducing parallel async copy requests instead of plain cluster-by-cluster copying loop, we'll have to wait for paused status, as we need to wait for several parallel request. So, let's gently wait instead of just asserting that job already paused. Signed-off-by: Vladimir Sementsov-Ogievsk

[PATCH v4 06/23] block/block-copy: add ratelimit to block-copy

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
We are going to directly use one async block-copy operation for backup job, so we need rate limiter. We want to maintain current backup behavior: only background copying is limited and copy-before-write operations only participate in limit calculation. Therefore we need one rate limiter for block-

[PATCH v4 22/23] simplebench: bench_block_job: add cmd_options argument

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Add argument to allow additional block-job options. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- scripts/simplebench/bench-example.py | 2 +- scripts/simplebench/bench_block_job.py | 11 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/scri

[PATCH v4 08/23] blockjob: add set_speed to BlockJobDriver

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
We are going to use async block-copy call in backup, so we'll need to passthrough setting backup speed to block-copy call. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/blockjob_int.h | 2 ++ blockjob.c | 6 ++ 2 files changed, 8 inse

[PATCH v4 20/23] block/block-copy: drop unused argument of block_copy()

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/block-copy.h | 2 +- block/backup-top.c | 2 +- block/block-copy.c | 10 ++ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/include/block/block-copy.h b/include/block/bl

[PATCH v4 07/23] block/block-copy: add block_copy_cancel

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Add function to cancel running async block-copy call. It will be used in backup. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/block-copy.h | 13 + block/block-copy.c | 24 +++- 2 files changed, 32 insertions(+), 5 d

[PATCH v4 04/23] block/block-copy: add max_chunk and max_workers parameters

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
They will be used for backup. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/block-copy.h | 6 ++ block/block-copy.c | 11 +-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/include/block/block-copy.h b/include/block/bl

[PATCH v4 10/23] qapi: backup: add max-chunk and max-workers to x-perf struct

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Add new parameters to configure future backup features. The patch doesn't introduce aio backup requests (so we actually have only one worker) neither requests larger than one cluster. Still, formally we satisfy these maximums anyway, so add the parameters now, to facilitate further patch which will

[PATCH v4 05/23] block/block-copy: add list of all call-states

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
It simplifies debugging. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/block-copy.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/block/block-copy.c b/block/block-copy.c index 35213bd832..6bf1735b93 100644 --- a/block/block-copy.c

[PATCH v4 09/23] job: call job_enter from job_pause

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
If main job coroutine called job_yield (while some background process is in progress), we should give it a chance to call job_pause_point(). It will be used in backup, when moved on async block-copy. Note, that job_user_pause is not enough: we want to handle child_job_drained_begin() as well, whic

[PATCH v4 03/23] block/block-copy: implement block_copy_async

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
We'll need async block-copy invocation to use in backup directly. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/block-copy.h | 29 ++ block/block-copy.c | 81 -- 2 files changed, 106 insertions(+), 4

[PATCH v4 02/23] block/block-copy: More explicit call_state

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Refactor common path to use BlockCopyCallState pointer as parameter, to prepare it for use in asynchronous block-copy (at least, we'll need to run block-copy in a coroutine, passing the whole parameters as one pointer). Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- bloc

[PATCH v4 01/23] qapi: backup: add perf.use-copy-range parameter

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Experiments show, that copy_range is not always making things faster. So, to make experimentation simpler, let's add a parameter. Some more perf parameters will be added soon, so here is a new struct. For now, add new backup qmp parameter with x- prefix for the following reasons: - We are going

[PATCH v4 00/23] backup performance: block_status + async

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Hi Max! I applied my series onto yours 129-fixing and found, that 129 fails for backup. And setting small max-chunk and even max-workers to 1 doesn't help! (setting speed like in v3 still helps). And I found, that the problem is that really, the whole backup job goes during drain, because in new a

Re: [PATCH v3 13/25] iotests: 129: prepare for backup over block-copy

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
12.01.2021 15:14, Max Reitz wrote: On 26.10.20 18:18, Vladimir Sementsov-Ogievskiy wrote: After introducing parallel async copy requests instead of plain cluster-by-cluster copying loop, backup job may finish earlier than final assertion in do_test_stop. Let's require slow backup explicitly by s

Re: Recent TCG commit breaks PPC

2021-01-16 Thread BALATON Zoltan
On Sat, 16 Jan 2021, BALATON Zoltan wrote: On Sat, 16 Jan 2021, Richard Henderson wrote: On 1/16/21 4:38 AM, BALATON Zoltan wrote: Commit 8fe35e0444be (tcg/optimize: Use tcg_constant_internal with constant folding) seems to break PPC emulation for me: See also: https://bugs.launchpad.net/qe

Re: [Bug 1912065] [NEW] Segfaults in tcg/optimize.c:212 after commit 7c79721606be11b5bc556449e5bcbc331ef6867d

2021-01-16 Thread BALATON Zoltan
Thanks for reporting it. Just found it as well and reported on the mailing list. It's currently being investigated. List thread is here: https://lists.nongnu.org/archive/html/qemu-devel/2021-01/msg03936.html

Re: Recent TCG commit breaks PPC

2021-01-16 Thread BALATON Zoltan
On Sat, 16 Jan 2021, Richard Henderson wrote: On 1/16/21 4:38 AM, BALATON Zoltan wrote: Commit 8fe35e0444be (tcg/optimize: Use tcg_constant_internal with constant folding) seems to break PPC emulation for me: Thread 3 "qemu-system-ppc" received signal SIGSEGV, Segmentation fault. [Switching to

Re: Recent TCG commit breaks PPC

2021-01-16 Thread BALATON Zoltan
On Sat, 16 Jan 2021, Richard Henderson wrote: On 1/16/21 4:38 AM, BALATON Zoltan wrote: Commit 8fe35e0444be (tcg/optimize: Use tcg_constant_internal with constant folding) seems to break PPC emulation for me: Thread 3 "qemu-system-ppc" received signal SIGSEGV, Segmentation fault. [Switching to

[Bug 1906193] Re: riscv32 user mode emulation: fork return values broken

2021-01-16 Thread Andreas K . Hüttel
Done (took a while to figure out how...) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1906193 Title: riscv32 user mode emulation: fork return values broken Status in QEMU: Confirmed Bug descri

Re: [PATCH v1 1/1] linux-user/signal: Decode waitid si_code

2021-01-16 Thread Andreas K . Hüttel
Am Samstag, 19. Dezember 2020, 20:11:13 EET schrieb Alistair Francis: > When mapping the host waitid status to the target status we previously > just used decoding information in the status value. This doesn't follow > what the waitid documentation describes, which instead suggests using > the si_c

Re: [PATCH v1 1/1] riscv: Pass RISCVHartArrayState by pointer

2021-01-16 Thread Alistair Francis
On Fri, Jan 15, 2021 at 3:00 PM Alistair Francis wrote: > > We were accidently passing RISCVHartArrayState by value instead of > pointer. The type is 824 bytes long so let's correct that and pass it by > pointer instead. > > Fixes: Coverity CID 1438099 > Fixes: Coverity CID 1438100 > Fixes: Coveri

Re: [PATCH v2 2/2] target/riscv: Remove built-in GDB XML files for CSRs

2021-01-16 Thread Alistair Francis
On Fri, Jan 15, 2021 at 9:42 PM Bin Meng wrote: > > From: Bin Meng > > Now that we have switched to generate the RISC-V CSR XML dynamically, > remove the built-in hardcoded XML files. > > Signed-off-by: Bin Meng > Reviewed-by: Alistair Francis Thanks! Applied to riscv-to-apply.next Alistair

[PATCH] target/mips: fetch code with translator_ld

2021-01-16 Thread Philippe Mathieu-Daudé
Similarly to commits ae82adc8e29..7f93879e444, use the translator_ld*() API introduced in commit 409c1a0bf0f to fetch the code on the MIPS target. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tlb_helper.c | 16 target/mips/translate.c | 20 ++-- 2 files

Re: [PATCH v1 1/1] riscv: Pass RISCVHartArrayState by pointer

2021-01-16 Thread Alistair Francis
On Sat, Jan 16, 2021 at 8:30 AM Bin Meng wrote: > > On Sat, Jan 16, 2021 at 7:00 AM Alistair Francis > wrote: > > > > We were accidently passing RISCVHartArrayState by value instead of > > pointer. The type is 824 bytes long so let's correct that and pass it by > > pointer instead. > > > > Fixes:

Re: Recent TCG commit breaks PPC

2021-01-16 Thread Alistair Francis
On Sat, Jan 16, 2021 at 9:29 AM Richard Henderson wrote: > > On 1/16/21 4:38 AM, BALATON Zoltan wrote: > > > > Commit 8fe35e0444be (tcg/optimize: Use tcg_constant_internal with constant > > folding) seems to break PPC emulation for me: > > > > Thread 3 "qemu-system-ppc" received signal SIGSEGV, Se

[Bug 1912065] [NEW] Segfaults in tcg/optimize.c:212 after commit 7c79721606be11b5bc556449e5bcbc331ef6867d

2021-01-16 Thread Harry Sintonen
Public bug reported: QEMU segfaults to NULL dereference in tcg/optimize.c:212 semi-randomly after commit 7c79721606be11b5bc556449e5bcbc331ef6867d Exception Type:EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0020 Exception Note:EXC_CORPSE_NOT

Re: [PATCH v5 14/14] block/qcow2: refactor qcow2_update_options_prepare error paths

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
12.01.2021 00:17, Vladimir Sementsov-Ogievskiy wrote: 11.01.2021 19:08, Alberto Garcia wrote: On Sat 09 Jan 2021 01:58:11 PM CET, Vladimir Sementsov-Ogievskiy wrote: Keep setting ret close to setting errp and don't merge different error paths into one. This way it's more obvious that we don't r

Re: Recent TCG commit breaks PPC

2021-01-16 Thread Richard Henderson
On 1/16/21 4:38 AM, BALATON Zoltan wrote: > > Commit 8fe35e0444be (tcg/optimize: Use tcg_constant_internal with constant > folding) seems to break PPC emulation for me: > > Thread 3 "qemu-system-ppc" received signal SIGSEGV, Segmentation fault. > [Switching to Thread 0x751e7700 (LWP 22636)] >

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-01-16 Thread Richard Henderson
On 1/15/21 1:03 PM, Alistair Francis wrote: > I run QEMU with these arguments: > > ./build/riscv32-softmmu/qemu-system-riscv32 \ > -machine virt -serial mon:stdio -serial null -nographic \ > -append "root=/dev/vda rw highres=off console=ttyS0 ip=dhcp > earlycon=sbi" \ > -device virti

Re: Recent TCG commit breaks PPC

2021-01-16 Thread Richard Henderson
On 1/16/21 4:38 AM, BALATON Zoltan wrote: > Hello, > > Commit 8fe35e0444be (tcg/optimize: Use tcg_constant_internal with constant > folding) seems to break PPC emulation for me: > > Thread 3 "qemu-system-ppc" received signal SIGSEGV, Segmentation fault. > [Switching to Thread 0x751e7700 (LWP

Re: [PATCH v1 1/1] riscv: Pass RISCVHartArrayState by pointer

2021-01-16 Thread Bin Meng
On Sat, Jan 16, 2021 at 7:00 AM Alistair Francis wrote: > > We were accidently passing RISCVHartArrayState by value instead of > pointer. The type is 824 bytes long so let's correct that and pass it by > pointer instead. > > Fixes: Coverity CID 1438099 > Fixes: Coverity CID 1438100 > Fixes: Coveri

Re: [PATCH v3 08/21] bsd-user: Tidy VERIFY_READ/VERIFY_WRITE

2021-01-16 Thread Warner Losh
On Fri, Jan 15, 2021 at 3:56 PM Richard Henderson < richard.hender...@linaro.org> wrote: > These constants are only ever used with access_ok, and friends. > Rather than translating them to PAGE_* bits, let them equal > the PAGE_* bits to begin. > > Reviewed-by: Peter Maydell > Signed-off-by: Rich

Re: [PATCH v7 5/9] hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled

2021-01-16 Thread Bin Meng
Hi Philippe, On Sun, Jan 17, 2021 at 12:12 AM Philippe Mathieu-Daudé wrote: > > On 1/16/21 4:59 PM, Bin Meng wrote: > > Hi Philippe, > > > > On Sat, Jan 16, 2021 at 11:21 PM Philippe Mathieu-Daudé > > wrote: > >> > >> Hi Bin, > >> > >> On 1/16/21 2:57 PM, Bin Meng wrote: > >>> On Fri, Jan 15, 2

[Bug 1891748] Re: qemu-arm-static 5.1 can't run gcc

2021-01-16 Thread Andreas K . Hüttel
I'm still seeing this with qemu 5.2.0 armv7a-softfp-linux-gnueabi-gcc -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -Wl,-O1 -Wl,--as-needed glibc-test.c -o glibc-test Allocating guest commpage: Operation not permitted -- You received this bug notification because you are a me

Re: [PATCH v7 5/9] hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled

2021-01-16 Thread Philippe Mathieu-Daudé
On 1/16/21 4:59 PM, Bin Meng wrote: > Hi Philippe, > > On Sat, Jan 16, 2021 at 11:21 PM Philippe Mathieu-Daudé > wrote: >> >> Hi Bin, >> >> On 1/16/21 2:57 PM, Bin Meng wrote: >>> On Fri, Jan 15, 2021 at 11:37 PM Philippe Mathieu-Daudé >>> wrote: When the block is disabled, only the

Re: [PATCH v7 4/9] hw/ssi: imx_spi: Rework imx_spi_read() to handle block disabled

2021-01-16 Thread Philippe Mathieu-Daudé
On 1/16/21 2:35 PM, Bin Meng wrote: > On Fri, Jan 15, 2021 at 11:37 PM Philippe Mathieu-Daudé > wrote: >> >> When the block is disabled, it stay it is 'internal reset logic' >> (internal clocks are gated off). Reading any register returns >> its reset value. Only update this value if the device i

Re: [PATCH v7 5/9] hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled

2021-01-16 Thread Bin Meng
Hi Philippe, On Sat, Jan 16, 2021 at 11:21 PM Philippe Mathieu-Daudé wrote: > > Hi Bin, > > On 1/16/21 2:57 PM, Bin Meng wrote: > > On Fri, Jan 15, 2021 at 11:37 PM Philippe Mathieu-Daudé > > wrote: > >> > >> When the block is disabled, only the ECSPI_CONREG register can > >> be modified. Setti

[Bug 1912059] [NEW] capstone link failure building linux-user static

2021-01-16 Thread Philippe Mathieu-Daudé
Public bug reported: $ ../configure --disable-system --static qemu 5.2.50 static build: YES capstone: system [...] $ make qemu-i386 [...] [478/478] Linking target qemu-i386 FAILED: qemu-i386 cc -o qemu-i386 libcommon.fa.p/hw_core_cpu.c.o libcommo

Re: [PATCH v7 5/9] hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled

2021-01-16 Thread Philippe Mathieu-Daudé
Hi Bin, On 1/16/21 2:57 PM, Bin Meng wrote: > On Fri, Jan 15, 2021 at 11:37 PM Philippe Mathieu-Daudé > wrote: >> >> When the block is disabled, only the ECSPI_CONREG register can >> be modified. Setting the EN bit enabled the device, clearing it > > I don't know how this conclusion came out. T

Re: [PATCH v7 0/9] hw/ssi: imx_spi: Fix various bugs in the imx_spi model

2021-01-16 Thread Bin Meng
On Sat, Jan 16, 2021 at 11:07 PM Philippe Mathieu-Daudé wrote: > > On 1/16/21 3:03 PM, Bin Meng wrote: > > Hi Philippe, > > > > On Fri, Jan 15, 2021 at 11:31 PM Philippe Mathieu-Daudé > > wrote: > >> > >> Hi, > >> > >> This is how I understand the ecSPI reset works, after > >> looking at the IMX

Re: [PATCH v7 0/9] hw/ssi: imx_spi: Fix various bugs in the imx_spi model

2021-01-16 Thread Philippe Mathieu-Daudé
On 1/16/21 3:03 PM, Bin Meng wrote: > Hi Philippe, > > On Fri, Jan 15, 2021 at 11:31 PM Philippe Mathieu-Daudé > wrote: >> >> Hi, >> >> This is how I understand the ecSPI reset works, after >> looking at the IMX6DQRM.pdf datasheet. >> >> This is a respin of Ben's v5 series [*]. >> >> Since v6: >

Re: [PATCH 1/4] tests/qtest: Remove TPM tests

2021-01-16 Thread Philippe Mathieu-Daudé
Hi Stefan, On 1/15/21 8:56 PM, Stefan Berger wrote: > On 1/15/21 1:40 PM, Stefan Berger wrote: >> On 1/15/21 11:06 AM, Philippe Mathieu-Daudé wrote: >>> On 1/15/21 4:53 PM, Stefan Berger wrote: On 1/15/21 10:52 AM, Philippe Mathieu-Daudé wrote: > Subject is incorrect, this is not a remova

Recent TCG commit breaks PPC

2021-01-16 Thread BALATON Zoltan
Hello, Commit 8fe35e0444be (tcg/optimize: Use tcg_constant_internal with constant folding) seems to break PPC emulation for me: Thread 3 "qemu-system-ppc" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x751e7700 (LWP 22636)] 0x55afd4ee in ts_are_copies (ts2=0x7f

Re: [PATCH v7 0/9] hw/ssi: imx_spi: Fix various bugs in the imx_spi model

2021-01-16 Thread Bin Meng
Hi Philippe, On Fri, Jan 15, 2021 at 11:31 PM Philippe Mathieu-Daudé wrote: > > Hi, > > This is how I understand the ecSPI reset works, after > looking at the IMX6DQRM.pdf datasheet. > > This is a respin of Ben's v5 series [*]. > > Since v6: > - Dropped "Reduce 'change_mask' variable scope" patch

[PATCH v7 06/11] iotests: define group in each iotest

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
We are going to drop group file. Define group in tests as a preparatory step. The patch is generated by cd tests/qemu-iotests grep '^[0-9]\{3\} ' group | while read line; do file=$(awk '{print $1}' <<< "$line"); groups=$(sed -e 's/^... //' <<< "$line"); awk "NR==2

Re: [PATCH v7 5/9] hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled

2021-01-16 Thread Bin Meng
On Fri, Jan 15, 2021 at 11:37 PM Philippe Mathieu-Daudé wrote: > > When the block is disabled, only the ECSPI_CONREG register can > be modified. Setting the EN bit enabled the device, clearing it I don't know how this conclusion came out. The manual only says the following 2 registers ignore the

[PATCH v7 09/11] iotests: add testrunner.py

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Add TestRunner class, which will run tests in a new python iotests running framework. There are some differences with current ./check behavior, most significant are: - Consider all tests self-executable, just run them, don't run python by hand. - Elapsed time is cached in json file - Elapsed tim

[PATCH v7 11/11] iotests: rename and move 169 and 199 tests

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Rename bitmaps migration tests and move them to tests subdirectory to demonstrate new human-friendly test naming. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/{199 => tests/migrate-bitmaps-postcopy-test} | 0 .../{199.out => tests/migrate-bitmaps-postcopy-test.out}

[PATCH v7 02/11] iotests/303: use dot slash for qcow2.py running

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
If you run './check 303', check includes common.config which adjusts $PATH to include '.' first, and therefore finds qcow2.py on PATH. But if you run './303' directly, there is nothing to adjust PATH, and if '.' is not already on your PATH by other means, the test fails because the executable is n

[PATCH v7 10/11] iotests: rewrite check into python

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Just use classes introduced in previous three commits. Behavior difference is described in these three commits. Drop group file, as it becomes unused. Drop common.env: now check is in python, and for tests we use same python interpreter that runs the check itself. Use build environment PYTHON in

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

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Add TestEnv class, which will handle test environment in a new python iotests running framework. Difference with current ./check interface: - -v (verbose) option dropped, as it is unused - -xdiff option is dropped, until somebody complains that it is needed - same for -n option - same for looking

[PATCH v7 07/11] iotests: add findtests.py

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Add python script with new logic of searching for tests: Current ./check behavior: - tests are named [0-9][0-9][0-9] - tests must be registered in group file (even if test doesn't belong to any group, like 142) Behavior of findtests.py: - group file is dropped - tests are all files in test

[PATCH v7 01/11] iotests/277: use dot slash for nbd-fault-injector.py running

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
If you run './check 277', check includes common.config which adjusts $PATH to include '.' first, and therefore finds nbd-fault-injector.py on PATH. But if you run './277' directly, there is nothing to adjust PATH, and if '.' is not already on your PATH by other means, the test fails because the ex

[PATCH v7 05/11] iotests/294: add shebang line

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- tests/qemu-iotests/294 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/294 b/tests/qemu-iotests/294 index 87da35db49..4c375ed609 100755 --- a/tests/qemu-iotests/294 +++ b/tests/qemu-iotests/294 @@ -1,3

[PATCH v7 03/11] iotests: fix some whitespaces in test output files

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
We are going to be stricter about comparing test result with .out files. So, fix some whitespaces now. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- tests/qemu-iotests/175.out | 2 +- tests/qemu-iotests/271.out | 12 ++-- tests/qemu-iotests/287.out | 10 +-

[PATCH v7 04/11] iotests: make tests executable

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
All other test files are executable. Fix these. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- tests/qemu-iotests/283 | 0 tests/qemu-iotests/298 | 0 tests/qemu-iotests/299 | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tests/qemu-i

[PATCH v7 00/11] Rework iotests/check

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
Hi all! These series has 3 goals: - get rid of group file (to forget about rebase and in-list conflicts) - introduce human-readable names for tests - rewrite check into python v7: - fix wording and grammar - satisfy python linters - move argv interfaces all into one in new check script

Re: [PATCH v7 4/9] hw/ssi: imx_spi: Rework imx_spi_read() to handle block disabled

2021-01-16 Thread Bin Meng
On Fri, Jan 15, 2021 at 11:37 PM Philippe Mathieu-Daudé wrote: > > When the block is disabled, it stay it is 'internal reset logic' > (internal clocks are gated off). Reading any register returns > its reset value. Only update this value if the device is enabled. > > Ref: i.MX 6DQ Applications Pro

Re: [PULL 00/30] Audio 20210115 patches

2021-01-16 Thread Peter Maydell
On Fri, 15 Jan 2021 at 13:50, Gerd Hoffmann wrote: > > The following changes since commit 45240eed4f064576d589ea60ebadf3c11d7ab891: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-yank-2021-01-13' int= > o staging (2021-01-13 14:19:24 +) > > are available in the Git repository at:

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

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
16.01.2021 14:03, Vladimir Sementsov-Ogievskiy wrote: 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.01.2021 um 13:19 hat Vladimir Sementso

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

2021-01-16 Thread Vladimir Sementsov-Ogievskiy
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.01.2021 um 13:19 hat Vladimir Sementsov-Ogievskiy geschrieben: 15.01.2021 14:18, Kevin Wolf

Re: [PATCH 10/11] hw/m68k/next-cube: Add vmstate for NeXTPC device

2021-01-16 Thread Thomas Huth
Am Fri, 15 Jan 2021 20:12:05 + schrieb Peter Maydell : > Add the vmstate for the new NeXTPC devic; this is in theory > a migration compatibility break, but this machine doesn't have > working migration currently anyway. > > Signed-off-by: Peter Maydell > --- > hw/m68k/next-cube.c | 34 +

Re: [PATCH 09/11] hw/m68k/next-cube: Remove unused fields from NeXTState

2021-01-16 Thread Thomas Huth
Am Fri, 15 Jan 2021 20:12:04 + schrieb Peter Maydell : > The fields scsi_irq, scsi_dma, scsi_reset and fd_irq in > NeXTState are all unused, except in commented out > "this should do something like this" code. Remove the > unused fields. As and when the functionality that might > use them is a

Re: [PATCH 08/11] hw/m68k/next-cube: Move rtc into NeXTPC struct

2021-01-16 Thread Thomas Huth
Am Fri, 15 Jan 2021 20:12:03 + schrieb Peter Maydell : > Move the rtc into the NeXTPC struct. Since this is the last > use of the 'backdoor' NextState pointer we can now remove that. > > Probably the RTC should be its own device at some point: in hardware > there is a separate MCS1850 RTC chi

Re: [PATCH 07/11] hw/m68k/next-cube: Make next_irq GPIO inputs to NEXT_PC device

2021-01-16 Thread Thomas Huth
Am Fri, 15 Jan 2021 20:12:02 + schrieb Peter Maydell : > Make the next_irq function be GPIO inputs to the NEXT_PC > device, rather than a freestanding set of qemu_irq lines. > > This fixes a minor Coverity issue where it correctly points > out the trivial memory leak of the memory allocated i

Re: [PATCH 06/11] hw/m68k/next-cube: Move int_status and int_mask to NeXTPC struct

2021-01-16 Thread Thomas Huth
Am Fri, 15 Jan 2021 20:12:01 + schrieb Peter Maydell : > All the code which accesses int_status and int_mask is now doing > so via the NeXTPC->NeXTState indirection, so we can move these > fields into the NeXTPC struct where they belong. > > Signed-off-by: Peter Maydell > --- > hw/m68k/next

Re: [PATCH 05/11] hw/m68k/next-cube: Make next_irq take NeXTPC* as its opaque

2021-01-16 Thread Thomas Huth
Am Fri, 15 Jan 2021 20:12:00 + schrieb Peter Maydell : > Make the next_irq function take a NeXTPC* as its opaque rather than > the M68kCPU*. This will make it simpler to turn the next_irq > function into a gpio input line of the NeXTPC device in the next > commit. > > For this to work we hav

Re: [PATCH 04/11] hw/m68k/next-cube: Move scr_ops into NeXTPC device

2021-01-16 Thread Thomas Huth
Am Fri, 15 Jan 2021 20:11:59 + schrieb Peter Maydell : > Move the registers handled by the scr_ops struct into the NeXTPC > device. > > Signed-off-by: Peter Maydell > --- > hw/m68k/next-cube.c | 50 > ++--- 1 file changed, 25 > insertions(+), 25 deleti

  1   2   >