Re: [PATCH] block/rbd: Add support for rbd image encryption

2021-06-20 Thread Ilya Dryomov
On Sat, Jun 19, 2021 at 9:44 PM Ilya Dryomov wrote: > > On Thu, Jun 17, 2021 at 6:05 PM Or Ozeri wrote: > > > > Starting from ceph Pacific, RBD has built-in support for image-level > > encryption. > > Currently supported formats are LUKS version 1 and 2. > > > > There are 2 new relevant librbd A

RE: [PATCH] block/rbd: Add support for rbd image encryption

2021-06-20 Thread Or Ozeri
Thanks for your review!Regarding the last point:I currently don't have any plans for adding new luks2-only options, but they do exist. See in cryptsetup, for example the sector size which is configurable in luks2 only.In the librbd API we followed the same spirit and split luks1 and luks2 option st

Re: [PATCH 00/15] accel/tcg: Fix for #360 and other i/o alignment issues

2021-06-20 Thread Mark Cave-Ayland
On 19/06/2021 18:26, Richard Henderson wrote: Short story is that the first two patches resolve the observed problem, by completely bypassing quite a lot of code in memory.c. Longer story is that we should either use that code in memory.c, or we should bypass it to an even lower level, so that

Re: [PATCH v2 05/11] linux-user: Implement pivot_root

2021-06-20 Thread Laurent Vivier
Le 31/05/2021 à 07:50, YAMAMOTO Takashi a écrit : > Used by runc. > > Signed-off-by: YAMAMOTO Takashi > --- > linux-user/syscall.c | 21 + > 1 file changed, 21 insertions(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 2947e79dc0..51144c6d29 100644 >

Re: [PATCH v2 05/11] linux-user: Implement pivot_root

2021-06-20 Thread Laurent Vivier
Le 31/05/2021 à 07:50, YAMAMOTO Takashi a écrit : > Used by runc. > > Signed-off-by: YAMAMOTO Takashi > --- > linux-user/syscall.c | 21 + > 1 file changed, 21 insertions(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 2947e79dc0..51144c6d29 100644 >

Re: [PATCH v2 01/11] linux-user: handle /proc/self/exe for execve

2021-06-20 Thread Laurent Vivier
Le 31/05/2021 à 07:50, YAMAMOTO Takashi a écrit : > It seems somehow common to execve /proc/self/exe in docker > or golang community these days. > At least, moby "reexec" and runc "libcontainer" do that. > > Signed-off-by: YAMAMOTO Takashi > --- > linux-user/syscall.c | 7 ++- > 1 file chang

Re: [PATCH v2 02/11] linux-user: Fix the execfd case of /proc/self/exe open

2021-06-20 Thread Laurent Vivier
Le 31/05/2021 à 07:50, YAMAMOTO Takashi a écrit : > It's problematic to return AT_EXECFD as it is because the user app > would close it. > This patch opens it via /proc/self/fd instead. > > Signed-off-by: YAMAMOTO Takashi > --- > linux-user/syscall.c | 12 +++- > 1 file changed, 11 inser

Re: [PATCH 1/2] linux-user: Let sigaction query SIGKILL/SIGSTOP

2021-06-20 Thread Laurent Vivier
Le 01/06/2021 à 16:55, Ilya Leoshkevich a écrit : > The kernel allows doing this, so let's allow this in qemu as well. > Valgrind relies on this. > > Signed-off-by: Ilya Leoshkevich > --- > linux-user/signal.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/linux-u

Re: [PATCH 1/2] linux-user: Let sigaction query SIGKILL/SIGSTOP

2021-06-20 Thread Laurent Vivier
Le 01/06/2021 à 16:55, Ilya Leoshkevich a écrit : > The kernel allows doing this, so let's allow this in qemu as well. > Valgrind relies on this. > > Signed-off-by: Ilya Leoshkevich > --- > linux-user/signal.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/linux-u

Re: [PATCH 2/2] tests/tcg/linux-test: Check that sigaction can query SIGKILL/SIGSTOP

2021-06-20 Thread Laurent Vivier
Le 01/06/2021 à 16:56, Ilya Leoshkevich a écrit : > Verify that querying is allowed, but making changes isn't. > > Signed-off-by: Ilya Leoshkevich > --- > tests/tcg/multiarch/linux-test.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/tests/tcg/multiarch/linux-test.c > b/tes

Re: [PATCH 2/2] tests/tcg/linux-test: Check that sigaction can query SIGKILL/SIGSTOP

2021-06-20 Thread Laurent Vivier
Le 01/06/2021 à 16:56, Ilya Leoshkevich a écrit : > Verify that querying is allowed, but making changes isn't. > > Signed-off-by: Ilya Leoshkevich > --- > tests/tcg/multiarch/linux-test.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/tests/tcg/multiarch/linux-test.c > b/tes

Re: [PATCH 00/15] accel/tcg: Fix for #360 and other i/o alignment issues

2021-06-20 Thread Peter Maydell
On Sat, 19 Jun 2021 at 18:28, Richard Henderson wrote: > > Short story is that the first two patches resolve the observed > problem, by completely bypassing quite a lot of code in memory.c. > > Longer story is that we should either use that code in memory.c, > or we should bypass it to an even low

Re: [PATCH] linux-user: Check for ieee128 fpbits in PPC64 HWCAP2 feature list

2021-06-20 Thread Laurent Vivier
Le 14/06/2021 à 21:17, Khem Raj a écrit : > glibc 2.34 is now checking for this in hwcaps at > runtime [1] and failing to run the binary if machine > does not support 128bit IEEE fp > > Fixes > Fatal glibc error: CPU lacks float128 support (POWER 9 or later required) > > [1] > https://sourceware

Re: [PATCH] linux-user: Check for ieee128 fpbits in PPC64 HWCAP2 feature list

2021-06-20 Thread Laurent Vivier
Le 14/06/2021 à 21:17, Khem Raj a écrit : > glibc 2.34 is now checking for this in hwcaps at > runtime [1] and failing to run the binary if machine > does not support 128bit IEEE fp > > Fixes > Fatal glibc error: CPU lacks float128 support (POWER 9 or later required) > > [1] > https://sourceware

Re: [PATCH] linux-user: Fix incorrect use of feature-test-macros

2021-06-20 Thread Laurent Vivier
Le 26/05/2021 à 05:55, Michael Forney a écrit : > The _POSIX_C_SOURCE and _XOPEN_SOURCE macros are used by the > application to indicate to libc which declarations it should expose. > Since qemu does not define them anywhere, it does not make sense > to check their value. > > Instead, since the in

Re: [PATCH] linux-user/syscall: zero-init msghdr in do_sendrecvmsg_locked

2021-06-20 Thread Laurent Vivier
Le 16/05/2021 à 14:57, Kenta Iwasaki a écrit : > Sure, > > The bytes of `msghdr` need to be cleared because the `msghdr` struct layout > specified in QEMU > appears to generalize between the definitions of `msghdr` across different > libc's and kernels. To > appropriately generalize `msghdr` acr

Re: [PATCH] linux-user/syscall: zero-init msghdr in do_sendrecvmsg_locked

2021-06-20 Thread Kenta Iwasaki
No worries, though I would also like to apologize as I find that the explanation I gave in my last email was a little all over the place. To clarify my last e-mail, I believe the current msghdr struct layout in QEMU is libc-agnostic, but not kernel agnostic. Rather, the current msghdr struct layou

Re: QEMU hosting

2021-06-20 Thread Thomas Markey
Dear all Would it be possible, may I ask, for the QEMU website to be updated to show that Fosshost is supporting the project? The fosshost logo with a link back to https://fosshost.org will be more than sufficient, or just a link in footer / sponsor's page (if you have one). In addition, we're

Re: [PATCH] linux-user/syscall: zero-init msghdr in do_sendrecvmsg_locked

2021-06-20 Thread Laurent Vivier
Le 20/06/2021 à 17:09, Kenta Iwasaki a écrit : > No worries, though I would also like to apologize as I find that the > explanation I gave in my last > email was a little all over the place. > > To clarify my last e-mail, I believe the current msghdr struct layout in QEMU  > is libc-agnostic, but

Re: [PATCH] Update documentation to refer to new location for issues

2021-06-20 Thread Thomas Huth
On 19/06/2021 17.42, Stefan Weil wrote: Signed-off-by: Stefan Weil --- Another update is needed for scripts/show-fixed-bugs.sh. Don't worry about that script, I'll remove it after the next release (v6.1) has been done. The script is then hopefully not necessary anymore thanks to the possibi

[Bug 1910603] Re: [OSS-Fuzz] Issue 29174 sb16: Abrt in audio_bug

2021-06-20 Thread Thomas Huth
Fixed by: https://gitlab.com/qemu-project/qemu/-/commit/a2cd86a94a881b38a7d8bb67c619 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1910603 Title: [OSS-Fuzz] Issue 29174 sb16: Abrt in audio_bug Sta

[Bug 1868221] Re: /usr/share/applications/qemu.desktop should have an "Exec=" key.

2021-06-20 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/440 ** Changed in: qemu Status: New => Expired ** Bug watch

Re: [PATCH 3/3] target/avr: Convert to TranslatorOps

2021-06-20 Thread Michael Rolnik
Hi Richard. I reviewed the changes, they look good however ``` avocado --show=app run -t arch:avr tests/acceptance ``` fails with ``` Fetching asset from tests/acceptance/machine_avr6.py:AVR6Machine.test_freertos JOB ID : 930e8b1e13b2b907f1623096099029c33f83762f JOB LOG: /home/mrolnik/avoc

Re: [PATCH] sh4: Replace TAB indentations with spaces

2021-06-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210620175452.10076-1-em...@aabouzied.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210620175452.10076-1-em...@aabouzied.com Subject: [PATCH] sh4: Replace TAB indentations

[PATCH] ppc: Replace TAB indentations with spaces

2021-06-20 Thread Ahmed Abouzied
Replaces TABs with spaces, making sure to have a consistent coding style of 4 space indentations in the ppc subsystem. Signed-off-by: Ahmed Abouzied Resolves: https://gitlab.com/qemu-project/qemu/-/issues/374 --- hw/core/uboot_image.h | 184 - hw/ppc/ppc4

Re: [PATCH] ppc: Replace TAB indentations with spaces

2021-06-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210620180410.10837-1-em...@aabouzied.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210620180410.10837-1-em...@aabouzied.com Subject: [PATCH] ppc: Replace TAB indentations

Re: [PATCH] ppc: Replace TAB indentations with spaces

2021-06-20 Thread Richard Henderson
On 6/20/21 11:04 AM, Ahmed Abouzied wrote: +#define IH_CPU_INVALID0/* Invalid CPU*/ +#define IH_CPU_ALPHA1/* Alpha*/ +#define IH_CPU_ARM2/* ARM*/ +#define IH_CPU_I3863/* Intel x86*/ +#define IH_CPU_IA644/* IA64

qemu-binfmt-conf.sh: enforce style consistency

2021-06-20 Thread umarcor
Spaces are removed before '; then', for consistency with other scripts in the project. Signed-off-by: umarcor --- scripts/qemu-binfmt-conf.sh | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binf

Re: [PULL 0/3] VFIO update 2021-06-18

2021-06-20 Thread Peter Maydell
On Fri, 18 Jun 2021 at 16:36, Alex Williamson wrote: > > The following changes since commit 3ccf6cd0e3e1dfd663814640b3b18b55715d7a75: > > Merge remote-tracking branch > 'remotes/kraxel/tags/audio-20210617-pull-request' into staging (2021-06-18 > 09:54:42 +0100) > > are available in the Git rep

Re: qemu-binfmt-conf.sh: enforce style consistency

2021-06-20 Thread Laurent Vivier
Le 20/06/2021 à 22:15, umarcor a écrit : > Spaces are removed before '; then', for consistency with other scripts > in the project. Well, I'm not sure there is a real consistency with this in the other scripts... > Signed-off-by: umarcor Please use your real name, not a nickname. Changes look

Re: qemu-binfmt-conf.sh: enforce style consistency

2021-06-20 Thread Unai Martinez Corral
Hi Laurent, Well, I'm not sure there is a real consistency with this in the other > scripts... > Changes look good, but can someone confirm this is the style we want to use > everywhere? > > Peter? > Please, see https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg02267.html > Please use y

[PATCH v2 00/11] target/cris: Convert to TranslatorOps

2021-06-20 Thread Richard Henderson
I've reached a point where *all* targets must use the translator loop. Do that, plus some other obvious cleanups. Changes for v2: * Fix (drop) singlestep check for max_insns. We already do that generically. * Move delay branch handling to tb_stop. * Improve tcg_gen_lookup_and_goto_ptr

[PATCH v2 01/11] target/cris: Add DisasContextBase to DisasContext

2021-06-20 Thread Richard Henderson
Migrate the is_jmp, tb and singlestep_enabled fields from DisasContext into the base. Signed-off-by: Richard Henderson --- target/cris/translate.c | 49 + target/cris/translate_v10.c.inc | 4 +-- 2 files changed, 27 insertions(+), 26 deletions(-) diff --

[PATCH v2 07/11] target/cris: Mark helper_raise_exception noreturn

2021-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/cris/helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/cris/helper.h b/target/cris/helper.h index 20d21c4358..3abf608682 100644 --- a/target/cris/helper.h +++ b/target/cris/helper.h @@ -1,4 +1,4 @@ -DEF_HELPER_2(raise_e

[PATCH v2 06/11] target/cris: Convert to TranslatorOps

2021-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/cris/translate.c | 313 ++-- 1 file changed, 170 insertions(+), 143 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index 9e1f2f9239..f6d1fa914f 100644 --- a/target/cris/translate.c +++ b/

[PATCH v2 03/11] target/cris: Mark exceptions as DISAS_NORETURN

2021-06-20 Thread Richard Henderson
After we've raised the exception, we have left the TB. Signed-off-by: Richard Henderson --- target/cris/translate.c | 5 +++-- target/cris/translate_v10.c.inc | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index 2

[PATCH v2 04/11] target/cris: Remove DISAS_SWI

2021-06-20 Thread Richard Henderson
This value is unused. Signed-off-by: Richard Henderson --- target/cris/translate.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index f8b574b0b6..24dbae6d58 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -55,7 +55,6

[PATCH v2 10/11] target/cris: Use tcg_gen_lookup_and_goto_ptr

2021-06-20 Thread Richard Henderson
We can use this in gen_goto_tb and for DISAS_JUMP to indirectly chain to the next TB. Signed-off-by: Richard Henderson --- target/cris/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index 0e925320b3..c33324b988

[PATCH v2 11/11] target/cris: Improve JMP_INDIRECT

2021-06-20 Thread Richard Henderson
Use movcond instead of brcond to set env_pc. Discard the btarget and btaken variables to improve register allocation and avoid unnecessary writeback. Signed-off-by: Richard Henderson --- target/cris/translate.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff

[PATCH v2 02/11] target/cris: Replace DISAS_TB_JUMP with DISAS_NORETURN

2021-06-20 Thread Richard Henderson
The only semantic of DISAS_TB_JUMP is that we've done goto_tb, which is the same as DISAS_NORETURN -- we've exited the tb. Signed-off-by: Richard Henderson --- target/cris/translate.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/cris/translate.c b/target/cris

[PATCH v2 09/11] target/cris: Move delayed branch handling to tb_stop

2021-06-20 Thread Richard Henderson
By moving the code here, we can re-use other end-of-tb code, e.g. the evaluation of flags. Honor single stepping. Signed-off-by: Richard Henderson --- target/cris/translate.c | 82 ++--- 1 file changed, 45 insertions(+), 37 deletions(-) diff --git a/target/c

[PATCH v2 05/11] target/cris: Fix use_goto_tb

2021-06-20 Thread Richard Henderson
Do not skip the page check for user-only -- mmap/mprotect can still change page mappings. Only check dc->base.pc_first, not dc->ppc -- the start page is the only one that's relevant. Signed-off-by: Richard Henderson --- target/cris/translate.c | 9 ++--- 1 file changed, 2 insertions(+), 7 d

[PATCH v2 08/11] target/cris: Mark static arrays const

2021-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/cris/translate.c | 19 ++- target/cris/translate_v10.c.inc | 6 +++--- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index f6d1fa914f..83b20162f1 100644 --- a/

[PATCH v2 0/3] target/avr: Convert to TranslatorOps

2021-06-20 Thread Richard Henderson
I've reached a point where *all* targets must use the translator loop. Changes for v2: * Fix (drop) singlestep check for max_insns. We already do that generically. * Fully initialize DisasContext. It was that last that caused the check-acceptance regression for v1. I simply got lucky th

[PATCH v2 1/3] target/avr: Add DisasContextBase to DisasContext

2021-06-20 Thread Richard Henderson
Migrate the bstate, tb and singlestep_enabled fields from DisasContext into the base. Signed-off-by: Richard Henderson --- target/avr/translate.c | 58 +- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/target/avr/translate.c b/target/avr/t

[PATCH v2 2/3] target/avr: Change ctx to DisasContext* in gen_intermediate_code

2021-06-20 Thread Richard Henderson
Prepare for receiving it as a pointer input. Signed-off-by: Richard Henderson --- target/avr/translate.c | 84 +- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index 20c5062730..66e9882422 1

[PATCH v2 3/3] target/avr: Convert to TranslatorOps

2021-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/avr/translate.c | 234 ++--- 1 file changed, 128 insertions(+), 106 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index 66e9882422..c06ce45bc7 100644 --- a/target/avr/translate.c +++ b/tar

[PATCH v2 0/7] target/nios2: Convert to TranslatorOps

2021-06-20 Thread Richard Henderson
I've reached a point where *all* targets must use the translator loop. Do that, plus some other obvious cleanups. Changes for v2: * Fix (drop) singlestep check for max_insns. We already do that generically. r~ Richard Henderson (7): target/nios2: Replace DISAS_TB_JUMP with DISAS_NORE

[PATCH v2 4/7] target/nios2: Add DisasContextBase to DisasContext

2021-06-20 Thread Richard Henderson
Migrate the is_jmp, tb and singlestep_enabled fields from DisasContext into the base. Signed-off-by: Richard Henderson --- target/nios2/translate.c | 51 +--- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/target/nios2/translate.c b/target/nio

[PATCH v2 7/7] target/nios2: Clean up goto in handle_instruction

2021-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/nios2/translate.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 31f63d9faa..276643cee0 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -753,7

[PATCH v2 3/7] target/nios2: Use global cpu_R

2021-06-20 Thread Richard Henderson
We do not need to copy this into DisasContext. Signed-off-by: Richard Henderson --- target/nios2/translate.c | 73 +++- 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 39538e1870..6bdd38

[PATCH v2 1/7] target/nios2: Replace DISAS_TB_JUMP with DISAS_NORETURN

2021-06-20 Thread Richard Henderson
The only semantic of DISAS_TB_JUMP is that we've done goto_tb, which is the same as DISAS_NORETURN -- we've exited the tb. Signed-off-by: Richard Henderson --- target/nios2/translate.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/target/nios2/translate.c b/target/n

[PATCH v2 6/7] target/nios2: Remove assignment to env in handle_instruction

2021-06-20 Thread Richard Henderson
Direct assignments to env during translation do not work. As it happens, the only way we can get here is if env->pc is already set to dc->pc. We will trap on the first insn we execute anywhere on the page. Signed-off-by: Richard Henderson --- target/nios2/translate.c | 3 ++- 1 file changed, 2

[PATCH v2 2/7] target/nios2: Use global cpu_env

2021-06-20 Thread Richard Henderson
We do not need to copy this into DisasContext. Signed-off-by: Richard Henderson --- target/nios2/translate.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 388fae93a2..39538e1870 100644 --- a/target/nios2/t

[PATCH v2 5/7] target/nios2: Convert to TranslatorOps

2021-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/nios2/translate.c | 130 --- 1 file changed, 67 insertions(+), 63 deletions(-) diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 31653b7912..06705c894d 100644 --- a/target/nios2/translate.c +++ b

Re: [PATCH v2 02/11] linux-user: Fix the execfd case of /proc/self/exe open

2021-06-20 Thread Takashi Yamamoto
On Sun, Jun 20, 2021 at 11:16 PM Laurent Vivier wrote: > > Le 31/05/2021 à 07:50, YAMAMOTO Takashi a écrit : > > It's problematic to return AT_EXECFD as it is because the user app > > would close it. > > This patch opens it via /proc/self/fd instead. > > > > Signed-off-by: YAMAMOTO Takashi > > --

[PATCH 00/26] accel/tcg: Introduce translator_use_goto_tb

2021-06-20 Thread Richard Henderson
There are a number of inconsistencies with goto_tb usage, and I plan to make changes in order to better support breakpoints. (1) Testing CF_LAST_IO is a hold-over from since before ba3e7926691 ("icount: clean up cpu_can_io at the entry to the block"). Several targets still have this test.

[PATCH 09/26] target/hppa: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/translate.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 64af1e0d5c..952cfe09a6 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -817,10 +817,7

[PATCH 01/26] accel/tcg: Introduce translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Add a generic version of the common use_goto_tb test. Signed-off-by: Richard Henderson --- include/exec/translator.h | 10 ++ accel/tcg/translator.c| 11 +++ 2 files changed, 21 insertions(+) diff --git a/include/exec/translator.h b/include/exec/translator.h index 24232ead41

[PATCH 06/26] target/avr: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Single stepping is not the only reason not to use goto_tb. If goto_tb is disallowed, and single-stepping is not enabled, then use tcg_gen_lookup_and_goto_tb to indirectly chain. Cc: Michael Rolnik Signed-off-by: Richard Henderson --- target/avr/translate.c | 9 ++--- 1 file changed, 6 inser

[PATCH 04/26] target/alpha: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 6ea19a1d4c..1aa6d24d83 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -441,12

[PATCH 02/26] target/alpha: Remove use_exit_tb

2021-06-20 Thread Richard Henderson
We have not needed to end a TB for I/O since ba3e7926691 ("icount: clean up cpu_can_io at the entry to the block"). We do not need to use exit_tb for singlestep, which only means generate one insn per TB. Which leaves only singlestep_enabled, which means raise a debug trap after every TB, which do

[PATCH 10/26] target/i386: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Paolo Bonzini Cc: Eduardo Habkost Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/tar

[PATCH 12/26] target/microblaze: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/target/microblaze/tran

[PATCH 03/26] target/alpha: Remove in_superpage

2021-06-20 Thread Richard Henderson
The number of links across (normal) pages using this is low, and it will shortly violate the contract for breakpoints. Signed-off-by: Richard Henderson --- target/alpha/translate.c | 24 ++-- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/target/alpha/translat

[PATCH 05/26] target/arm: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Put a wrapper in translate.h, which also checks for ss_active. The ss_active test was incorrectly missing from the a32 version. Cc: qemu-...@nongnu.org Signed-off-by: Richard Henderson --- target/arm/translate.h | 13 + target/arm/translate-a64.c | 22 +- targ

[PATCH 15/26] target/nios2: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Chris Wulff Cc: Marek Vasut Signed-off-by: Richard Henderson --- target/nios2/translate.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/target/nios2

[PATCH 22/26] target/sh4: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Cc: Yoshinori Sato Signed-off-by: Richard Henderson --- target/sh4/translate.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 9312790623..9ac9bc722e 100644 --- a/target/sh4/translate.c +++ b/target/sh4/transla

[PATCH 13/26] target/mips: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/target/mips/

[PATCH 08/26] target/cris: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
The test for singlestepping is done in translator_use_goto_tb, so we may elide it from cris_tr_tb_stop. Cc: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target/cris/translate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/cris/translate.c b/target/cr

[PATCH 07/26] target/avr: Mark some helpers noreturn

2021-06-20 Thread Richard Henderson
All of these helpers end with cpu_loop_exit. Cc: Michael Rolnik Signed-off-by: Richard Henderson --- target/avr/helper.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/avr/helper.h b/target/avr/helper.h index 8e1ae7fda0..4d02e648fa 100644 --- a/target/avr/hel

[PATCH 14/26] target/mips: Fix missing else in gen_goto_tb

2021-06-20 Thread Richard Henderson
Do not emit dead code for the singlestep_enabled case, after having exited the TB with a debug exception. Cc: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/mips/tcg/translate.c

[PATCH 20/26] target/s390x: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Cc: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/translate.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index e243624d2a..4bb5d82a37 100644 --- a/target/s390x/translate.c +++ b/target/s390x/

[PATCH 11/26] target/m68k: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Laurent Vivier Signed-off-by: Richard Henderson --- target/m68k/translate.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/target/m68k/translate.c b/targ

[PATCH 18/26] target/riscv: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: qemu-ri...@nongnu.org Signed-off-by: Richard Henderson --- target/riscv/translate.c | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/target/riscv/tr

[PATCH 17/26] target/ppc: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Cc: David Gibson Signed-off-by: Richard Henderson --- target/ppc/translate.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index f65d1e81ea..0fb09f2301 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c

[PATCH 26/26] target/xtensa: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Cc: Max Filippov Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 14028d307d..ac42f5efdc 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/t

[PATCH 23/26] target/sparc: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Cc: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/translate.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 4bfa3179f8..fb0c242606 100644 --- a/target/sparc/translate.c +++ b

[PATCH 16/26] target/openrisc: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Reorder the cases in openrisc_tr_tb_stop to make this easier to read. Cc: Stafford Horne Signed-off-by: Richard Henderson --- target/openrisc/translate.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c

[PATCH 21/26] target/s390x: Remove use_exit_tb

2021-06-20 Thread Richard Henderson
We have not needed to end a TB for I/O since ba3e7926691 ("icount: clean up cpu_can_io at the entry to the block"). In use_goto_tb, the check for singlestep_enabled is in the generic translator_use_goto_tb. In s390x_tr_tb_stop, the check for singlestep_enabled is in the preceeding do_debug test.

[PATCH 25/26] target/tricore: Use tcg_gen_lookup_and_goto_ptr

2021-06-20 Thread Richard Henderson
The non-single-step case of gen_goto_tb may use tcg_gen_lookup_and_goto_ptr to indirectly chain. Cc: Bastian Koppelmann Signed-off-by: Richard Henderson --- target/tricore/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/tricore/translate.c b/target/trico

[PATCH 24/26] target/tricore: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Bastian Koppelmann Signed-off-by: Richard Henderson --- target/tricore/translate.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/target/tricore/tr

[PATCH 19/26] target/rx: Use translator_use_goto_tb

2021-06-20 Thread Richard Henderson
Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Yoshinori Sato Signed-off-by: Richard Henderson --- target/rx/translate.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/target/rx/translate.c b/target/rx

Re: [PATCH v2 01/11] linux-user: handle /proc/self/exe for execve

2021-06-20 Thread Takashi Yamamoto
On Sun, Jun 20, 2021 at 11:14 PM Laurent Vivier wrote: > > Le 31/05/2021 à 07:50, YAMAMOTO Takashi a écrit : > > It seems somehow common to execve /proc/self/exe in docker > > or golang community these days. > > At least, moby "reexec" and runc "libcontainer" do that. > > > > Signed-off-by: YAMAMO

[PATCH 00/18] vhost-vDPA multiqueue

2021-06-20 Thread Jason Wang
Hi All: This patch implements the multiqueue support for vhost-vDPA. The most important requirement the control virtqueue support. The virtio-net and vhost-net core are tweak to support control virtqueue as if what data queue pairs are done: a dedicated vhost_net device which is coupled with the N

[PATCH 01/18] vhost_net: remove the meaningless assignment in vhost_net_start_one()

2021-06-20 Thread Jason Wang
The nvqs and vqs has been initialized during vhost_net_init() and is not expected to change during the life cycle of vhost_net structure. So this patch removes the meaningless assignment. Signed-off-by: Jason Wang --- hw/net/vhost_net.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/ne

[PATCH 03/18] vhost_net: do not assume nvqs is always 2

2021-06-20 Thread Jason Wang
This patch switches to initialize dev.nvqs from the VhostNetOptions instead of assuming it was 2. This is useful for implementing control virtqueue support which will be a single vhost_net structure with a single cvq. Signed-off-by: Jason Wang --- hw/net/vhost_net.c | 2 +- include/net/vhos

[PATCH 06/18] vhost-vdpa: fix leaking of vhost_net in vhost_vdpa_add()

2021-06-20 Thread Jason Wang
Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client") Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index f5689a7c32..21f09c546f 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -111,6 +

[PATCH 05/18] vhost-vdpa: don't cleanup twice in vhost_vdpa_add()

2021-06-20 Thread Jason Wang
The previous vhost_net_cleanup is sufficient for freeing, calling vhost_vdpa_del() in this case will lead an extra round of free. Note that this kind of "double free" is safe since vhost_dev_cleanup() zero the whole structure. Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 11 --- 1 fi

[PATCH 02/18] vhost: use unsigned int for nvqs

2021-06-20 Thread Jason Wang
Switch to use unsigned int for nvqs since it's not expected to be negative. Signed-off-by: Jason Wang --- include/hw/virtio/vhost.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 21a9a52088..ddd7d3d594 100644 --- a/

[PATCH 10/18] vhost-vdpa: open device fd in net_init_vhost_vdpa()

2021-06-20 Thread Jason Wang
This path switches to open device fd in net_init_vhost_vpda(). This is used to prepare for the multiqueue support. Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index

[PATCH 08/18] vhost-vdpa: fix the wrong assertion in vhost_vdpa_init()

2021-06-20 Thread Jason Wang
Vhost_vdpa_add() can fail for various reasons, so the assertion of the succeed is wrong. Instead, we should free the NetClientState and propagate the error to the caller Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/vho

[PATCH 09/18] vhost-vdpa: remove the unncessary queue_index assignment

2021-06-20 Thread Jason Wang
The queue_index of NetClientState should be assigned in set_netdev() afterwards, so trying to net_vhost_vdpa_init() is meaningless. This patch removes this. Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index

[PATCH 04/18] vhost-vdpa: remove the unnecessary check in vhost_vdpa_add()

2021-06-20 Thread Jason Wang
The VhostVDPAState is just allocated by qemu_new_net_client() via g_malloc0() in net_vhost_vdpa_init(). So s->vhost_net is NULL for sure, let's remove this unnecessary check in vhost_vdpa_add(). Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 4 1 file changed, 4 deletions(-) diff --git a

[PATCH 12/18] vhost-vdpa: prepare for the multiqueue support

2021-06-20 Thread Jason Wang
Unlike vhost-kernel, vhost-vdpa adapts a single device multiqueue model. So we need to simply use virtqueue index as the vhost virtqueue index. This is a must for multiqueue to work for vhost-vdpa. Signed-off-by: Jason Wang --- hw/virtio/vhost-vdpa.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 07/18] vhost-vdpa: tweak the error label in vhost_vdpa_add()

2021-06-20 Thread Jason Wang
Introduce new error label to avoid the unnecessary checking of net pointer. Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client") Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/net/vhost-vdpa.c b/net

[PATCH 18/18] vhost-vdpa: multiqueue support

2021-06-20 Thread Jason Wang
This patch implements the multiqueue support for vhost-vdpa. This is done simply by reading the number of queue pairs from the config space and initialize the datapath and control path net client. Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 3 +- net/vhost-vdpa.c| 98 +++

[PATCH 14/18] net: introduce control client

2021-06-20 Thread Jason Wang
This patch introduces a boolean for the device has control queue which can accepts control command via network queue. The first user would be the control virtqueue support for vhost. Signed-off-by: Jason Wang --- include/net/net.h | 5 + net/net.c | 24 +--- 2 f

[PATCH 11/18] vhost-vdpa: classify one time request

2021-06-20 Thread Jason Wang
Vhost-vdpa uses one device multiqueue queue (pairs) model. So we need to classify the one time request (e.g SET_OWNER) and make sure those request were only called once per device. This is used for multiqueue support. Signed-off-by: Jason Wang --- hw/virtio/vhost-vdpa.c | 51 +++

[PATCH 15/18] vhost-net: control virtqueue support

2021-06-20 Thread Jason Wang
We assume there's no cvq in the past, this is not true when we need control virtqueue support for vhost-user backends. So this patch implements the control virtqueue support for vhost-net. As datapath, the control virtqueue is also required to be coupled with the NetClientState. The vhost_net_start

  1   2   >