Re: ARI and igb emulation

2023-06-27 Thread Ani Sinha
> On 27-Jun-2023, at 8:09 PM, Michael S. Tsirkin wrote: > > On Tue, Jun 27, 2023 at 08:02:46PM +0530, Ani Sinha wrote: >> Hi : >> I am proposing a patch in QEMU [1] which may or may not break ARI but I >> wanted to give my best shot in making sure I am not breaking anything with >> ARI enabl

Re: [PATCH v4 20/24] nbd/client: Accept 64-bit block status chunks

2023-06-27 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: Once extended mode is enabled, we need to accept 64-bit status replies (even for replies that don't exceed a 32-bit length). It is easier to normalize narrow replies into wide format so that the rest of our code only has to handle one width. Although a serve

Re: [PATCH qemu v4 2/2] tests/tcg/aarch64: Add testcases for IC IVAU and dual-mapped code

2023-06-27 Thread Peter Maydell
On Mon, 26 Jun 2023 at 15:15, ~jhogberg wrote: > > From: John Högberg > > https://gitlab.com/qemu-project/qemu/-/issues/1034 > > Signed-off-by: John Högberg > +static int self_modification_test(uint32_t *rw_data, const uint32_t > *exec_data) > +{ > +/* > + * This test is self-modifyin

Re: [PATCH v4 21/24] nbd/client: Request extended headers during negotiation

2023-06-27 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: All the pieces are in place for a client to finally request extended headers. Note that we must not request extended headers when qemu-nbd is used to connect to the kernel module (as nbd.ko does not expect them, but expects us to do the negotiation in userspa

Re: [PATCH qemu v4 0/2] target/arm: Improve user-mode compatibility with JITs

2023-06-27 Thread Peter Maydell
On Mon, 26 Jun 2023 at 15:15, ~jhogberg wrote: > > Changes since v3: > > 1) Reworded the first commit comment to note that the need to clear >cache is implementation-dependent. > 2) CTR_EL0.DIC is now cleared in user mode to indicate that IC IVAU >must be used. > 3) The test case now only

Re: [PULL 04/33] virtio-gpu: Optimize 2D resource data transfer

2023-06-27 Thread Richard Henderson
On 6/27/23 15:02, marcandre.lur...@redhat.com wrote: From: Keqian Zhu via You need to fix the author for this patch. r~

Re: [PULL 04/33] virtio-gpu: Optimize 2D resource data transfer

2023-06-27 Thread Marc-André Lureau
Hi On Tue, Jun 27, 2023 at 5:04 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 6/27/23 15:02, marcandre.lur...@redhat.com wrote: > > From: Keqian Zhu via > > You need to fix the author for this patch. > > > ok done, do you want me to re-send the whole PR or is that enough? The

Re: [PATCH v4 22/24] nbd/server: Refactor list of negotiated meta contexts

2023-06-27 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: Peform several minor refactorings of how the list of negotiated meta contexts is managed, to make upcoming patches easier: Promote the internal type NBDExportMetaContexts to the public opaque type NBDMetaContexts, and mark exp const. Use a shorter member name

[PATCH] linux-user/elfload: Fix /proc/cpuinfo features: on s390x

2023-06-27 Thread Ilya Leoshkevich
elf_hwcap_str() takes a bit number, but compares it for equality with the HWCAP_S390_* masks. This causes /proc/cpuinfo to display incorrect hwcaps. Fix by introducing the HWCAP_S390_NR_* constants and using them in elf_hwcap_str() instead of the HWCAP_S390_*. While at it, add the missing nnpa, pc

Re: [PATCH v3 00/16] accel: Share CPUState accel context (HAX/NVMM/WHPX/HVF)

2023-06-27 Thread Philippe Mathieu-Daudé
On 24/6/23 19:41, Philippe Mathieu-Daudé wrote: This series is part of the single binary effort. All accelerator will share their per-vCPU context in an opaque 'accel' pointer within the CPUState. First handle HAX/NVMM/WHPX/HVF. KVM and TCG will follow as two different (bigger) follow-up series

Re: [PATCH v4 0/8] gdbstub: Add support for info proc mappings

2023-06-27 Thread Alex Bennée
Ilya Leoshkevich writes: > v3: https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg01311.html > v3 -> v4: Fix the 32-bit build (Alex). > Enable the test on all architectures and ignore certain > expected failures (Alex). I tried this with the latest > gdb-mult

Re: [Libguestfs] [PATCH v4 23/24] nbd/server: Prepare for per-request filtering of BLOCK_STATUS

2023-06-27 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 22:15, Eric Blake wrote: On Thu, Jun 08, 2023 at 08:56:52AM -0500, Eric Blake wrote: The next commit will add support for the optional extension NBD_CMD_FLAG_PAYLOAD during NBD_CMD_BLOCK_STATUS, where the client can request that the server only return a subset of negotiated contexts,

Re: [PATCH v2 4/4] target/ppc: Implement attn instruction on BookS 64-bit processors

2023-06-27 Thread Fabiano Rosas
Nicholas Piggin writes: > attn is an implementation-specific instruction that on POWER (and G5/ > 970) can be enabled with a HID bit (disabled = illegal), and executing > it causes the host processor to stop and the service processor to be > notified. Generally used for debugging. > > Implement a

Re: [PATCH qemu v4 0/2] target/arm: Improve user-mode compatibility with JITs

2023-06-27 Thread John Högberg
> Since there were only a couple of minor nits in this version > of the patchset I'm going to apply it to target-arm.next > and make those fixups in my tree. Thanks for this bug fix! Great, thanks for reviewing it :-) /John

Re: [PATCH 1/1] hw/arm/sbsa-ref: add PCIe node into DT

2023-06-27 Thread Leif Lindholm
On 2023-06-27 15:27, Peter Maydell wrote: Serious question: would it be preferable if we moved to a custom DT node where we stick everything in as KEY=VALUE pairs to reduce this confusion? I don't really mind, I just want it to be clear what is going on here so that when I'm reviewing patches I

Re: [PATCH v2 3/4] pc-bios/s390-ccw: Move the stack array into start.S

2023-06-27 Thread Thomas Huth
On 27/06/2023 09.47, Thomas Huth wrote: The stack array is only referenced from the start-up code (which is shared between the s390-ccw.img and the s390-netboot.img), but it is currently declared twice, once in main.c and once in netmain.c. It makes more sense to declare this in start.S instead -

[PATCH v3 02/36] gitlab: ensure coverage job also publishes meson log

2023-06-27 Thread Alex Bennée
From: Daniel P. Berrangé The coverage job wants to publish a coverage report on success, but the tests might fail and in that case we need the meson logs for debugging. Signed-off-by: Daniel P. Berrangé Reviewed-by: Richard Henderson Message-Id: <20230623122100.1640995-3-alex.ben...@linaro.org

[PATCH v3 03/36] gitlab: reduce testing scope of check-gcov

2023-06-27 Thread Alex Bennée
This keeps timing out on gitlab due to some qtests taking a long time. As this is just ensuring the gcov machinery is working and not attempting to be comprehensive lets skip qtest in this run. Message-Id: <20230623122100.1640995-4-alex.ben...@linaro.org> Reviewed-by: Richard Henderson Signed-off

[PATCH v3 16/36] tests/avocado: update firmware to enable sbsa-ref/max

2023-06-27 Thread Alex Bennée
From: Marcin Juszkiewicz Update prebuilt firmware images to have TF-A with FEAT_FGT support enabled. This allowed us to enable test for "max" cpu in sbsa-ref machine. Signed-off-by: Marcin Juszkiewicz Message-Id: <20230530152240.79160-1-marcin.juszkiew...@linaro.org> Signed-off-by: Alex Bennée

[PATCH v3 01/36] gitlab: explicit set artifacts publishing criteria

2023-06-27 Thread Alex Bennée
From: Daniel P. Berrangé If not set explicitly, gitlab assumes 'when: on_success" as the publishing criteria for artifacts. This is reasonable if the artifact is an output deliverable of the job. This is useless if the artifact is a log file to be used for debugging job failures. This change mak

[PATCH v3 13/36] tests/lcitool: add an explicit gcc-native package

2023-06-27 Thread Alex Bennée
We need a native compiler to build the hexagon codegen tools. In our current images we already have a gcc as a side effect of a broken dependency between gcovr and lcov but this will be fixed when we move to bookworm. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987818 for details. Update

[PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR)

2023-06-27 Thread Alex Bennée
As softfreeze is fast approaching I thought it would be work combining my various trees into an omnibus series to ease the review and merging. The testing updates exposed a number of latent leaks that confused the oss-fuzz jobs (hence the test-fuzz addition to help debug that). This also includes

[PATCH v3 10/36] Makefile: add lcitool-refresh to UNCHECKED_GOALS

2023-06-27 Thread Alex Bennée
This is yet another make target you usually run in the top level of the source directory. Message-Id: <20230623122100.1640995-12-alex.ben...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 14/36] tests/lcitool: introduce qemu-minimal

2023-06-27 Thread Alex Bennée
This is a very bare bones set of dependencies for a minimal build of QEMU. This will be useful for minimal cross-compile sanity check based on things like Debian Sid where stuff isn't always in sync. Message-Id: <20230623122100.1640995-16-alex.ben...@linaro.org> Signed-off-by: Alex Bennée --- v2

[PATCH v3 15/36] tests/docker: convert riscv64-cross to lcitool

2023-06-27 Thread Alex Bennée
We still need to base this on Debian Sid until riscv64 is promoted to a release architecture (or another distro provides a full cross compile target). We use the new qemu-minimal project description to avoid bringing in all the extra dependencies because every extra package is another chance for si

[PATCH v3 04/36] docs/devel: remind developers to run CI container pipeline when updating images

2023-06-27 Thread Alex Bennée
From: Ani Sinha When new dependencies and packages are added to containers, its important to run CI container generation pipelines on gitlab to make sure that there are no obvious conflicts between packages that are being added and those that are already present. Running CI container pipelines wi

[PATCH v3 05/36] tests/tcg: add mechanism to handle plugin arguments

2023-06-27 Thread Alex Bennée
We recently missed a regression that should have been picked up by check-tcg. This was because the libmem plugin is effectively a NOP if the user doesn't specify the type to use. Rather than changing the default behaviour add an additional expansion so we can take this into account in future. Mes

[PATCH v3 06/36] qemu-keymap: properly check return from xkb_keymap_mod_get_index

2023-06-27 Thread Alex Bennée
We can return XKB_MOD_INVALID for AltGr which rightly gets flagged by sanitisers as an overly wide shift attempt. Properly check the return type and leave the bitmap as zero in that case. Tested output before and after is unchanged with the gb and ara keymaps. Signed-off-by: Alex Bennée Reviewed-

[PATCH v3 09/36] tests/docker: add test-fuzz

2023-06-27 Thread Alex Bennée
Running the fuzzer requires some hoop jumping and some problems only show up in containers. This basically replicates the build-oss-fuzz job from our CI so we can run in the same containers we use in CI. Message-Id: <20230626215926.2522656-10-alex.ben...@linaro.org> Reviewed-by: Alexander Bulekov

[PATCH v3 11/36] tests/lcitool: update to latest version

2023-06-27 Thread Alex Bennée
We need this for the riscv64 and gcc-native mappings. As the older alpine release has been dropped from the mappings we also need to bump the version of alpine we use. Message-Id: <20230623122100.1640995-13-alex.ben...@linaro.org> Acked-by: Richard Henderson Signed-off-by: Alex Bennée --- tests

[PATCH v3 12/36] tests/lcitool: Bump fedora container versions

2023-06-27 Thread Alex Bennée
From: Erik Skultety Fedora 37 -> 38 Signed-off-by: Erik Skultety Acked-by: Richard Henderson Message-Id: <20230623122100.1640995-14-alex.ben...@linaro.org> Message-Id: [AJB: Dropped alpine (in prev commit), reflow commit msg] Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/fedora-w

[PATCH v3 13/36] tests/lcitool: add an explicit gcc-native package

2023-06-27 Thread Alex Bennée
We need a native compiler to build the hexagon codegen tools. In our current images we already have a gcc as a side effect of a broken dependency between gcovr and lcov but this will be fixed when we move to bookworm. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987818 for details. Update

[PATCH v3 07/36] scripts/oss-fuzz: add a suppression for keymap

2023-06-27 Thread Alex Bennée
When updating to the latest fedora the santizer found more leaks inside xkbmap: FAILED: pc-bios/keymaps/ar /builds/stsquad/qemu/build-oss-fuzz/qemu-keymap -f pc-bios/keymaps/ar -l ara = ==3604==ERROR: LeakSanitizer: detected m

[PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation, gdbstub (pre-PR)

2023-06-27 Thread Alex Bennée
As softfreeze is fast approaching I thought it would be work combining my various trees into an omnibus series to ease the review and merging. The testing updates exposed a number of latent leaks that confused the oss-fuzz jobs (hence the test-fuzz addition to help debug that). This also includes

[PATCH v3 16/36] tests/avocado: update firmware to enable sbsa-ref/max

2023-06-27 Thread Alex Bennée
From: Marcin Juszkiewicz Update prebuilt firmware images to have TF-A with FEAT_FGT support enabled. This allowed us to enable test for "max" cpu in sbsa-ref machine. Signed-off-by: Marcin Juszkiewicz Message-Id: <20230530152240.79160-1-marcin.juszkiew...@linaro.org> Signed-off-by: Alex Bennée

[PATCH v3 14/36] tests/lcitool: introduce qemu-minimal

2023-06-27 Thread Alex Bennée
This is a very bare bones set of dependencies for a minimal build of QEMU. This will be useful for minimal cross-compile sanity check based on things like Debian Sid where stuff isn't always in sync. Message-Id: <20230623122100.1640995-16-alex.ben...@linaro.org> Signed-off-by: Alex Bennée --- v2

[PATCH v3 07/36] scripts/oss-fuzz: add a suppression for keymap

2023-06-27 Thread Alex Bennée
When updating to the latest fedora the santizer found more leaks inside xkbmap: FAILED: pc-bios/keymaps/ar /builds/stsquad/qemu/build-oss-fuzz/qemu-keymap -f pc-bios/keymaps/ar -l ara = ==3604==ERROR: LeakSanitizer: detected m

[PATCH v3 34/36] gdbstub: Add support for info proc mappings

2023-06-27 Thread Alex Bennée
From: Ilya Leoshkevich Currently the GDB's generate-core-file command doesn't work well with qemu-user: the resulting dumps are huge [1] and at the same time incomplete (argv and envp are missing). The reason is that GDB has no access to proc mappings and therefore has to fall back to using heuri

[PATCH v3 03/36] gitlab: reduce testing scope of check-gcov

2023-06-27 Thread Alex Bennée
This keeps timing out on gitlab due to some qtests taking a long time. As this is just ensuring the gcov machinery is working and not attempting to be comprehensive lets skip qtest in this run. Message-Id: <20230623122100.1640995-4-alex.ben...@linaro.org> Reviewed-by: Richard Henderson Signed-off

[PATCH v3 08/36] tests/qtests: clean-up and fix leak in generic_fuzz

2023-06-27 Thread Alex Bennée
An update to the clang tooling detects more issues with the code including a memory leak from the g_string_new() allocation. Clean up the code to avoid the allocation and use ARRAY_SIZE while we are at it. Signed-off-by: Alex Bennée --- tests/qtest/fuzz/generic_fuzz.c | 11 ++- 1 file ch

[PATCH v3 02/36] gitlab: ensure coverage job also publishes meson log

2023-06-27 Thread Alex Bennée
From: Daniel P. Berrangé The coverage job wants to publish a coverage report on success, but the tests might fail and in that case we need the meson logs for debugging. Signed-off-by: Daniel P. Berrangé Reviewed-by: Richard Henderson Message-Id: <20230623122100.1640995-3-alex.ben...@linaro.org

[PATCH v3 30/36] linux-user: Add "safe" parameter to do_guest_openat()

2023-06-27 Thread Alex Bennée
From: Ilya Leoshkevich gdbstub cannot meaningfully handle QEMU_ERESTARTSYS, and it doesn't need to. Add a parameter to do_guest_openat() that makes it use openat() instead of safe_openat(), so that it becomes usable from gdbstub. Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson M

[PATCH v3 04/36] docs/devel: remind developers to run CI container pipeline when updating images

2023-06-27 Thread Alex Bennée
From: Ani Sinha When new dependencies and packages are added to containers, its important to run CI container generation pipelines on gitlab to make sure that there are no obvious conflicts between packages that are being added and those that are already present. Running CI container pipelines wi

[PATCH v3 17/36] plugins: force slow path when plugins instrument memory ops

2023-06-27 Thread Alex Bennée
The lack of SVE memory instrumentation has been an omission in plugin handling since it was introduced. Fortunately we can utilise the probe_* functions to force all all memory access to follow the slow path. We do this by checking the access type and presence of plugin memory callbacks and if set

[PATCH v3 01/36] gitlab: explicit set artifacts publishing criteria

2023-06-27 Thread Alex Bennée
From: Daniel P. Berrangé If not set explicitly, gitlab assumes 'when: on_success" as the publishing criteria for artifacts. This is reasonable if the artifact is an output deliverable of the job. This is useless if the artifact is a log file to be used for debugging job failures. This change mak

[PATCH v3 11/36] tests/lcitool: update to latest version

2023-06-27 Thread Alex Bennée
We need this for the riscv64 and gcc-native mappings. As the older alpine release has been dropped from the mappings we also need to bump the version of alpine we use. Message-Id: <20230623122100.1640995-13-alex.ben...@linaro.org> Acked-by: Richard Henderson Signed-off-by: Alex Bennée --- tests

[PATCH v3 12/36] tests/lcitool: Bump fedora container versions

2023-06-27 Thread Alex Bennée
From: Erik Skultety Fedora 37 -> 38 Signed-off-by: Erik Skultety Acked-by: Richard Henderson Message-Id: <20230623122100.1640995-14-alex.ben...@linaro.org> Message-Id: [AJB: Dropped alpine (in prev commit), reflow commit msg] Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/fedora-w

[PATCH v3 10/36] Makefile: add lcitool-refresh to UNCHECKED_GOALS

2023-06-27 Thread Alex Bennée
This is yet another make target you usually run in the top level of the source directory. Message-Id: <20230623122100.1640995-12-alex.ben...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 08/36] tests/qtests: clean-up and fix leak in generic_fuzz

2023-06-27 Thread Alex Bennée
An update to the clang tooling detects more issues with the code including a memory leak from the g_string_new() allocation. Clean up the code to avoid the allocation and use ARRAY_SIZE while we are at it. Signed-off-by: Alex Bennée --- tests/qtest/fuzz/generic_fuzz.c | 11 ++- 1 file ch

[PATCH v3 05/36] tests/tcg: add mechanism to handle plugin arguments

2023-06-27 Thread Alex Bennée
We recently missed a regression that should have been picked up by check-tcg. This was because the libmem plugin is effectively a NOP if the user doesn't specify the type to use. Rather than changing the default behaviour add an additional expansion so we can take this into account in future. Mes

[PATCH v3 09/36] tests/docker: add test-fuzz

2023-06-27 Thread Alex Bennée
Running the fuzzer requires some hoop jumping and some problems only show up in containers. This basically replicates the build-oss-fuzz job from our CI so we can run in the same containers we use in CI. Message-Id: <20230626215926.2522656-10-alex.ben...@linaro.org> Reviewed-by: Alexander Bulekov

[PATCH v3 15/36] tests/docker: convert riscv64-cross to lcitool

2023-06-27 Thread Alex Bennée
We still need to base this on Debian Sid until riscv64 is promoted to a release architecture (or another distro provides a full cross compile target). We use the new qemu-minimal project description to avoid bringing in all the extra dependencies because every extra package is another chance for si

[PATCH v3 33/36] gdbstub: Report the actual qemu-user pid

2023-06-27 Thread Alex Bennée
From: Ilya Leoshkevich Currently qemu-user reports pid 1 to GDB. Resolve the TODO and report the actual PID. Using getpid() relies on the assumption that there is only one GDBProcess. Add an assertion to make sure that future changes don't break it. Reviewed-by: Alex Bennée Signed-off-by: Ilya

[PATCH v3 35/36] docs: Document security implications of debugging

2023-06-27 Thread Alex Bennée
From: Ilya Leoshkevich Now that the GDB stub explicitly implements reading host files (note that it was already possible by changing the emulated code to open and read those files), concerns may arise that it undermines security. Document the status quo, which is that the users are already respo

[PATCH v3 06/36] qemu-keymap: properly check return from xkb_keymap_mod_get_index

2023-06-27 Thread Alex Bennée
We can return XKB_MOD_INVALID for AltGr which rightly gets flagged by sanitisers as an overly wide shift attempt. Properly check the return type and leave the bitmap as zero in that case. Tested output before and after is unchanged with the gb and ara keymaps. Signed-off-by: Alex Bennée Reviewed-

[PATCH v3 17/36] plugins: force slow path when plugins instrument memory ops

2023-06-27 Thread Alex Bennée
The lack of SVE memory instrumentation has been an omission in plugin handling since it was introduced. Fortunately we can utilise the probe_* functions to force all all memory access to follow the slow path. We do this by checking the access type and presence of plugin memory callbacks and if set

[PATCH v3 29/36] linux-user: Expose do_guest_openat() and do_guest_readlink()

2023-06-27 Thread Alex Bennée
From: Ilya Leoshkevich These functions will be required by the GDB stub in order to provide the guest view of /proc to GDB. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson Message-Id: <20230621203627.1808446-2-...@linux.ibm.com> Signed-off-by: Alex Benn

[PATCH v3 18/36] plugins: fix memory leak while parsing options

2023-06-27 Thread Alex Bennée
It was hard to track down this leak as it was an internal allocation by glib and the backtraces did not give much away. The autofree was freeing the allocation with g_free() but not taking care of the individual strings. They should have been freed with g_strfreev() instead. Searching the glib sou

[PATCH v3 25/36] docs/devel: introduce some key concepts for QOM development

2023-06-27 Thread Alex Bennée
Using QOM correctly is increasingly important to maintaining a modern code base. However the current documentation skips some important concepts before launching into a simple example. Lets: - at least mention properties - mention TYPE_OBJECT and TYPE_DEVICE - talk about why we have realize/

[PATCH v3 19/36] plugins: update lockstep to use g_memdup2

2023-06-27 Thread Alex Bennée
The old g_memdup is deprecated, use the replacement. Message-Id: <20230623122100.1640995-21-alex.ben...@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- contrib/plugins/lockstep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/lockst

[PATCH v3 24/36] docs/devel: split qom-api reference into new file

2023-06-27 Thread Alex Bennée
Lets try and keep the overview of the sub-system digestible by splitting the core API stuff into a separate file. As QOM and QDEV work together we should also try and enumerate the qdev_ functions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20230619171437.357374-

[PATCH v3 32/36] gdbstub: Expose gdb_get_process() and gdb_get_first_cpu_in_process()

2023-06-27 Thread Alex Bennée
From: Ilya Leoshkevich These functions will be needed by user-target.c in order to retrieve the name of the executable. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Message-Id: <20230621203627.1808446-5-...@linux.ibm.com> Signed-off-by: Alex Bennée --- gdbstub/internals.h | 2 ++

[PATCH v3 21/36] include/migration: mark vmstate_register() as a legacy function

2023-06-27 Thread Alex Bennée
Mention that QOM-ified devices already have support for registering the description. Reviewed-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Peter Xu Signed-off-by: Alex Bennée Message-Id: <20230619171437.357374-3-alex.ben...@linaro.org> --- v3

[PATCH v3 31/36] linux-user: Emulate /proc/self/smaps

2023-06-27 Thread Alex Bennée
From: Ilya Leoshkevich /proc/self/smaps is an extension of /proc/self/maps: it provides the same lines, plus additional information about each range. GDB uses /proc/self/smaps when available, which means that generate-core-file tries it first before falling back to /proc/self/maps. This, in turn

[PATCH v3 20/36] docs/devel: add some front matter to the devel index

2023-06-27 Thread Alex Bennée
Give an overview of the most useful bits of the devel documentation to read depending on what the developer wants to do. Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20230623122100.1640995-22-alex.ben...@linaro.org> --- v2 - removed excess

[PATCH v3 22/36] include/hw/qdev-core: fixup kerneldoc annotations

2023-06-27 Thread Alex Bennée
Fix up the kerneldoc markup and start documenting the various fields in QDEV related structures. This involved: - moving overall description to a DOC: comment at top - fixing various markup issues for types and structures - adding missing Return: statements - adding some typedefs to hide QLIST

[PATCH v3 23/36] docs/devel/qom.rst: Correct code style

2023-06-27 Thread Alex Bennée
From: Philippe Mathieu-Daudé Per commit 067109a11c ("docs/devel: mention the spacing requirement for QOM"): For a storage structure the first declaration should always be called “parent_obj” and for a class structure the first member should always be called “parent_class” Adapt the QOM rS

[PATCH v3 28/36] gdbstub: clean-up vcont handling to avoid goto

2023-06-27 Thread Alex Bennée
We can handle all the error exit cases by using g_autofree() for the one thing that needs cleaning up on the exit. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- gdbstub/gdbstub.c | 28 +--- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git

[PATCH v3 36/36] tests/tcg: Add a test for info proc mappings

2023-06-27 Thread Alex Bennée
From: Ilya Leoshkevich Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich Message-Id: <20230621203627.1808446-9-...@linux.ibm.com> Signed-off-by: Alex Bennée --- tests/tcg/multiarch/Makefile.target | 9 ++- .../multiarch/gdbstub/test-proc-mappings.py | 65 ++

Re: [PATCH v2 1/5] migration: Use proper indentation for migration.json

2023-06-27 Thread Peter Xu
On Thu, Jun 22, 2023 at 09:50:15PM +0200, Juan Quintela wrote: > We broke it with dirtyrate limit patches. > > Signed-off-by: Juan Quintela Acked-by: Peter Xu -- Peter Xu

Re: [PATCH v2 5/5] migration: Deprecate old compression method

2023-06-27 Thread Peter Xu
On Thu, Jun 22, 2023 at 09:50:19PM +0200, Juan Quintela wrote: > Signed-off-by: Juan Quintela Acked-by: Peter Xu -- Peter Xu

Re: [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR)

2023-06-27 Thread Alex Bennée
Alex Bennée writes: > As softfreeze is fast approaching I thought it would be work combining > my various trees into an omnibus series to ease the review and > merging. > Doh, apologies for double posting, this thread is incomplete. See: https://patchew.org/QEMU/20230627160943.2956928-1-ale

[PATCH v3 26/36] gdbstub: lightly refactor connection to avoid snprintf

2023-06-27 Thread Alex Bennée
This may be a bit too much to avoid an snprintf and the slightly dodgy assign to a const variable. But hopefully not. Signed-off-by: Alex Bennée --- v2 - fix checkpatch warning --- gdbstub/softmmu.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/gdbst

[PATCH v3 27/36] gdbstub: Permit reverse step/break to provide stop response

2023-06-27 Thread Alex Bennée
From: Nicholas Piggin The final part of the reverse step and break handling is to bring the machine back to a debug stop state. gdb expects a response. A gdb 'rsi' command hangs forever because the gdbstub filters out the response (also observable with reverse_debugging.py avocado tests). Fix b

[PATCH v5 12/19] target/riscv: add KVM specific MISA properties

2023-06-27 Thread Daniel Henrique Barboza
Using all TCG user properties in KVM is tricky. First because KVM supports only a small subset of what TCG provides, so most of the cpu->cfg flags do nothing for KVM. Second, and more important, we don't have a way of telling if any given value is an user input or not. For TCG this has a small imp

[PATCH v5 00/19] target/riscv, KVM: fixes and enhancements

2023-06-27 Thread Daniel Henrique Barboza
Hi, This version has changes in patch 16 proposed by Andrew in v4. No other changes made. Patches missing review: 16 Changes from v4: - patch 16: - reworded comment to "Check if KVM created the property already" - reworded comment to "Set the default to disabled for every extension unkno

[PATCH v5 11/19] target/riscv/cpu: add misa_ext_info_arr[]

2023-06-27 Thread Daniel Henrique Barboza
Next patch will add KVM specific user properties for both MISA and multi-letter extensions. For MISA extensions we want to make use of what is already available in misa_ext_cfgs[] to avoid code repetition. misa_ext_info_arr[] array will hold name and description for each MISA extension that misa_e

[PATCH v5 14/19] target/riscv/kvm.c: add multi-letter extension KVM properties

2023-06-27 Thread Daniel Henrique Barboza
Let's add KVM user properties for the multi-letter extensions that KVM currently supports: zicbom, zicboz, zihintpause, zbb, ssaia, sstc, svinval and svpbmt. As with MISA extensions, we're using the KVMCPUConfig type to hold information about the state of each extension. However, multi-letter exte

[PATCH v5 05/19] target/riscv/cpu.c: restrict 'marchid' value

2023-06-27 Thread Daniel Henrique Barboza
'marchid' shouldn't be set to a different value as previously set for named CPUs. For all other CPUs it shouldn't be freely set either - the spec requires that 'marchid' can't have the MSB (most significant bit) set and every other bit set to zero, i.e. 0x8000 is an invalid 'marchid' value for

[PATCH v5 03/19] target/riscv/cpu.c: restrict 'mvendorid' value

2023-06-27 Thread Daniel Henrique Barboza
We're going to change the handling of mvendorid/marchid/mimpid by the KVM driver. Since these are always present in all CPUs let's put the same validation for everyone. It doesn't make sense to allow 'mvendorid' to be different than it is already set in named (vendor) CPUs. Generic (dynamic) CPUs

[PATCH v5 16/19] target/riscv/cpu.c: create KVM mock properties

2023-06-27 Thread Daniel Henrique Barboza
KVM-specific properties are being created inside target/riscv/kvm.c. But at this moment we're gathering all the remaining properties from TCG and adding them as is when running KVM. This creates a situation where non-KVM properties are setting flags to 'true' due to its default settings (e.g. Zawr

[PATCH v5 10/19] target/riscv/kvm.c: init 'misa_ext_mask' with scratch CPU

2023-06-27 Thread Daniel Henrique Barboza
At this moment we're retrieving env->misa_ext during kvm_arch_init_cpu(), leaving env->misa_ext_mask behind. We want to set env->misa_ext_mask, and we want to set it as early as possible. The reason is that we're going to use it in the validation process of the KVM MISA properties we're going to a

[PATCH v5 09/19] linux-headers: Update to v6.4-rc1

2023-06-27 Thread Daniel Henrique Barboza
Update to commit ac9a78681b92 ("Linux 6.4-rc1"). Signed-off-by: Daniel Henrique Barboza Acked-by: Alistair Francis --- include/standard-headers/linux/const.h| 2 +- include/standard-headers/linux/virtio_blk.h | 18 +++ .../standard-headers/linux/virtio_config.h| 6 +++ inclu

[PATCH v5 06/19] target/riscv: use KVM scratch CPUs to init KVM properties

2023-06-27 Thread Daniel Henrique Barboza
Certain validations, such as the validations done for the machine IDs (mvendorid/marchid/mimpid), are done before starting the CPU. Non-dynamic (named) CPUs tries to match user input with a preset default. As it is today we can't prefetch a KVM default for these cases because we're only able to rea

[PATCH v5 02/19] hw/riscv/virt.c: skip 'mmu-type' FDT if satp mode not set

2023-06-27 Thread Daniel Henrique Barboza
The absence of a satp mode in riscv_host_cpu_init() is causing the following error: $ sudo ./qemu/build/qemu-system-riscv64 -machine virt,accel=kvm \ -m 2G -smp 1 -nographic -snapshot \ -kernel ./guest_imgs/Image \ -initrd ./guest_imgs/rootfs_kvm_riscv64.img \ -append "earlycon=s

[PATCH v5 04/19] target/riscv/cpu.c: restrict 'mimpid' value

2023-06-27 Thread Daniel Henrique Barboza
Following the same logic used with 'mvendorid' let's also restrict 'mimpid' for named CPUs. Generic CPUs keep setting the value freely. Note that we're getting rid of the default RISCV_CPU_MARCHID value. The reason is that this is not a good default since it's dynamic, changing with with every QEM

[PATCH v5 08/19] target/riscv: handle mvendorid/marchid/mimpid for KVM CPUs

2023-06-27 Thread Daniel Henrique Barboza
After changing user validation for mvendorid/marchid/mimpid to guarantee that the value is validated on user input time, coupled with the work in fetching KVM default values for them by using a scratch CPU, we're certain that the values in cpu->cfg.(mvendorid|marchid|mimpid) are already good to be

[PATCH v5 01/19] target/riscv: skip features setup for KVM CPUs

2023-06-27 Thread Daniel Henrique Barboza
As it is today it's not possible to use '-cpu host' if the RISC-V host has RVH enabled. This is the resulting error: $ sudo ./qemu/build/qemu-system-riscv64 \ -machine virt,accel=kvm -m 2G -smp 1 \ -nographic -snapshot -kernel ./guest_imgs/Image \ -initrd ./guest_imgs/rootfs_kvm_riscv

[PATCH v5 19/19] target/riscv/kvm.c: read/write (cbom|cboz)_blocksize in KVM

2023-06-27 Thread Daniel Henrique Barboza
If we don't set a proper cbom_blocksize|cboz_blocksize in the FDT the Linux Kernel will fail to detect the availability of the CBOM/CBOZ extensions, regardless of the contents of the 'riscv,isa' DT prop. The FDT is being written using the cpu->cfg.cbom|z_blocksize attributes, so let's expose them

[PATCH v5 15/19] target/riscv/cpu.c: remove priv_ver check from riscv_isa_string_ext()

2023-06-27 Thread Daniel Henrique Barboza
riscv_isa_string_ext() is being used by riscv_isa_string(), which is then used by boards to retrieve the 'riscv,isa' string to be written in the FDT. All this happens after riscv_cpu_realize(), meaning that we're already past riscv_cpu_validate_set_extensions() and, more important, riscv_cpu_disabl

[PATCH v5 18/19] target/riscv/kvm.c: add kvmconfig_get_cfg_addr() helper

2023-06-27 Thread Daniel Henrique Barboza
There are 2 places in which we need to get a pointer to a certain property of the cpu->cfg struct based on property offset. Next patch will add a couple more. Create a helper to avoid repeating this code over and over. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Andrew Jones --- target

[PATCH v5 17/19] target/riscv: update multi-letter extension KVM properties

2023-06-27 Thread Daniel Henrique Barboza
We're now ready to update the multi-letter extensions status for KVM. kvm_riscv_update_cpu_cfg_isa_ext() is called called during vcpu creation time to verify which user options changes host defaults (via the 'user_set' flag) and tries to write them back to KVM. Failure to commit a change to KVM i

[PATCH v5 07/19] target/riscv: read marchid/mimpid in kvm_riscv_init_machine_ids()

2023-06-27 Thread Daniel Henrique Barboza
Allow 'marchid' and 'mimpid' to also be initialized in kvm_riscv_init_machine_ids(). After this change, the handling of mvendorid/marchid/mimpid for the 'host' CPU type will be equal to what we already have for TCG named CPUs, i.e. the user is not able to set these values to a different val than t

[PATCH v5 13/19] target/riscv/kvm.c: update KVM MISA bits

2023-06-27 Thread Daniel Henrique Barboza
Our design philosophy with KVM properties can be resumed in two main decisions based on KVM interface availability and what the user wants to do: - if the user disables an extension that the host KVM module doesn't know about (i.e. it doesn't implement the kvm_get_one_reg() interface), keep bootin

Re: [PATCH v8] Emulate dip switch language layout settings on SUN keyboard

2023-06-27 Thread Henrik Carlqvist
On Tue, 27 Jun 2023 07:33:46 +0100 Mark Cave-Ayland wrote: > I think this is about ready to merge: the only thing I'd like to change is > to swap unsigned char to uint8_t in the signature of > sunkbd_layout_dip_switch(), but I can fix that up myself and queue it to my > qemu-sparc branch. Thanks

[PATCH v5 03/15] target/riscv: Remove redundant "cpu_vl == 0" checks

2023-06-27 Thread Max Chou
From: Nazar Kazakov Remove the redundant "vl == 0" check which is already included within the vstart >= vl check, when vl == 0. Signed-off-by: Nazar Kazakov Reviewed-by: Weiwei Li Signed-off-by: Max Chou --- target/riscv/insn_trans/trans_rvv.c.inc | 31 + 1 file cha

[PATCH v5 00/15] Add RISC-V vector cryptographic instruction set support

2023-06-27 Thread Max Chou
This patchset provides an implementation for Zvbb, Zvbc, Zvkned, Zvknh, Zvksh, Zvkg, and Zvksed of the draft RISC-V vector cryptography extensions as per the v20230620 version of the specification(1)(168e7b4). This is an update to the patchset submitted to qemu-devel on Tue, 27 Jun 2023 09:43:24 -0

[PATCH v5 04/15] target/riscv: Add Zvbc ISA extension support

2023-06-27 Thread Max Chou
From: Lawrence Hunter This commit adds support for the Zvbc vector-crypto extension, which consists of the following instructions: * vclmulh.[vx,vv] * vclmul.[vx,vv] Translation functions are defined in `target/riscv/insn_trans/trans_rvvk.c.inc` and helpers are defined in `target/riscv/vcrypto_

[PATCH v5 01/15] target/riscv: Refactor some of the generic vector functionality

2023-06-27 Thread Max Chou
From: Kiran Ostrolenk Take some functions/macros out of `vector_helper` and put them in a new module called `vector_internals`. This ensures they can be used by both vector and vector-crypto helpers (latter implemented in proceeding commits). Signed-off-by: Kiran Ostrolenk Reviewed-by: Weiwei L

[PATCH v5 02/15] target/riscv: Refactor vector-vector translation macro

2023-06-27 Thread Max Chou
From: Kiran Ostrolenk Refactor the non SEW-specific stuff out of `GEN_OPIVV_TRANS` into function `opivv_trans` (similar to `opivi_trans`). `opivv_trans` will be used in proceeding vector-crypto commits. Signed-off-by: Kiran Ostrolenk Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis

<    1   2   3   4   >