[PATCH v2 17/25] DAX/unmap: virtiofsd: Add VHOST_USER_SLAVE_FS_IO

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Define a new slave command 'VHOST_USER_SLAVE_FS_IO' for a client to ask qemu to perform a read/write from an fd directly to GPA. Signed-off-by: Dr. David Alan Gilbert --- docs/interop/vhost-user.rst | 16 hw/virtio/trace-events

[PATCH v2 21/25] DAX/unmap virtiofsd: route unmappable write to slave command

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When a fuse_buf_copy is performed on an element with FUSE_BUF_PHYS_ADDR route it to a fuse_virtio_write request that does a slave command to perform the write. Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/buffer.c | 14 +++--- tools/v

[PATCH v2 15/25] DAX: virtiofsd: route se down to destroy method

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We're going to need to pass the session down to destroy so that it can pass it back to do the remove mapping. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/fuse_lowlevel.c | 6 +++--- tools/virtiofsd/fuse_lowlevel.h | 2

[PATCH v2 11/25] DAX: virtiofsd: Add setup/remove mappings fuse commands

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add commands so that the guest kernel can ask the daemon to map file sections into a guest kernel visible cache. Note: Catherine Ho had sent a patch to fix an issue with multiple removemapping. It was a merge issue though. Signed-off-by: Dr. David Alan Gilbert Si

[PATCH v2 23/25] vhost-user-fs: Extend VhostUserFSSlaveMsg to pass additional info

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Extend VhostUserFSSlaveMsg so that slave can ask it to drop CAP_FSETID before doing I/O on fd. In some cases, virtiofsd takes the onus of clearing setuid bit on a file when WRITE happens. Generally virtiofsd does the WRITE to fd (from guest memory which is mapped in virtiofsd a

[PATCH v2 24/25] vhost-user-fs: Implement drop CAP_FSETID functionality

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal As part of slave_io message, slave can ask to do I/O on an fd. Additionally slave can ask for dropping CAP_FSETID (if master has it) before doing I/O. Implement functionality to drop CAP_FSETID and gain it back after the operation. This also creates a dependency on libcap-ng.

Re: [EXTERNAL] [RFC PATCH 2/2] target/ppc: Add POWER10 exception model

2021-04-14 Thread Cédric Le Goater
On 4/14/21 5:23 AM, Nicholas Piggin wrote: > POWER10 adds a new bit that modifies interrupt behaviour, LPCR[HAIL], > and it removes support for the LPCR[AIL]=0b10 mode. This looks good but it's missing the MSR_LE setting. A part from that : Reviewed-by: Cédric Le Goater and Tested-by: Cédric

[PATCH v2 19/25] DAX/unmap virtiofsd: Parse unmappable elements

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" For some read/writes the virtio queue elements are unmappable by the daemon; these are cases where the data is to be read/written from non-RAM. In viritofs's case this is typically a direct read/write into an mmap'd DAX file also on virtiofs (possibly on another in

Re: [PATCH 4/5] target/ppc: Base changes to allow 32/64-bit insns

2021-04-14 Thread Richard Henderson
On 4/13/21 2:11 PM, Luis Pires wrote: @@ -7879,7 +7951,6 @@ static void ppc_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) { DisasContext *ctx = container_of(dcbase, DisasContext, base); CPUPPCState *env = cs->env_ptr; -int bound; ctx->exception = POWERP

[PATCH v2 25/25] virtiofsd: Ask qemu to drop CAP_FSETID if client asked for it

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal If qemu guest asked to drop CAP_FSETID upon write, send that info to qemu in SLAVE_FS_IO message so that qemu can drop capability before WRITE. This is to make sure that any setuid bit is killed on fd (if there is one set). Signed-off-by: Vivek Goyal --- tools/virtiofsd/buffe

Re: any remaining for-6.0 issues?

2021-04-14 Thread Mark Cave-Ayland
On 14/04/2021 15:36, Cornelia Huck wrote: On Wed, 14 Apr 2021 15:15:04 +0100 Mark Cave-Ayland wrote: On 14/04/2021 14:57, Mark Cave-Ayland wrote: I've definitely seen the same issue as Cornelia in my Gitlab CI builds for the ESP security fixes (first version of which appeared just before r

Re: [PATCH 4/5] target/ppc: Base changes to allow 32/64-bit insns

2021-04-14 Thread Richard Henderson
On 4/13/21 2:11 PM, Luis Pires wrote: +static inline int is_insn_prefix(uint32_t insn) +{ +return (opc1(insn) == 0x01); +} Oh. This should probably return false when prefixed instruction are not supported. r~

Re: [Virtio-fs] [PATCH v2 08/25] DAX: virtio-fs: Add vhost-user slave commands for mapping

2021-04-14 Thread Greg Kurz
On Wed, 14 Apr 2021 16:51:20 +0100 "Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > The daemon may request that fd's be mapped into the virtio-fs cache > visible to the guest. > These mappings are triggered by commands sent over the slave fd > from the daemon. > > Sig

[PATCH 1/1] Acceptance Tests: bump Avocado version requirement to 87.0

2021-04-14 Thread Cleber Rosa
This version (and 86.0) contain improvements that address specific QEMU use cases, including: * Fix to the error message given when downloading assets * Asset listing/purging capabilities Signed-off-by: Cleber Rosa --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[PATCH 0/1] Acceptance Tests: bump Avocado version requirement to 87.0

2021-04-14 Thread Cleber Rosa
This is being proposed as a separate single patch simply to show that no known regressions have been introduced as far as the acceptance tests/jobs are related. CI job: https://gitlab.com/cleber.gnu/qemu/-/pipelines/286347312 This version (and 86.0) contain improvements that address specific

Re: [PATCH v3 3/3] accel/tcg: Assert that tb->size != 0 after translation

2021-04-14 Thread Ilya Leoshkevich
On Wed, 2021-04-14 at 16:48 +0200, David Hildenbrand wrote: > On 14.04.21 15:41, Ilya Leoshkevich wrote: > > If arch-specific code generates a translation block of size 0, > > tb_gen_code() may generate a spurious exception. Add an assertion > > in > > order to catch such situations early. > > > >

Re: [PULL v2 1/3] osdep: include glib-compat.h before other QEMU headers

2021-04-14 Thread Philippe Mathieu-Daudé
On 4/13/21 6:08 PM, Paolo Bonzini wrote: > glib-compat.h is sort of like a system header, and it needs to include > system headers (glib.h) that may dislike being included under > 'extern "C"'. Move it right after all system headers and before > all other QEMU headers. > > Signed-off-by: Paolo Bo

Re: [PATCH 1/1] Acceptance Tests: bump Avocado version requirement to 87.0

2021-04-14 Thread Wainer dos Santos Moschetta
On 4/14/21 1:11 PM, Cleber Rosa wrote: This version (and 86.0) contain improvements that address specific QEMU use cases, including: * Fix to the error message given when downloading assets * Asset listing/purging capabilities Signed-off-by: Cleber Rosa --- tests/requirements.txt | 2 +-

Re: [PATCH for-6.1 1/4] include/sysemu: Poison all accelerator CONFIG switches in common code

2021-04-14 Thread Philippe Mathieu-Daudé
On 4/14/21 1:20 PM, Thomas Huth wrote: > We are already poisoning CONFIG_KVM since this switch is not working > in common code. Do the same with the other accelerator switches, too > (except for CONFIG_TCG, which is special, since it is also defined in > config-host.h). > > Signed-off-by: Thomas H

Re: [PULL v2 1/3] osdep: include glib-compat.h before other QEMU headers

2021-04-14 Thread Daniel P . Berrangé
On Tue, Apr 13, 2021 at 06:08:48PM +0200, Paolo Bonzini wrote: > glib-compat.h is sort of like a system header, and it needs to include > system headers (glib.h) that may dislike being included under > 'extern "C"'. Move it right after all system headers and before > all other QEMU headers. > > S

[PATCH v3 00/15] qemu_iotests: improve debugging options

2021-04-14 Thread Emanuele Giuseppe Esposito
This series adds the option to attach gdbserver and valgrind to the QEMU binary running in qemu_iotests. It also allows to redirect QEMU binaries output of the python tests to the stdout, instead of a log file. Patches 1-6 introduce the -gdb option to both python and bash tests, 7-10 extend the a

[PATCH v3 01/15] python: qemu: add timer parameter for qmp.accept socket

2021-04-14 Thread Emanuele Giuseppe Esposito
Add a new _qmp_timer field to the QEMUMachine class. The default timer is 15 sec, as per the default in the qmp accept() function. Signed-off-by: Emanuele Giuseppe Esposito --- python/qemu/machine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/qemu/machine.py b/p

[PATCH v3 02/15] python: qemu: pass the wrapper field from QEMUQtestmachine to QEMUMachine

2021-04-14 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito --- python/qemu/qtest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/qemu/qtest.py b/python/qemu/qtest.py index 39a0cf62fe..c18eae96c6 100644 --- a/python/qemu/qtest.py +++ b/python/qemu/qtest.py @@ -111,6 +111,7 @@ class

[PATCH v3 05/15] qemu-iotests: delay QMP socket timers

2021-04-14 Thread Emanuele Giuseppe Esposito
Attaching a gdbserver implies that the qmp socket should wait indefinitely for an answer from QEMU. Signed-off-by: Emanuele Giuseppe Esposito --- python/qemu/machine.py| 3 +++ tests/qemu-iotests/iotests.py | 10 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/

[PATCH v3 09/15] qemu_iotests: extend the check script to support valgrind for python tests

2021-04-14 Thread Emanuele Giuseppe Esposito
Currently, the check script only parses the option and sets the VALGRIND_QEMU environmental variable to "y". Add another local python variable that prepares the command line, identical to the one provided in the test scripts. Because the python script does not know in advance the valgring PID to a

[PATCH v3 13/15] docs/devel/testing: add -valgrind option to the debug section of QEMU iotests

2021-04-14 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito --- docs/devel/testing.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 2ee77a057b..62902cfd2d 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -236,6 +236,13 @@ given

[PATCH v3 03/15] docs/devel/testing: add debug section to the QEMU iotests chapter

2021-04-14 Thread Emanuele Giuseppe Esposito
Introduce the "Debugging a test case" section, in preparation to the additional flags that will be added in the next patches. Signed-off-by: Emanuele Giuseppe Esposito --- docs/devel/testing.rst | 8 1 file changed, 8 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testi

[PATCH v3 08/15] docs/devel/testing: add -gdb option to the debugging section of QEMU iotests

2021-04-14 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito --- docs/devel/testing.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index b7e2370e7e..2ee77a057b 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -229,6 +229,13 @@ Debugg

[PATCH v3 12/15] qemu_iotests: insert valgrind command line as wrapper for qemu binary

2021-04-14 Thread Emanuele Giuseppe Esposito
The priority will be given to gdb command line, meaning if the -gdb parameter and -valgrind are given, gdb will be wrapped around the qemu binary. Signed-off-by: Emanuele Giuseppe Esposito --- tests/qemu-iotests/iotests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tes

[PATCH v3 04/15] qemu-iotests: add option to attach gdbserver

2021-04-14 Thread Emanuele Giuseppe Esposito
Add -gdb flag and GDB_QEMU environmental variable to python tests to attach a gdbserver to each qemu instance. if -gdb is not provided but $GDB_QEMU is set, ignore the environmental variable. Signed-off-by: Emanuele Giuseppe Esposito --- tests/qemu-iotests/check | 6 +- tests/qemu-iot

[PATCH v3 11/15] qemu_iotests: allow valgrind to read/delete the generated log file

2021-04-14 Thread Emanuele Giuseppe Esposito
When using -valgrind on the script tests, it generates a log file in $TEST_DIR that is either read (if valgrind finds problems) or otherwise deleted. Provide the same exact behavior when using -valgrind on the python tests. Signed-off-by: Emanuele Giuseppe Esposito --- tests/qemu-iotests/iotests

[PATCH v3 15/15] docs/devel/testing: add -p option to the debug section of QEMU iotests

2021-04-14 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito --- docs/devel/testing.rst | 4 1 file changed, 4 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 62902cfd2d..0c18fc4571 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -246,6 +246,10 @@ given as

[PATCH v3 06/15] qemu_iotests: insert gdbserver command line as wrapper for qemu binary

2021-04-14 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito --- tests/qemu-iotests/iotests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 380527245e..4f3fb13915 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-

Re: [PULL v2 2/3] osdep: protect qemu/osdep.h with extern "C"

2021-04-14 Thread Daniel P . Berrangé
On Tue, Apr 13, 2021 at 06:08:49PM +0200, Paolo Bonzini wrote: > System headers may include templates if compiled with a C++ compiler, > which cause the compiler to complain if qemu/osdep.h is included > within a C++ source file's 'extern "C"' block. Add > an 'extern "C"' block directly to qemu/os

[PATCH v3 07/15] qemu-iotests: add gdbserver option to script tests too

2021-04-14 Thread Emanuele Giuseppe Esposito
The only limitation here is that running a script with gdbserver will make the test output mismatch with the expected results, making the test fail. Signed-off-by: Emanuele Giuseppe Esposito --- tests/qemu-iotests/common.rc | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

[PATCH v3 10/15] qemu_iotests: extent QMP socket timeout when using valgrind

2021-04-14 Thread Emanuele Giuseppe Esposito
As with gdbserver, valgrind delays the test execution, so the default QMP socket timeout timeout too soon. Signed-off-by: Emanuele Giuseppe Esposito --- python/qemu/machine.py| 2 +- tests/qemu-iotests/iotests.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/py

[PATCH v1] migration/dirtyrate: make sample page count configurable

2021-04-14 Thread huangy81
From: Hyman Huang(黄勇) introduce optional sample-pages argument in calc-dirty-rate, making sample page count per GB configurable so that more accurate dirtyrate can be calculated. Signed-off-by: Hyman Huang(黄勇) --- migration/dirtyrate.c | 32 migration/dirtyrate

Re: [PATCH RFC 3/7] protocol: generic async message-based protocol loop

2021-04-14 Thread John Snow
On 4/13/21 4:00 PM, Stefan Hajnoczi wrote: On Tue, Apr 13, 2021 at 11:55:49AM -0400, John Snow wrote: This module provides the protocol-agnostic framework upon which QMP will be built. I also have (not included in this series) a qtest implementation that uses this same framework, which is why it

[PATCH v3 14/15] qemu_iotests: add option to show qemu binary logs on stdout

2021-04-14 Thread Emanuele Giuseppe Esposito
Using the flag -p, allow the qemu binary to print to stdout. This helps especially when doing print-debugging. Signed-off-by: Emanuele Giuseppe Esposito --- tests/qemu-iotests/check | 3 ++- tests/qemu-iotests/iotests.py | 9 + tests/qemu-iotests/testenv.py | 9 +++-- 3 files ch

[PATCH] migration/dirtyrate: make sample page count configurable

2021-04-14 Thread huangy81
From: Hyman Huang(黄勇) introduce optional sample-pages argument in calc-dirty-rate, making sample page count per GB configurable so that more accurate dirtyrate can be calculated. Signed-off-by: Hyman Huang(黄勇) --- migration/dirtyrate.c | 32 migration/dirtyrate

Re: [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3

2021-04-14 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Hi Alex, > > On 4/12/21 7:55 PM, Philippe Mathieu-Daudé wrote: >> On 4/6/21 7:12 PM, Alex Bennée wrote: >>> >>> Philippe Mathieu-Daudé writes: >>> On 3/31/21 5:45 PM, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > >> The current '

Re: [PATCH RFC 4/7] message: add QMP Message type

2021-04-14 Thread John Snow
On 4/13/21 4:07 PM, Stefan Hajnoczi wrote: On Tue, Apr 13, 2021 at 11:55:50AM -0400, John Snow wrote: This is an abstraction that represents a single message either sent to or received from the server. It is used to subclass the AsyncProtocol(Generic[T]) type. It was written such that it can be

Re: [PATCH RFC 6/7] qmp_protocol: add QMP client implementation

2021-04-14 Thread John Snow
On 4/14/21 1:44 AM, Stefan Hajnoczi wrote: On Tue, Apr 13, 2021 at 11:55:52AM -0400, John Snow wrote: +async def _execute(self, msg: Message) -> object: +""" +The same as `execute_msg()`, but without safety mechanisms. + +Does not assign an execution ID and does not c

Re: [PATCH v3 3/3] accel/tcg: Assert that tb->size != 0 after translation

2021-04-14 Thread Max Filippov
On Wed, Apr 14, 2021 at 9:51 AM Ilya Leoshkevich wrote: > On Wed, 2021-04-14 at 16:48 +0200, David Hildenbrand wrote: > > Did you double-check the xtensa issue? > > Oh, I'm sorry, I completely forgot about that one. I just ran the > test locally, and apparently it fails because of this new assert,

Re: [PULL v2 0/3] osdep.h + QOM changes for QEMU 6.0-rc3

2021-04-14 Thread Peter Maydell
On Tue, 13 Apr 2021 at 17:18, Paolo Bonzini wrote: > > The following changes since commit c1e90def01bdb8fcbdbebd9d1eaa8e4827ece620: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20210412' into staging (2021-04-12 > 12:12:09 +0100) > > are available in the Git reposi

target/ppc: sPAPR invalid function calls when compiling without TCG

2021-04-14 Thread Lucas Mateus Martins Araujo e Castro
Hi, I have been working on billionai's patch to enable the --disable-tcg option on PowerPC and one of the problems is that 5 files in hw/ppc use functions implemented in mmu-hash64.c which is not compiled with --disable-tcg, I'd like to know how to correct the spapr function call, should I *

Re: [PULL v2 2/3] osdep: protect qemu/osdep.h with extern "C"

2021-04-14 Thread Peter Maydell
On Wed, 14 Apr 2021 at 18:26, Daniel P. Berrangé wrote: > > On Tue, Apr 13, 2021 at 06:08:49PM +0200, Paolo Bonzini wrote: > > System headers may include templates if compiled with a C++ compiler, > > which cause the compiler to complain if qemu/osdep.h is included > > within a C++ source file's '

[PATCH] include/qemu/osdep.h: Move system includes to top

2021-04-14 Thread Peter Maydell
Mostly osdep.h puts the system includes at the top of the file; but there are a couple of exceptions where we include a system header halfway through the file. Move these up to the top with the rest so that all the system headers we include are included before we include os-win32.h or os-posix.h.

Re: [RFC PATCH 0/5] mptcp support

2021-04-14 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Mon, Apr 12, 2021 at 03:51:10PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Thu, Apr 08, 2021 at 08:11:54PM +0100, Dr. David Alan Gilbert (git) > > > wrote: > > > > From: "Dr. David Alan

Re: [PULL v2 2/3] osdep: protect qemu/osdep.h with extern "C"

2021-04-14 Thread Peter Maydell
On Wed, 14 Apr 2021 at 18:26, Daniel P. Berrangé wrote: > > On Tue, Apr 13, 2021 at 06:08:49PM +0200, Paolo Bonzini wrote: > > #ifdef _WIN32 > > #include "sysemu/os-win32.h" > > This and os-posix.h both include other system headers. We don't currently > have problem, so this is ok as the minimal

Re: [PATCH v5 12/14] hmp: Print "share" property of memory backends with "info memdev"

2021-04-14 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > Let's print the property. > > Cc: Markus Armbruster > Cc: Eric Blake > Cc: Igor Mammedov > Signed-off-by: David Hildenbrand Reviewed-by: Dr. David Alan Gilbert > --- > hw/core/machine-hmp-cmds.c | 2 ++ > 1 file changed, 2 insertions(+) > >

Re: [PATCH 5/5] target/ppc: Implement paddi and replace addi insns

2021-04-14 Thread Richard Henderson
On 4/13/21 2:11 PM, Luis Pires wrote: +++ b/target/ppc/translate/fixedpoint-impl.c.inc @@ -0,0 +1,26 @@ Missing copyright+license header. +static bool trans_paddi(DisasContext *ctx, arg_paddi *a) +{ +if (a->r == 0) { +if (a->ra == 0) { +/* li case */ +tcg_g

tidying up osdep.h

2021-04-14 Thread Peter Maydell
(cc'ing people related to the recent 'extern "C"' patches and also randomly Markus as somebody who's had opinions on header cleanups in the past...) osdep.h as it stands today is a mix of two things: (1) it has the "must be included by everybody" items: (a) config-host.h, poison.h, compiler.h

Re: [PATCH RFC 0/7] RFC: Asynchronous QMP Draft

2021-04-14 Thread John Snow
First and foremost, thank you for reviewing this! It is very helpful to me to see what others think of this pet project I've been growing in the privacy of my own mind. On 4/14/21 2:38 AM, Stefan Hajnoczi wrote: Below are the API docs that I found helpful for understanding the big picture. Th

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-14 Thread Richard Henderson
On 4/13/21 10:43 AM, Bruno Piazera Larsen wrote: The trivial path is to: * rename translate_init.c.inc to cpu_init.c (since it has to do with initial definitions for CPUs, and it's not related to translating anymore); Anymore? You mean after you've moved out everything related to create_ppc_o

Re: [PATCH v3 3/3] accel/tcg: Assert that tb->size != 0 after translation

2021-04-14 Thread Richard Henderson
On 4/14/21 11:03 AM, Max Filippov wrote: On Wed, Apr 14, 2021 at 9:51 AM Ilya Leoshkevich wrote: On Wed, 2021-04-14 at 16:48 +0200, David Hildenbrand wrote: Did you double-check the xtensa issue? Oh, I'm sorry, I completely forgot about that one. I just ran the test locally, and apparently i

[Bug 1923497] Re: bios_linker_loader_add_checksum: Assertion `start_offset < file->blob->len' failed

2021-04-14 Thread Ed Davison
The patch may be a bit beyond me at the moment as I use a package to install this and would have to figure out how to download source, get it configure, patched and compiled. Whew! Maybe ... But here is my XML config file. ** Attachment added: "domain xml file" https://bugs.launchpad.net/qe

Re: [PATCH 2/5] decodetree: Fix empty input files for varinsnwidth

2021-04-14 Thread Richard Henderson
On 4/13/21 2:11 PM, Luis Pires wrote: Decodetree would throw an error when the input file was empty and --varinsnwidth was specified. Signed-off-by: Luis Pires --- scripts/decodetree.py | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) Reviewed-by: Richard Henderson +

Converting QEMU .raw to VMDK VMware

2021-04-14 Thread Terrance Battle
Hi, I have a question, how do I go about converting a .raw snapshot to VMware VMDK? We're looking to move the .raw snapshot to our new VMware environment for DevOps. Thanks, BlackSalt Technology Group Terrance Battle | CEO tbat...@thebstgroup.com 202.579.7334 (

[PATCH 0/2] util/async: print leaked BH name when AioContext finalizes

2021-04-14 Thread Stefan Hajnoczi
Eric Ernst and I debugged a BH leak and it was more involved than it should be. The problem is that BHs don't have a human-readable identifier, so low-level debugging techniques and inferences about the code are required to figure out which BH was leaked in production environments without easy debu

[PATCH 2/2] util/async: print leaked BH name when AioContext finalizes

2021-04-14 Thread Stefan Hajnoczi
BHs must be deleted before the AioContext is finalized. If not, it's a bug and probably indicates that some part of the program still expects the BH to run in the future. That can lead to memory leaks, inconsistent state, or just hangs. Unfortunately the assert(flags & BH_DELETED) call in aio_ctx_

[PATCH 1/2] util/async: add a human-readable name to BHs for debugging

2021-04-14 Thread Stefan Hajnoczi
It can be difficult to debug issues with BHs in production environments. Although BHs can usually be identified by looking up their ->cb() function pointer, this requires debug information for the program. It is also not possible to print human-readable diagnostics about BHs because they have no id

RE: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-14 Thread Fabiano Rosas
Bruno Piazera Larsen writes: >> > * move gen_write_xer and gen_read_xer into cpu_init.c, as they're >> > used for some sprs, and whatever needs to be moved with it >> >> I'd leave them where they are currently. Instead what I think we should >> do is to find a way to not need the uea/oea/hea|read

RE: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-14 Thread Bruno Piazera Larsen
> > The trivial path is to: > > * rename translate_init.c.inc to cpu_init.c (since it has to do with > > initial definitions for CPUs, and it's not related to translating > > anymore); > > Anymore? You mean after you've moved out everything related to > create_ppc_opcodes? Sure. yeah, that. Als

Re: [PATCH v3] target/ppc: code motion from translate_init.c.inc to gdbstub.c

2021-04-14 Thread Richard Henderson
On 4/14/21 7:59 AM, Bruno Larsen (billionai) wrote: All the code related to gdb has been moved from translate_init.c.inc file to the gdbstub.c file, where it makes more sense. This new version puts the prototypes in internal.h, to not expose them unnecessarily. Signed-off-by: Bruno Larsen (bill

[PATCH 0/2] virtiofsd: Enable xattr if xattrmap is used

2021-04-14 Thread Carlos Venegas
Using xattrmap for Kata Containers we found that xattr is should be used or xattrmap wont work. These patches enable xattr when -o xattrmap is used. Also, they add help for the xattrmap option on `virtiofsd --help` output. Carlos Venegas (2): virtiofsd: Allow use "-o xattrmap" without "-o xa

[PATCH 2/2] virtiofsd: Add help for -o xattr-mapping

2021-04-14 Thread Carlos Venegas
The option is not documented in help. Add small help about the option. Signed-off-by: Carlos Venegas --- tools/virtiofsd/helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/virtiofsd/helper.c b/tools/virtiofsd/helper.c index 28243b51b2..5e98ed702b 100644 --- a/tools/virtiofsd/

[PATCH 1/2] virtiofsd: Allow use "-o xattrmap" without "-o xattr"

2021-04-14 Thread Carlos Venegas
When -o xattrmap is used, it will not work unless xattr is enabled. This patch enables xattr when -o xattrmap is used. Signed-off-by: Carlos Venegas --- tools/virtiofsd/passthrough_ll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passth

[PATCH v7 0/4] Add support for FEAT_TLBIOS and FEAT_TLBIRANGE

2021-04-14 Thread Rebecca Cran
ARMv8.4 adds the mandatory FEAT_TLBIOS and FEAT_TLBIRANGE. They provides TLBI maintenance instructions that extend to the Outer Shareable domain and that apply to a range of input addresses. Changes from v6 to v7: o Fixed the tlbi_aa64_rvae1_write the tlbi_aa64_rvae1is_write functions to pass

[PATCH v7 2/4] target/arm: Add support for FEAT_TLBIRANGE

2021-04-14 Thread Rebecca Cran
ARMv8.4 adds the mandatory FEAT_TLBIRANGE. It provides TLBI maintenance instructions that apply to a range of input addresses. Signed-off-by: Rebecca Cran --- target/arm/cpu.h| 5 + target/arm/helper.c | 296 2 files changed, 301 insertions(+) diff --git a/target/arm/

[PATCH v7 3/4] target/arm: Add support for FEAT_TLBIOS

2021-04-14 Thread Rebecca Cran
ARMv8.4 adds the mandatory FEAT_TLBIOS. It provides TLBI maintenance instructions that extend to the Outer Shareable domain. Signed-off-by: Rebecca Cran --- target/arm/cpu.h| 5 ++ target/arm/helper.c | 75 2 files changed, 80 insertions(+) diff --git a/target/arm/cpu.

[PATCH v7 1/4] accel/tcg: Add TLB invalidation support for ranges of addresses

2021-04-14 Thread Rebecca Cran
Add functions to support the FEAT_TLBIRANGE ARMv8.4 feature that adds TLB invalidation instructions to invalidate ranges of addresses. Signed-off-by: Rebecca Cran --- accel/tcg/cputlb.c | 130 +++- include/exec/exec-all.h | 46 +++ 2 files changed, 173 insertions(+), 3

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-14 Thread Richard Henderson
On 4/14/21 1:07 PM, Bruno Piazera Larsen wrote: I think it would be worth moving all of the SPR code out to a separate file, apart from cpu_init.c.  There's a lot of it.  And, yes, I would move everything that you can that is related out of translate.c. Yeah, now that I look at the SPR code, I

[PATCH v7 4/4] target/arm: set ID_AA64ISAR0.TLB to 2 for max AARCH64 CPU type

2021-04-14 Thread Rebecca Cran
Indicate support for FEAT_TLBIOS and FEAT_TLBIRANGE by setting ID_AA64ISAR0.TLB to 2 for the max AARCH64 CPU type. Signed-off-by: Rebecca Cran Reviewed-by: Richard Henderson --- target/arm/cpu64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index

RE: [PATCH 00/11] Add support for Blob resources feature

2021-04-14 Thread Kasireddy, Vivek
Hi Gerd, > > > Any other ideas as to how to eliminate that Blit cleanly? > > Well, "cleanly" pretty much implies "supported by toolkit". [Kasireddy, Vivek] I was kind of hoping you'd not draw that implication :) > > gtk glarea for example sets up a framebuffer and expects the application > ren

Re: [Virtio-fs] [PATCH 2/2] virtiofsd: Add help for -o xattr-mapping

2021-04-14 Thread Connor Kuehl
On Wed Apr 14, 2021 at 3:12 PM CDT, Carlos Venegas wrote: > The option is not documented in help. > > Add small help about the option. > > Signed-off-by: Carlos Venegas > --- > tools/virtiofsd/helper.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tools/virtiofsd/helper.c b/tools/virt

Re: [PATCH 0/2] virtiofsd: Enable xattr if xattrmap is used

2021-04-14 Thread Connor Kuehl
On Wed Apr 14, 2021 at 3:12 PM CDT, Carlos Venegas wrote: > > Using xattrmap for Kata Containers we found that xattr is should be used > or xattrmap wont work. These patches enable xattr when -o xattrmap is > used. Also, they add help for the xattrmap option on `virtiofsd --help` > output. > > Carl

Mac OS - Standalone Installer

2021-04-14 Thread Richard Hill
Hello Everyone! I would like to ask if anyone on this list is aware of a standalone installer for QEMU for Mac OS? I am aware of the excellent work carried out by Stefan Weil for the Windows Platform and I wondered if something similar existed for the Mac? The approach of using Homebrew will

[PATCH 3/3] Acceptance Tests: support choosing specific distro and version

2021-04-14 Thread Cleber Rosa
The tests based on the LinuxTest class give the test writer a ready to use guest operating system, currently pinned to Fedora 31. With this change, it's now possible to choose different distros and versions, similar to how other tags and parameter can be set for the target arch, accelerator, etc.

[PATCH 2/3] Acceptance Tests: move definition of distro checksums to the framework

2021-04-14 Thread Cleber Rosa
Instead of having, by default, the checksum in the tests, and the definition of tests in the framework, let's keep them together. A central definition for distributions is available, and it should allow other known distros to be added more easily. No behavior change is expected here, and tests ca

[PATCH 0/3] Acceptance Tests: support choosing specific distro and version

2021-04-14 Thread Cleber Rosa
Because Fedora 31 will not suit all tests that depend on a Linux guest, this allows for the configuration of the guest distribution. It came out of a suggestion from Eric Auger, and it was actually a feature I planned to submit for a while. This is based on the following series: [PATCH v3 00/11]

[PATCH 1/3] Acceptance Tests: rename attribute holding the distro image checksum

2021-04-14 Thread Cleber Rosa
This renames the attribute that holds the checksum for the image Linux distribution image used. The current name of the attribute is not very descriptive. Also, in preparation for making the distribution used configurable, which will add distro related parameters, attributes and tags, let's make

[Bug 1923693] Re: Lack of architecture in gdbstub makes debugging confusing

2021-04-14 Thread Alistair Francis
Thanks for raising this. I have marked it as fixes as like you say it's fixed in mainline. ** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/192369

Re: [PATCH RFC v5 03/12] target/riscv: Implement function kvm_arch_init_vcpu

2021-04-14 Thread Alistair Francis
On Mon, Apr 12, 2021 at 4:53 PM Yifei Jiang wrote: > > Get isa info from kvm while kvm init. > > Signed-off-by: Yifei Jiang > Signed-off-by: Yipeng Yin > --- > target/riscv/kvm.c | 27 ++- > 1 file changed, 26 insertions(+), 1 deletion(-) > > diff --git a/target/riscv/kv

Re: [PATCH RFC v5 09/12] target/riscv: Add host cpu type

2021-04-14 Thread Alistair Francis
On Mon, Apr 12, 2021 at 4:54 PM Yifei Jiang wrote: > > 'host' type cpu is set isa to RVXLEN simply, more isa info > will obtain from KVM in kvm_arch_init_vcpu() > > Signed-off-by: Yifei Jiang > Signed-off-by: Yipeng Yin Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.c | 9 +

Re: [PATCH RFC v5 04/12] target/riscv: Implement kvm_arch_get_registers

2021-04-14 Thread Alistair Francis
On Mon, Apr 12, 2021 at 4:58 PM Yifei Jiang wrote: > > Get GPR CSR and FP registers from kvm by KVM_GET_ONE_REG ioctl. > > Signed-off-by: Yifei Jiang > Signed-off-by: Yipeng Yin Reviewed-by: Alistair Francis Alistair > --- > target/riscv/kvm.c | 150 +

Re: [PATCH RFC v5 05/12] target/riscv: Implement kvm_arch_put_registers

2021-04-14 Thread Alistair Francis
On Mon, Apr 12, 2021 at 4:56 PM Yifei Jiang wrote: > > Put GPR CSR and FP registers to kvm by KVM_SET_ONE_REG ioctl > > Signed-off-by: Yifei Jiang > Signed-off-by: Yipeng Yin > --- > target/riscv/kvm.c | 142 - > 1 file changed, 141 insertions(+), 1 d

Re: [PATCH RFC v5 06/12] target/riscv: Support start kernel directly by KVM

2021-04-14 Thread Alistair Francis
On Mon, Apr 12, 2021 at 4:56 PM Yifei Jiang wrote: > > Get kernel and fdt start address in virt.c, and pass them to KVM > when cpu reset. In addition, add kvm_riscv.h to place riscv specific > interface. > > Signed-off-by: Yifei Jiang > Signed-off-by: Yipeng Yin Reviewed-by: Alistair Francis

Re: [PATCH RFC v5 07/12] hw/riscv: PLIC update external interrupt by KVM when kvm enabled

2021-04-14 Thread Alistair Francis
On Mon, Apr 12, 2021 at 4:57 PM Yifei Jiang wrote: > > Only support supervisor external interrupt currently. > > Signed-off-by: Yifei Jiang > Signed-off-by: Yipeng Yin Reviewed-by: Alistair Francis Alistair > --- > hw/intc/sifive_plic.c| 29 - > target/riscv/

Re: [PATCH 5/5] target/ppc: Implement paddi and replace addi insns

2021-04-14 Thread Richard Henderson
On 4/14/21 12:11 PM, Richard Henderson wrote: static bool allow_prefix_MLS(DisasContext *ctx, arg_D *a) {     int64_t imm;     /* Require MLS prefix or no prefix. */     if (ctx->prefix_type != PREFIX_MLS) {     if (ctx->prefix_type == PREFIX_NONE) {     return true;     }

[Bug 1922611] Re: Acceptance Tests: migration fails on sparc target

2021-04-14 Thread Cleber Rosa
I can confirm this bug has been fixed. Relevant test output: VM launch command: './qemu-system-sparc -display none -vga none -chardev socket,id=mon,path=/tmp/avo_qemu_sock_g0w15g26/qemu-1672256-monitor.sock -mon chardev=mon,mode=control -incoming tcp:localhost:53800 -nodefaults' >>> {'execute':

Re: [PATCH v3 3/3] accel/tcg: Assert that tb->size != 0 after translation

2021-04-14 Thread Max Filippov
On Wed, Apr 14, 2021 at 12:43 PM Richard Henderson wrote: > > On 4/14/21 11:03 AM, Max Filippov wrote: > > On Wed, Apr 14, 2021 at 9:51 AM Ilya Leoshkevich wrote: > >> On Wed, 2021-04-14 at 16:48 +0200, David Hildenbrand wrote: > >>> Did you double-check the xtensa issue? > >> > >> Oh, I'm sorry,

[ANNOUNCE] QEMU 6.0.0-rc3 is now available

2021-04-14 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the fourth release candidate for the QEMU 6.0 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu-project.org/qemu-6.0.0-rc3.tar.xz http://down

Re: [RFC v9 15/29] vfio: Set up nested stage mappings

2021-04-14 Thread Kunkun Jiang
Hi Eric, On 2021/4/14 16:05, Auger Eric wrote: Hi Kunkun, On 4/14/21 3:45 AM, Kunkun Jiang wrote: On 2021/4/13 20:57, Auger Eric wrote: Hi Kunkun, On 4/13/21 2:10 PM, Kunkun Jiang wrote: Hi Eric, On 2021/4/11 20:08, Eric Auger wrote: In nested mode, legacy vfio_iommu_map_notify cannot be

[PATCH v6 0/4] Add support for ipv6 host forwarding

2021-04-14 Thread Doug Evans
This patchset takes the original patch from Maxim, https://www.mail-archive.com/qemu-devel@nongnu.org/msg569573.html and updates it. Option hostfwd is extended to support ipv6 addresses. Commands hostfwd_add, hostfwd_remove are extended as well. The libslirp part of the patch has been committed u

[PATCH v6 1/4] slirp: Advance libslirp submodule to add ipv6 host-forward support

2021-04-14 Thread Doug Evans
5eraph (2): disable_dns option limit vnameserver_addr to port 53 Akihiro Suda (1): libslirp.h: fix SlirpConfig v3 documentation Doug Evans (11): Add ipv6 host forward support tcpx_listen: Pass sizeof(addr) to memset Reject host forwarding to ipv6 "addr-any"

[PATCH v6 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse

2021-04-14 Thread Doug Evans
The parsing is moved into new function inet_parse_host_port. Also split out is ipv4=flag, ipv6=flag processing into inet_parse_ipv46. This is done in preparation for using these functions in net/slirp.c. Signed-off-by: Doug Evans --- Changes from v5: Also split out parsing of ipv4=on|off, ipv6=

[PATCH v6 3/4] net/slirp.c: Refactor address parsing

2021-04-14 Thread Doug Evans
... in preparation for adding ipv6 host forwarding support. Tested: avocado run tests/acceptance/hostfwd.py Signed-off-by: Doug Evans --- Changes from v5: Use InetSocketAddress and getaddrinfo(). Use new libslirp calls: slirp_remove_hostxfwd, slirp_add_hostxfwd. include/qemu/sockets.h |

[PATCH v6 4/4] net: Extend host forwarding to support IPv6

2021-04-14 Thread Doug Evans
Net option "-hostfwd" now supports IPv6 addresses. Commands hostfwd_add, hostfwd_remove now support IPv6 addresses. Tested: avocado run tests/acceptance/hostfwd.py Signed-off-by: Doug Evans --- Changes from v5: Recognize ipv4=,ipv6= options. hmp-commands.hx | 18 ++- net/slir

Re: [Bug 1923629] [NEW] RISC-V Vector Instruction vssub.vv not saturating

2021-04-14 Thread Alistair Francis
+ LIU Zhiwei and Kito Cheng Alistair On Wed, Apr 14, 2021 at 1:31 AM Tony Cole <1923...@bugs.launchpad.net> wrote: > > Public bug reported: > > I noticed doing a negate ( 0 – 0x8000 ) using vssub.vv produces an > incorrect result of 0x8000 (should saturate to 0x7FFF). > > Here is the

<    1   2   3   4   >