Re: soc_name for supermicrox11-bmc machine: ast2400-a1 or ast2500-a1 ?

2022-10-25 Thread Cédric Le Goater
Hello Guenter On 10/24/22 22:56, Guenter Roeck wrote: Hi, I always wondered why I am having trouble running Linux on supermicrox11-bmc. Building the kernel with aspeed_g4_defconfig results in its clock running at ~20x the real clock speed, and kernels built with aspeed_g5_defconfig do not boot

Re: [RFC PATCH v2 2/8] vdpa: Save emulated features list in vhost_vdpa

2022-10-25 Thread Eugenio Perez Martin
On Tue, Oct 25, 2022 at 4:45 AM Jason Wang wrote: > > On Mon, Oct 24, 2022 at 5:26 PM Eugenio Perez Martin > wrote: > > > > On Mon, Oct 24, 2022 at 4:14 AM Jason Wang wrote: > > > > > > On Fri, Oct 21, 2022 at 4:56 PM Eugenio Perez Martin > > > wrote: > > > > > > > > On Fri, Oct 21, 2022 at 4:5

Re: [PATCH 2/4] vhost: toggle device callbacks using used event idx

2022-10-25 Thread Eugenio Perez Martin
On Mon, Oct 24, 2022 at 4:06 PM Michael S. Tsirkin wrote: > > On Mon, Oct 24, 2022 at 04:00:37PM +0200, Eugenio Perez Martin wrote: > > > > It's generally a waste that we don't use endian-ness annotations > > > > the way linux does. > > > > > > Yes, it's worth doing something similar sometime. > >

Re: [RFC 6/8] target/riscv: delete redundant check for zcd instructions in decode_opc

2022-10-25 Thread weiwei
On 2022/10/25 11:39, Alistair Francis wrote: On Fri, Sep 30, 2022 at 11:28 AM Weiwei Li wrote: All the check for Zcd instructions have been done in their trans function Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/translate.c | 7 --- 1 file changed, 7 dele

[PATCH v3] kset: fix memory leak when kset_register() returns error

2022-10-25 Thread Yang Yingliang via
Inject fault while loading module, kset_register() may fail. If it fails, the kset.kobj.name allocated by kobject_set_name() which must be called before a call to kset_register() may be leaked, since refcount of kobj was set in kset_init(). To mitigate this, we free the name in kset_register() whe

[PULL 2/8] linux-user: fix pidfd_send_signal()

2022-10-25 Thread Laurent Vivier
According to pidfd_send_signal(2), info argument can be a NULL pointer. Fix strace to correctly manage ending comma in parameters. Fixes: cc054c6f13 ("linux-user: Add pidfd_open(), pidfd_send_signal() and pidfd_getfd() syscalls") cc: Helge Deller Signed-off-by: Laurent Vivier Reviewed-by: Helge

[PULL 8/8] linux-user: Add guest memory layout to exception dump

2022-10-25 Thread Laurent Vivier
From: Helge Deller When the emulation stops with a hard exception it's very useful for debugging purposes to dump the current guest memory layout (for an example see /proc/self/maps) beside the CPU registers. The open_self_maps() function provides such a memory dump, but since it's located in th

[PULL 5/8] linux-user: add more compat ioctl definitions

2022-10-25 Thread Laurent Vivier
From: Daniel P. Berrangé GLibc changes prevent us from including linux/fs.h anymore, and we previously adjusted to this in commit 3cd3df2a9584e6f753bb62a0028bd67124ab5532 Author: Daniel P. Berrangé Date: Tue Aug 2 12:41:34 2022 -0400 linux-user: fix compat with glibc >= 2.36 sys/mo

[PULL 0/8] Linux user for 7.2 patches

2022-10-25 Thread Laurent Vivier
r/qemu.git tags/linux-user-for-7.2-pull-request for you to fetch changes up to bd5ccd61080abf976a6a6cc2d09d31299bea0cee: linux-user: Add guest memory layout to exception dump (2022-10-25 09:20:40 +0200) linux-user pull reques

Re: [PATCH v6 09/10] s390x: Add KVM PV dump interface

2022-10-25 Thread Janosch Frank
On 10/24/22 20:36, Marc-André Lureau wrote: Hi Janosch On Mon, Oct 17, 2022 at 12:53 PM Janosch Frank wrote: [...] diff --git a/include/hw/s390x/pv.h b/include/hw/s390x/pv.h index e5ea0eca16..3164006674 100644 --- a/include/hw/s390x/pv.h +++ b/include/hw/s390x/pv.h @@ -51,6 +51,10 @@ uint64_

[PULL v2 00/11] Dump patches

2022-10-25 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit e750a7ace492f0b450653d4ad368a77d6f660fb8: Merge tag 'pull-9p-20221024' of https://github.com/cschoenebeck/qemu into staging (2022-10-24 14:27:12 -0400) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qe

[PULL 1/8] linux-user: Fix more MIPS n32 syscall ABI issues

2022-10-25 Thread Laurent Vivier
From: WANG Xuerui In commit 80f0fe3a85 ("linux-user: Fix syscall parameter handling for MIPS n32") the ABI problem regarding offset64 on MIPS n32 was fixed, but still some cases remain where the n32 is incorrectly treated as any other 32-bit ABI that passes 64-bit arguments in pairs of GPRs. Fix

[PULL 6/8] linux-user: remove conditionals for many fs.h ioctls

2022-10-25 Thread Laurent Vivier
From: Daniel P. Berrangé These ioctls have been defined in linux/fs.h for a long time * BLKGETSIZE64 - <2.6.12 (linux.git epoch) * BLKDISCARD - 2.6.28 (d30a2605be9d5132d95944916e8f578fcfe4f976) * BLKIOMIN - 2.6.32 (ac481c20ef8f6c6f2be75d581863f40c43874ef7) * BLKIOOPT - 2.6.32 (ac481c20ef

[PULL v2 03/11] dump: Reorder struct DumpState

2022-10-25 Thread marcandre . lureau
From: Janosch Frank Let's move ELF related members into one block and guest memory related ones into another to improve readability. Signed-off-by: Janosch Frank Reviewed-by: Richard Henderson Reviewed-by: Marc-André Lureau Message-Id: <20221017083822.43118-4-fran...@linux.ibm.com> --- inclu

[PULL v2 04/11] dump: Reintroduce memory_offset and section_offset

2022-10-25 Thread marcandre . lureau
From: Janosch Frank section_offset will later be used to store the offset to the section data which will be stored last. For now memory_offset is only needed to make section_offset look nicer. Signed-off-by: Janosch Frank Reviewed-by: Marc-André Lureau Message-Id: <20221017083822.43118-5-fran.

[PULL v2 06/11] s390x: Add protected dump cap

2022-10-25 Thread marcandre . lureau
From: Janosch Frank Add a protected dump capability for later feature checking. Signed-off-by: Janosch Frank Reviewed-by: Steffen Eiden Reviewed-by: Thomas Huth Reviewed-by: Janis Schoetterl-Glausch Message-Id: <20221017083822.43118-7-fran...@linux.ibm.com> --- target/s390x/kvm/kvm_s390x.h

[PULL 3/8] linux-user: handle /proc/self/exe with execve() syscall

2022-10-25 Thread Laurent Vivier
If path is /proc/self/exe, use the executable path provided by exec_path. Don't use execfd as it is closed by loader_exec() and otherwise will survive to the exec() syscall and be usable child process. Signed-off-by: Laurent Vivier Message-Id: <20220927124357.688536-2-laur...@vivier.eu> Signed-o

[PULL v2 02/11] dump: Write ELF section headers right after ELF header

2022-10-25 Thread marcandre . lureau
From: Janosch Frank Let's start bundling the writes of the headers and of the data so we have a clear ordering between them. Since the ELF header uses offsets to the headers we can freely order them. Signed-off-by: Janosch Frank Reviewed-by: Marc-André Lureau Message-Id: <20221017083822.43118-

Re: [PATCH] tests/qtest/ac97-test: add up-/downsampling tests

2022-10-25 Thread Marc-André Lureau
Hi On Tue, Oct 25, 2022 at 12:31 AM Volker Rümelin wrote: > > Am 24.10.22 um 10:13 schrieb Marc-André Lureau: > > Hi > > > > On Mon, Oct 24, 2022 at 9:28 AM Volker Rümelin > > wrote: > > > > Test if the audio subsystem can handle extreme up- and down- > > sampling ratios like 44100/1 and

[PULL v2 11/11] dump/win_dump: limit number of processed PRCBs

2022-10-25 Thread marcandre . lureau
From: Viktor Prutyanov When number of CPUs utilized by guest Windows is less than defined in QEMU (i.e., desktop versions of Windows severely limits number of CPU sockets), patch_and_save_context routine accesses non-existent PRCB and fails. So, limit number of processed PRCBs by NumberProcessors

[PULL v2 05/11] dump: Add architecture section and section string table support

2022-10-25 Thread marcandre . lureau
From: Janosch Frank Add hooks which architectures can use to add arbitrary data to custom sections. Also add a section name string table in order to identify section contents Signed-off-by: Janosch Frank Reviewed-by: Marc-André Lureau Message-Id: <20221017113210.41674-1-fran...@linux.ibm.com>

[PULL v2 10/11] s390x: pv: Add dump support

2022-10-25 Thread marcandre . lureau
From: Janosch Frank Sometimes dumping a guest from the outside is the only way to get the data that is needed. This can be the case if a dumping mechanism like KDUMP hasn't been configured or data needs to be fetched at a specific point. Dumping a protected guest from the outside without help fro

[PULL v2 07/11] s390x: Introduce PV query interface

2022-10-25 Thread marcandre . lureau
From: Janosch Frank Introduce an interface over which we can get information about UV data. Signed-off-by: Janosch Frank Reviewed-by: Steffen Eiden Reviewed-by: Janis Schoetterl-Glausch Acked-by: Thomas Huth Message-Id: <20221017083822.43118-8-fran...@linux.ibm.com> --- include/hw/s390x/pv.

[PULL 4/8] linux-user: don't use AT_EXECFD in do_openat()

2022-10-25 Thread Laurent Vivier
AT_EXECFD gives access to the binary file even if it is not readable (only executable). Moreover it can be opened with flags and mode that are not the ones provided by do_openat() caller. And it is not available because loader_exec() has closed it. To avoid that, use only safe_openat() with the

[PULL 16/28] qapi net: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/net.json. Said commit explains the transforma

[PULL 13/28] qapi machine: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/machine*.json. Said commit explains the trans

[PULL 28/28] qapi: Drop temporary logic to support conversion step by step

2022-10-25 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrangé Message-Id: <20221018062849.3420573-29-arm...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé --- scripts/qapi/schema.py | 6 -- 1 file changed, 6 deletions(-) diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py inde

[PULL 15/28] qapi misc: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/misc.json. Said commit explains the transform

[PULL 02/28] qapi: Tidy up whitespace in generated code

2022-10-25 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrangé Message-Id: <20221018062849.3420573-3-arm...@redhat.com> --- docs/devel/qapi-code-gen.rst | 1 - scripts/qapi/commands.py | 7 +++ scripts/qapi/events.py | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff -

[PULL 12/28] qapi job: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/job.json. Said commit explains the transforma

[PULL 00/11] Trivial branch for 7.2 patches

2022-10-25 Thread Laurent Vivier
r/qemu.git tags/trivial-branch-for-7.2-pull-request for you to fetch changes up to 046ab3b80891f4aa6d0cfd7db15c622b1933e598: accel/tcg/tcg-accel-ops-rr: fix trivial typo (2022-10-24 13:43:42 +0200) Trivial branch pull reques

[PULL 00/11] Trivial branch for 7.2 patches

2022-10-25 Thread Laurent Vivier
r/qemu.git tags/trivial-branch-for-7.2-pull-request for you to fetch changes up to 046ab3b80891f4aa6d0cfd7db15c622b1933e598: accel/tcg/tcg-accel-ops-rr: fix trivial typo (2022-10-24 13:43:42 +0200) Trivial branch pull reques

[PULL 18/28] qapi qdev qom: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/qdev.json and qapi/qom.json. Said commit expl

[PULL 22/28] qapi stats: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/stats.json. Said commit explains the transfor

[PULL 24/28] qapi transaction: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/transaction.json. Said commit explains the tr

[PULL 00/28] QAPI patches patches for 2022-10-25

2022-10-25 Thread Markus Armbruster
The following changes since commit e750a7ace492f0b450653d4ad368a77d6f660fb8: Merge tag 'pull-9p-20221024' of https://github.com/cschoenebeck/qemu into staging (2022-10-24 14:27:12 -0400) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qapi-2022-10-25 for

[PULL v2 01/11] dump: Use a buffer for ELF section data and headers

2022-10-25 Thread marcandre . lureau
From: Janosch Frank Currently we're writing the NULL section header if we overflow the physical header number in the ELF header. But in the future we'll add custom section headers AND section data. To facilitate this we need to rearange section handling a bit. As with the other ELF headers we sp

[PULL 27/28] qapi qga: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qga/qapi-schema.json. Said commit explains the tra

[PULL v2 08/11] include/elf.h: add s390x note types

2022-10-25 Thread marcandre . lureau
From: Janosch Frank Adding two s390x note types Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth Message-Id: <20221017083822.43118-9-fran...@linux.ibm.com> --- include/elf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/elf.h b/include/elf.h index 3d6b9062c0..8bf1e72720 1

[PULL 03/28] docs/devel/qapi-code-gen: Extend example for next commit's change

2022-10-25 Thread Markus Armbruster
The next commit will change the code generated for some optional members. The example schema contains an optional member affected by the change. Add one that is not affected. Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrangé Message-Id: <20221018062849.3420573-4-arm...@redhat.co

[PULL 11/28] qapi dump: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/dump.json. Said commit explains the transform

[PULL 04/28] qapi: Start to elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
In QAPI, absent optional members are distinct from any present value. We thus represent an optional schema member FOO as two C members: a FOO with the member's type, and a bool has_FOO. Likewise for function arguments. However, has_FOO is actually redundant for a pointer-valued FOO, which can be

[PULL 19/28] qapi replay: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/replay.json. Said commit explains the transfo

[PULL 00/11] Trivial branch for 7.2 patches

2022-10-25 Thread Laurent Vivier
r/qemu.git tags/trivial-branch-for-7.2-pull-request for you to fetch changes up to 046ab3b80891f4aa6d0cfd7db15c622b1933e598: accel/tcg/tcg-accel-ops-rr: fix trivial typo (2022-10-24 13:43:42 +0200) Trivial branch pull reques

[PULL 10/28] qapi crypto: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/crypto.json. Said commit explains the transfo

[PULL 09/28] qapi chardev: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/char.json. Said commit explains the transform

[PULL 00/11] Trivial branch for 7.2 patches

2022-10-25 Thread Laurent Vivier
r/qemu.git tags/trivial-branch-for-7.2-pull-request for you to fetch changes up to 046ab3b80891f4aa6d0cfd7db15c622b1933e598: accel/tcg/tcg-accel-ops-rr: fix trivial typo (2022-10-24 13:43:42 +0200) Trivial branch pull reques

[PULL 00/11] Trivial branch for 7.2 patches

2022-10-25 Thread Laurent Vivier
The following changes since commit 0529245488865038344d64fff7ee05864d3d17f6: Merge tag 'pull-target-arm-20221020' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2022-10-20 14:36:12 -0400) are available in the Git repository at: https://gitlab.com/laurent_vivier/qemu.git

[PULL 01/28] docs/devel/qapi-code-gen: Update example to match current code

2022-10-25 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrangé Message-Id: <20221018062849.3420573-2-arm...@redhat.com> --- docs/devel/qapi-code-gen.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst index cd9b544

[PULL 05/28] qapi tests: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for tests/qapi-schema/qapi-schema-test.json. Said comm

[PULL 26/28] qapi virtio: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/virtio.json. Said commit explains the transfo

[PULL 06/28] qapi acpi: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/acpi.py. Said commit explains the transformat

[PULL 25/28] qapi ui: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/ui.json. Said commit explains the transformat

[PULL 20/28] qapi rocker: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/rocker.json. Said commit explains the transfo

[PULL 07/28] qapi audio: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/audio.json. Said commit explains the transfor

[PULL 7/8] linux-user: Implement faccessat2

2022-10-25 Thread Laurent Vivier
From: WANG Xuerui User space has been preferring this syscall for a while, due to its closer match with C semantics, and newer platforms such as LoongArch apparently have libc implementations that don't fallback to faccessat so normal access checks are failing without the emulation in place. Tes

[PULL 14/28] qapi migration: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/migration.json. Said commit explains the tran

[PULL 17/28] qapi pci: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/pci.json. Said commit explains the transforma

Re: [PATCH 1/2] python/machine: Add debug logging to key state changes

2022-10-25 Thread Daniel P . Berrangé
On Mon, Oct 24, 2022 at 03:53:54PM -0400, John Snow wrote: > When key decisions are made about the lifetime of the VM process being > managed, there's no log entry. Juxtaposed with the very verbose runstate > change logging of the QMP module, machine seems a bit too introverted > now. > > Season t

[PULL 21/28] qapi run-state: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/run-state.json. Said commit explains the tran

[PATCH v3 04/10] blockjob: implement .change_aio_ctx in child_job

2022-10-25 Thread Emanuele Giuseppe Esposito
child_job_change_aio_ctx() is very similar to child_job_can_set_aio_ctx(), but it implements a new transaction so that if all check pass, the new transaction's .commit() will take care of changin the BlockJob AioContext. child_job_set_aio_ctx_commit() is similar to child_job_set_aio_ctx(), but it d

[PATCH v3 02/10] block: use transactions as a replacement of ->{can_}set_aio_context()

2022-10-25 Thread Emanuele Giuseppe Esposito
Simplify the way the aiocontext can be changed in a BDS graph. There are currently two problems in bdrv_try_set_aio_context: - There is a confusion of AioContext locks taken and released, because we assume that old aiocontext is always taken and new one is taken inside. - It doesn't look very

[PULL 23/28] qapi tpm: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/tpm.json. Said commit explains the transforma

[PATCH v3 00/10] Refactor bdrv_try_set_aio_context using transactions

2022-10-25 Thread Emanuele Giuseppe Esposito
The aim of this series is to reorganize bdrv_try_set_aio_context and drop BDS ->set_aio_context and ->can_set_aio_ctx callbacks in favour of a new one, ->change_aio_ctx. More informations in patch 3 (which is also RFC, due to the doubts I have with AioContext locks). Patch 1 just add assertions i

[PATCH v3 06/10] block-backend: implement .change_aio_ctx in child_root

2022-10-25 Thread Emanuele Giuseppe Esposito
blk_root_change_aio_ctx() is very similar to blk_root_can_set_aio_ctx(), but implements a new transaction so that if all check pass, the new transaction's .commit will take care of changing the BlockBackend AioContext. blk_root_set_aio_ctx_commit() is the same as blk_root_set_aio_ctx(). Note: bdrv

[PULL v2 09/11] s390x: Add KVM PV dump interface

2022-10-25 Thread marcandre . lureau
From: Janosch Frank Let's add a few bits of code which hide the new KVM PV dump API from us via new functions. Signed-off-by: Janosch Frank Reviewed-by: Janis Schoetterl-Glausch Reviewed-by: Steffen Eiden [ Marc-André: fix up for compilation issue ] Signed-off-by: Marc-André Lureau Message-I

[PATCH v3 01/10] block.c: assert bs->aio_context is written under BQL and drains

2022-10-25 Thread Emanuele Giuseppe Esposito
Also here ->aio_context is read by I/O threads and written under BQL. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Reviewed-by: Hanna Reitz --- block.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block.c b/block.c index 554ce727c3..529be80759 100644 --- a/block.c

[PATCH v3 10/10] block: remove bdrv_try_set_aio_context and replace it with bdrv_try_change_aio_context

2022-10-25 Thread Emanuele Giuseppe Esposito
No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf --- block.c| 14 -- block/export/export.c | 2 +- blockdev.c | 22 +++--- docs/devel/multiple-iothreads.

Re: [PATCH 07/24] accel/tcg: Drop cpu_get_tb_cpu_state from TARGET_HAS_PRECISE_SMC

2022-10-25 Thread Alex Bennée
Richard Henderson writes: > The results of the calls to cpu_get_tb_cpu_state, > current_{pc,cs_base,flags}, are not used. > In tb_invalidate_phys_page, use bool for current_tb_modified. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 01/29] accel/tcg: Add restore_state_to_opc to TCGCPUOps

2022-10-25 Thread Claudio Fontana
On 10/24/22 17:15, Richard Henderson wrote: > On 10/25/22 01:05, Claudio Fontana wrote: >> On 10/24/22 15:24, Richard Henderson wrote: >>> Add a tcg_ops hook to replace the restore_state_to_opc >>> function call. Because these generic hooks cannot depend >>> on target-specific types, temporarily,

Re: [PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-25 Thread Greg Kurz
On Mon, 24 Oct 2022 10:44:11 +0100 Alex Bennée wrote: > > Paolo Bonzini writes: > > > >> If we want to connect stdout/err to something when daemonized > >> then lets either have a dedicated option for that, or simply > >> tell apps not to use -daemonize and to take care of daemonzing > >> the

Re: [PATCH 23/29] accel/tcg: Remove restore_state_to_opc function

2022-10-25 Thread Claudio Fontana
Reviewed-by: Claudio Fontana On 10/24/22 15:24, Richard Henderson wrote: > All targets have been updated. Use the tcg_ops target hook > exclusively, which allows the compat code to be removed. > > Signed-off-by: Richard Henderson > --- > include/exec/exec-all.h | 3 --- > accel/tcg/transla

[PATCH v3 08/10] block: remove all unused ->can_set_aio_ctx and ->set_aio_ctx callbacks

2022-10-25 Thread Emanuele Giuseppe Esposito
Together with all _can_set_ and _set_ APIs, as they are not needed anymore. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf --- block.c| 196 - block/block-backend.c | 33 - blockjob.c

[PATCH v3 05/10] block: implement .change_aio_ctx in child_of_bds

2022-10-25 Thread Emanuele Giuseppe Esposito
bdrv_child_cb_change_aio_ctx() is identical to bdrv_child_cb_can_set_aio_ctx(), as we only need to recursively go on the parent bs. Note: bdrv_child_try_change_aio_context() is not called by anyone at this point. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Hanna Reitz Reviewed-by: Ke

Re: [PATCH 03/24] accel/tcg: Remove disabled debug in translate-all.c

2022-10-25 Thread Alex Bennée
Richard Henderson writes: > These items printf, and could be replaced with proper > tracepoints if we really cared. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 02/24] accel/tcg: Make page_alloc_target_data allocation constant

2022-10-25 Thread Alex Bennée
Richard Henderson writes: > Use a constant target data allocation size for all pages. > This will be necessary to reduce overhead of page tracking. > Since TARGET_PAGE_DATA_SIZE is now required, we can use this > to omit data tracking for targets that don't require it. > > Signed-off-by: Richar

Re: [PATCH 06/24] accel/tcg: Move assert_no_pages_locked to internal.h

2022-10-25 Thread Alex Bennée
Richard Henderson writes: > There are no users outside of accel/tcg; this function > does not need to be defined in exec-all.h. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

[PULL 08/28] qapi block: Elide redundant has_FOO in generated C

2022-10-25 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/block*.json. Said commit explains the transfo

[PATCH v3 03/10] bdrv_change_aio_context: use hash table instead of list of visited nodes

2022-10-25 Thread Emanuele Giuseppe Esposito
Minor performance improvement, but given that we have hash tables available, avoid iterating in the visited nodes list every time just to check if a node has been already visited. The data structure is not actually a proper hash map, but an hash set, as we are just adding nodes and not key,value p

Re: [PATCH v7 10/12] multifd: Support for zero pages transmission

2022-10-25 Thread chuang xu
On 2022/8/2 下午2:39, Juan Quintela wrote: This patch adds counters and similar. Logic will be added on the following patch. Signed-off-by: Juan Quintela --- Added counters for duplicated/non duplicated pages. Removed reviewed by from David. Add total_zero_pages --- migration/multifd.h

Re: [PATCH 05/24] accel/tcg: Split out tb-maint.c

2022-10-25 Thread Alex Bennée
Richard Henderson writes: > Move all of the TranslationBlock flushing and page linking > code from translate-all.c to tb-maint.c. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 01/24] util: Add interval-tree.c

2022-10-25 Thread Alex Bennée
Richard Henderson writes: > Copy and simplify the Linux kernel's interval_tree_generic.h, > instantiating for uint64_t. > > Signed-off-by: Richard Henderson > --- > diff --git a/util/interval-tree.c b/util/interval-tree.c > new file mode 100644 > index 00..9578c05830 > --- /dev/null >

[PATCH v3 09/10] block: rename bdrv_child_try_change_aio_context in bdrv_try_change_aio_context

2022-10-25 Thread Emanuele Giuseppe Esposito
No functional changes intended. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf --- block.c| 6 +++--- block/block-backend.c | 3 +-- include/block/block-global-state.h | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --

Re: [PATCH 04/24] accel/tcg: Split out PageDesc to internal.h

2022-10-25 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 08/24] accel/tcg: Remove duplicate store to tb->page_addr[]

2022-10-25 Thread Alex Bennée
Richard Henderson writes: > When we added the fast path, we initialized page_addr[] early. > These stores in and around tb_page_add() are redundant; remove them. > > Fixes: 50627f1b7b1 ("accel/tcg: Add fast path for translator_ld*") > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée

Re: [RFC PATCH 4/4] migration/multifd/zero-copy: Flush only the LRU half of the header array

2022-10-25 Thread Daniel P . Berrangé
On Tue, Oct 25, 2022 at 01:47:31AM -0300, Leonardo Bras wrote: > Zero-copy multifd migration sends both the header and the memory pages in a > single syscall. Since it's necessary to flush before reusing the header, a > header array was implemented, so each write call uses a different > array, and

[PATCH v3 07/10] block: use the new _change_ API instead of _can_set_ and _set_

2022-10-25 Thread Emanuele Giuseppe Esposito
Replace all direct usage of ->can_set_aio_ctx and ->set_aio_ctx, and call bdrv_child_try_change_aio_context() in bdrv_try_set_aio_context(), the main function called through the whole block layer. >From this point onwards, ->can_set_aio_ctx and ->set_aio_ctx won't be used anymore. Signed-off-by:

Re: [PATCH] tests/tcg/nios2: Tweak 10m50-ghrd.ld

2022-10-25 Thread Claudio Fontana
This is unrelated to the "tcg: Fix x86 TARGET_TB_PCREL (#1269)" series right? For some reason it appears to me as part of it, as a reply to the cover letter. Ignoring this one as I don't understand it at all. Ciao, C On 10/24/22 15:24, Richard Henderson wrote: > More closely follow the default

Re: [PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-25 Thread Paolo Bonzini
On 10/24/22 11:44, Alex Bennée wrote: Paolo Bonzini writes: If we want to connect stdout/err to something when daemonized then lets either have a dedicated option for that, or simply tell apps not to use -daemonize and to take care of daemonzing themselves, thus having full control over stdo

[PATCH] util/log: do not close and reopen log files when flags are turned off

2022-10-25 Thread Paolo Bonzini
log_append makes sure that if you turn off the logging (which clears log_flags and makes need_to_open_file false) the old log is not overwritten. The usecase is that if you remove or move the file QEMU will not keep writing to the old file. However, this is not always the desited behavior, in par

Re: [PATCH 24/29] accel/tcg: Introduce cpu_unwind_state_data

2022-10-25 Thread Claudio Fontana
On 10/24/22 15:24, Richard Henderson wrote: > Add a way to examine the unwind data without actually > restoring the data back into env. > > Signed-off-by: Richard Henderson > --- > include/exec/exec-all.h | 13 > accel/tcg/translate-all.c | 68 ++- >

Re: [PULL 00/11] Trivial branch for 7.2 patches

2022-10-25 Thread Laurent Vivier
3:42 +0200) Trivial branch pull request 20221025 Sorry for the duplicate messages but I have some issues with git-publish that doesn't send the emails. This PR is correct and the tags has been updated correctly i

Re: [PATCH 24/29] accel/tcg: Introduce cpu_unwind_state_data

2022-10-25 Thread Claudio Fontana
On 10/25/22 11:23, Claudio Fontana wrote: > On 10/24/22 15:24, Richard Henderson wrote: >> Add a way to examine the unwind data without actually >> restoring the data back into env. >> >> Signed-off-by: Richard Henderson >> --- >> include/exec/exec-all.h | 13 >> accel/tcg/translate-al

Re: [RFC PATCH 1/4] migration/multifd/zero-copy: Create helper function for flushing

2022-10-25 Thread Juan Quintela
Leonardo Bras wrote: > Move flushing code from multifd_send_sync_main() to a new helper, and call > it in multifd_send_sync_main(). > > Signed-off-by: Leonardo Bras Reviewed-by: Juan Quintela

Re: [PATCH 09/24] accel/tcg: Introduce tb_{set_}page_addr{0,1}

2022-10-25 Thread Alex Bennée
Richard Henderson writes: > This data structure will be replaced for user-only: add accessors. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 10/24] accel/tcg: Rename tb_invalidate_phys_page

2022-10-25 Thread Alex Bennée
Richard Henderson writes: > Rename to tb_invalidate_phys_page_unwind to emphasize that > we also detect invalidating the current TB, and also to free > up that name for other usage. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [RFC PATCH 2/4] migration/multifd/zero-copy: Merge header & pages send in a single write

2022-10-25 Thread Juan Quintela
Leonardo Bras wrote: > When zero-copy-send is enabled, each loop iteration of the > multifd_send_thread will calls for qio_channel_write_*() twice: The first > one for sending the header without zero-copy flag and the second one for > sending the memory pages, with zero-copy flag enabled. > > This

Re: [PATCH] avocado: use sha1 for fc31 imgs to avoid first time re-download

2022-10-25 Thread Daniel Henrique Barboza
On 10/24/22 06:02, Daniel P. Berrangé wrote: On Sat, Oct 22, 2022 at 02:03:50PM -0300, Daniel Henrique Barboza wrote: 'make check-avocado' will download any images that aren't present in the cache via 'get-vm-images' in tests/Makefile.include. The target that downloads fedora 31 images, get-v

Re: [PATCH 1/9] target/s390x: Use a single return for helper_divs32/u32

2022-10-25 Thread Philippe Mathieu-Daudé
On 21/10/22 09:29, Richard Henderson wrote: Pack the quotient and remainder into a single uint64_t. Signed-off-by: Richard Henderson --- target/s390x/helper.h | 2 +- target/s390x/tcg/int_helper.c | 26 +- target/s390x/tcg/translate.c | 10 ++ 3 fi

Re: [PATCH 8/9] target/s390x: Use Int128 for returning float128

2022-10-25 Thread Philippe Mathieu-Daudé
On 21/10/22 09:30, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/s390x/helper.h | 22 +++ target/s390x/tcg/fpu_helper.c | 29 ++-- target/s390x/tcg/translate.c | 49 +++--- target/s390x/tcg/insn-data.

  1   2   3   4   >