Re: [PATCH 1/1] qemu-options.hx: correct formatting -smbios type=4

2024-07-29 Thread Philippe Mathieu-Daudé
On 29/7/24 22:48, Heinrich Schuchardt wrote: processor-family and processor-id can be assigned independently. Add missing brackets. Fixes: b5831d79671c ("smbios: add processor-family option") Signed-off-by: Heinrich Schuchardt --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 de

Re: [PATCH for-9.1] tests/vm/openbsd: Install tomli

2024-07-29 Thread Philippe Mathieu-Daudé
On 30/7/24 03:11, Richard Henderson wrote: Tomli is now required by configure. Signed-off-by: Richard Henderson --- tests/vm/openbsd | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v5] osdep: add a qemu_close_all_open_fd() helper

2024-07-29 Thread Clément Léger
On 29/07/2024 23:32, Richard Henderson wrote: > On 7/30/24 00:20, Clément Léger wrote: >> >> >> On 29/07/2024 16:00, Philippe Mathieu-Daudé wrote: >>> Hi Clément, >>> >>> On 26/7/24 09:54, Clément Léger wrote: Since commit 03e471c41d8b ("qemu_init: increase NOFILE soft limit on POSIX")

Re: [PATCH v2 09/24] linux-user/riscv: implement indirect branch tracking prctls

2024-07-29 Thread Richard Henderson
On 7/30/24 03:53, Deepak Gupta wrote: +/* set or clear branch tracking */ +env->ufcfien = (flag & PR_INDIR_BR_LP_ENABLE); +tb_flush(env_cpu(env)); tb_flush is not required when you track enable properly in patch 5. r~

Re: [PATCH v2 08/24] linux-user/syscall: introduce prctl for indirect branch tracking

2024-07-29 Thread Richard Henderson
On 7/30/24 03:53, Deepak Gupta wrote: Each application enables indirect branch tracking (forward cfi) for itself via prctl. Adding branch tracking prctl in linux-user/syscall. Using same prctl code as proposed in cfi patches in kernel mailing list [1] [1] - https://lore.kernel.org/all/202404032

Re: [PATCH v4 6/6] acpi/ghes: Add a logic to inject ARM processor CPER

2024-07-29 Thread Mauro Carvalho Chehab
Em Mon, 29 Jul 2024 17:31:09 +0100 Jonathan Cameron escreveu: > On Mon, 29 Jul 2024 15:21:10 +0200 > Mauro Carvalho Chehab wrote: ... > Markus suggested: > > > A target-specific command like this one should be conditional. Try > > this: > > > > { 'command': 'arm-inject-error', > >

Re: [PATCH 4/4] scsi-disk: Always report RESERVATION_CONFLICT to guest

2024-07-29 Thread Paolo Bonzini
On Mon, Jul 29, 2024 at 6:55 PM Kevin Wolf wrote: > Ok, so modifying the commit message and removing the 'error' > initialisation it is. Maybe mention the cluster validation case in the > comment here to explain why we do this even for non-pr-manager cases, > but not as a FIXME or TODO because it'

Re: [PULL 0/5] misc patch queue

2024-07-29 Thread Richard Henderson
On 7/30/24 11:11, Richard Henderson wrote: The following changes since commit 93b799fafd9170da3a79a533ea6f73a18de82e22: Merge tag 'pull-ppc-for-9.1-2-20240726-1' of https://gitlab.com/npiggin/qemu into staging (2024-07-26 15:10:45 +1000) are available in the Git repository at: https://g

Re: [PATCH v4 2/6] arm/virt: Wire up GPIO error source for ACPI / GHES

2024-07-29 Thread Mauro Carvalho Chehab
Em Mon, 29 Jul 2024 17:08:40 +0100 Jonathan Cameron escreveu: > On Mon, 29 Jul 2024 15:21:06 +0200 > Mauro Carvalho Chehab wrote: > > > From: Jonathan Cameron > > > > Creates a Generic Event Device (GED) as specified at > > I wrote this a while back and wasn't aware of the naming > mess ar

[PATCH 2/4] target/i386/cpu: Explicitly express SGX_LC and SGX feature words dependency

2024-07-29 Thread Zhao Liu
At present, cpu_x86_cpuid() silently masks off SGX_LC if SGX is absent. This is not proper because the user is not told about the dependency between the two. So explicitly define the dependency between SGX_LC and SGX feature words, so that user could get a warning when SGX_LC is enabled but SGX i

[PATCH 1/4] target/i386/cpu: Remove unnecessary SGX feature words checks

2024-07-29 Thread Zhao Liu
CPUID.0x7.0.ebx and CPUID.0x7.0.ecx leaves have been expressed as the feature word lists, and the Host capability support has been checked in x86_cpu_filter_features(). Therefore, such checks on SGX feature "words" are redundant, and the follow-up adjustments to those feature "words" will not actu

[PATCH 4/4] target/i386/cpu: Mask off SGX/SGX_LC feature words for non-PC machine

2024-07-29 Thread Zhao Liu
Only PC machine supports SGX, so mask off SGX related feature words for non-PC machine (microvm). Signed-off-by: Zhao Liu --- hw/i386/sgx-stub.c| 5 + hw/i386/sgx.c | 8 include/hw/i386/sgx-epc.h | 1 + target/i386/cpu.c | 15 +++ 4 files c

[PATCH 3/4] target/i386/cpu: Add dependencies of CPUID 0x12 leaves

2024-07-29 Thread Zhao Liu
As SDM stated, CPUID 0x12 leaves depend on CPUID_7_0_EBX_SGX (SGX feature word). Since FEAT_SGX_12_0_EAX, FEAT_SGX_12_0_EBX and FEAT_SGX_12_1_EAX define multiple feature words, add the dependencies of those registers to report the warning to user if SGX is absent. Signed-off-by: Zhao Liu --- ta

[PATCH 0/4] i386: Clean up SGX for microvm, completely

2024-07-29 Thread Zhao Liu
Hi, Currently, only PC machine supports SGX and microvm doesn't. The commit 13be929aff80 ("target/i386: do not crash if microvm guest uses SGX CPUID leaves") has cleaned up the CPUID 0x12.{0x2..N} for microvm to avoid Guest crash. Per my comment on that commit [1], microvm deserves more cleanup

Re: [PATCH 11/14] contrib/plugins/cache.c: Remove redundant check of l2_access

2024-07-29 Thread Richard Henderson
On 7/30/24 00:44, Alex Bennée wrote: From: Peter Maydell In append_stats_line(), we have an expression l2_access ? l2_miss_rate : 0.0 But this is inside an if (l2_access && l2_misses) { ... } block, so Coverity points out that the false part of the ?: is dead code. Remove the unnecessary te

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-07-29 Thread Jason Wang
On Tue, Jul 30, 2024 at 11:29 AM Akihiko Odaki wrote: > > On 2024/07/30 12:17, Jason Wang wrote: > > On Tue, Jul 30, 2024 at 11:12 AM Akihiko Odaki > > wrote: > >> > >> On 2024/07/30 12:03, Jason Wang wrote: > >>> On Tue, Jul 30, 2024 at 10:57 AM Akihiko Odaki > >>> wrote: > > On 202

Re: [PATCH] doc/net/l2tpv3: Update boolean fields' description to avoid short-form use

2024-07-29 Thread Jason Wang
On Tue, Jul 30, 2024 at 11:29 AM Zhao Liu wrote: > > On Tue, Jul 30, 2024 at 10:54:07AM +0800, Jason Wang wrote: > > Date: Tue, 30 Jul 2024 10:54:07 +0800 > > From: Jason Wang > > Subject: Re: [PATCH] doc/net/l2tpv3: Update boolean fields' description to > > avoid short-form use > > > > On Wed,

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-07-29 Thread Akihiko Odaki
On 2024/07/30 11:04, Jason Wang wrote: On Tue, Jul 30, 2024 at 12:43 AM Akihiko Odaki wrote: On 2024/07/29 23:29, Peter Xu wrote: On Mon, Jul 29, 2024 at 01:45:12PM +0900, Akihiko Odaki wrote: On 2024/07/29 12:50, Jason Wang wrote: On Sun, Jul 28, 2024 at 11:19 PM Akihiko Odaki wrote: On

Re: [PATCH] doc/net/l2tpv3: Update boolean fields' description to avoid short-form use

2024-07-29 Thread Zhao Liu
On Tue, Jul 30, 2024 at 10:54:07AM +0800, Jason Wang wrote: > Date: Tue, 30 Jul 2024 10:54:07 +0800 > From: Jason Wang > Subject: Re: [PATCH] doc/net/l2tpv3: Update boolean fields' description to > avoid short-form use > > On Wed, Jul 17, 2024 at 2:15 PM Zhao Liu wrote: > > > > Hi Jason, > > >

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-07-29 Thread Akihiko Odaki
On 2024/07/30 12:17, Jason Wang wrote: On Tue, Jul 30, 2024 at 11:12 AM Akihiko Odaki wrote: On 2024/07/30 12:03, Jason Wang wrote: On Tue, Jul 30, 2024 at 10:57 AM Akihiko Odaki wrote: On 2024/07/30 11:04, Jason Wang wrote: On Tue, Jul 30, 2024 at 12:43 AM Akihiko Odaki wrote: On 2024

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-07-29 Thread Akihiko Odaki
On 2024/07/30 12:03, Jason Wang wrote: On Tue, Jul 30, 2024 at 10:57 AM Akihiko Odaki wrote: On 2024/07/30 11:04, Jason Wang wrote: On Tue, Jul 30, 2024 at 12:43 AM Akihiko Odaki wrote: On 2024/07/29 23:29, Peter Xu wrote: On Mon, Jul 29, 2024 at 01:45:12PM +0900, Akihiko Odaki wrote: On

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-07-29 Thread Jason Wang
On Tue, Jul 30, 2024 at 11:12 AM Akihiko Odaki wrote: > > On 2024/07/30 12:03, Jason Wang wrote: > > On Tue, Jul 30, 2024 at 10:57 AM Akihiko Odaki > > wrote: > >> > >> On 2024/07/30 11:04, Jason Wang wrote: > >>> On Tue, Jul 30, 2024 at 12:43 AM Akihiko Odaki > >>> wrote: > > On 202

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-07-29 Thread Jason Wang
On Tue, Jul 30, 2024 at 10:57 AM Akihiko Odaki wrote: > > On 2024/07/30 11:04, Jason Wang wrote: > > On Tue, Jul 30, 2024 at 12:43 AM Akihiko Odaki > > wrote: > >> > >> On 2024/07/29 23:29, Peter Xu wrote: > >>> On Mon, Jul 29, 2024 at 01:45:12PM +0900, Akihiko Odaki wrote: > On 2024/07/29

Re: [PATCH] doc/net/l2tpv3: Update boolean fields' description to avoid short-form use

2024-07-29 Thread Jason Wang
On Wed, Jul 17, 2024 at 2:15 PM Zhao Liu wrote: > > Hi Jason, > > Just a kind ping. Does this update satisfy you? > Since the original example generates the warning. > > Thanks, > Zhao Queued. Thanks

[PATCH 1/1] qemu-options.hx: correct formatting -smbios type=4

2024-07-29 Thread Heinrich Schuchardt
processor-family and processor-id can be assigned independently. Add missing brackets. Fixes: b5831d79671c ("smbios: add processor-family option") Signed-off-by: Heinrich Schuchardt --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-op

Re: [PATCH] roms/opensbi: Update to v1.5

2024-07-29 Thread Heinrich Schuchardt
On 7/15/24 19:15, Daniel Henrique Barboza wrote: Update OpenSBI and the pre-built opensbi32 and opensbi64 images to v1.5. The following commits were included in v1.5: 455de67 include: Bump-up version to 1.5 23b7bad lib: sbi: check incoming dbtr shmem address 0e45b63 docs: Fix wrong filename caa

Re: [PATCH v3] scripts/qcow2-to-stdout.py: Add script to write qcow2 images to stdout

2024-07-29 Thread Eric Blake
On Mon, Jul 29, 2024 at 05:02:26PM GMT, Alberto Garcia wrote: > This tool converts a disk image to qcow2, writing the result directly > to stdout. This can be used for example to send the generated file > over the network. Overall seems like a useful idea to me. > > This is equivalent to using q

Re: [PATCH 05/14] tests/tcg: update README

2024-07-29 Thread Richard Henderson
On 7/30/24 00:44, Alex Bennée wrote: Update the document with details about the layout of tests. Remove the out of date cris comments. Refer to the developer guide for details about how to run the tests. Signed-off-by: Alex Bennée --- tests/tcg/README | 23 ++- 1 file chan

Re: [PATCH 10/14] docs: split TCG plugin usage from devel section

2024-07-29 Thread Richard Henderson
On 7/30/24 00:44, Alex Bennée wrote: The devel section is getting quite messy with the breakdown of the example plugins which should be usable by users. As we mention plugins in the emulation section along with semihosting move the overview there leaving the development section about the details

Re: [PATCH] nbd: Prevent NULL pointer dereference in nbd_blockdev_client_closed()

2024-07-29 Thread Eric Blake
On Fri, Jun 28, 2024 at 11:58:37AM GMT, Alexander Ivanov wrote: > Ping? > > On 6/7/24 17:00, Alexander Ivanov wrote: > > static void nbd_blockdev_client_closed(NBDClient *client, bool ignored) > > { > > nbd_client_put(client); > > +if (nbd_server == NULL) { > > +return; > > +

Re: [PATCH 02/14] gitlab: display /packages.txt in build jobs

2024-07-29 Thread Richard Henderson
On 7/30/24 00:44, Alex Bennée wrote: From: Daniel P. Berrangé The lcitool created containers save the full distro package list details into /packages.txt. The idea is that build jobs will 'cat' this file, so that the build log has a record of what packages were used. This is important info, beca

Re: [PATCH v2 05/24] target/riscv: tracking indirect branches (fcfi) for zicfilp

2024-07-29 Thread Richard Henderson
On 7/30/24 03:53, Deepak Gupta wrote: diff --git a/target/riscv/translate.c b/target/riscv/translate.c index acba90f170..c746d7df08 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -20,6 +20,7 @@ #include "qemu/log.h" #include "cpu.h" #include "tcg/tcg-op.h" +#include

Re: [PATCH v3] scripts/qcow2-to-stdout.py: Add script to write qcow2 images to stdout

2024-07-29 Thread Alberto Garcia
On Mon 29 Jul 2024 03:20:18 PM -05, Eric Blake wrote: > On Mon, Jul 29, 2024 at 05:02:26PM GMT, Alberto Garcia wrote: >> +# qcow2 files produced by this script are always arranged like this: >> +# >> +# - qcow2 header >> +# - refcount table >> +# - refcount blocks >> +# - L1 table >> +# - L2 tables

Re: [PATCH 07/14] docs/devel: document how to run individual TCG tests

2024-07-29 Thread Richard Henderson
On 7/30/24 00:44, Alex Bennée wrote: Since 6f6ca067d2 (tests/tcg: add some help output for running individual tests) we made it easier to run individual tests for a given architecture. Lets reference that in the developer documentation. Signed-off-by: Alex Bennée --- docs/devel/testing.rst | 1

Re: [PATCH 08/14] tests/avocado: remove tcg_plugins virt_mem_icount test

2024-07-29 Thread Richard Henderson
On 7/30/24 00:44, Alex Bennée wrote: Since 4f8d886085 (tests/plugin/mem: migrate to new per_vcpu API) this test was skipping due to not being able to run callback and inline memory instrumentation at the same time. However b480f7a621 (tests/plugin: add test plugin for inline operations) tests fo

Re: query dirty areas according to bitmap via QMP or qemu-nbd

2024-07-29 Thread Eric Blake
On Mon, Jul 29, 2024 at 03:51:17PM GMT, Fiona Ebner wrote: > > In particular, tests/qemu-img-bitmaps gives the magic decoder ring: > > > > | # x-dirty-bitmap is a hack for reading bitmaps; it abuses block status to > > | # report "data":false for portions of the bitmap which are set > > | IMG="dri

Re: [PATCH v2 03/24] target/riscv: save and restore elp state on priv transitions

2024-07-29 Thread Deepak Gupta
Thanks Richard. On Tue, Jul 30, 2024 at 09:04:29AM +1000, Richard Henderson wrote: On 7/30/24 03:53, Deepak Gupta wrote: elp state is recorded in *status on trap entry (less privilege to higher privilege) and restored in elp from *status on trap exit (higher to less privilege). Additionally th

Re: [PATCH 01/14] gitlab: record installed packages in /packages.txt in containers

2024-07-29 Thread Richard Henderson
On 7/30/24 00:44, Alex Bennée wrote: From: Daniel P. Berrangé The lcitool created containers save the full distro package list details into /packages.txt. The idea is that build jobs will 'cat' this file, so that the build log has a record of what packages were used. This is important info, beca

[PULL 5/5] linux-user: open_self_stat: Implement num_threads

2024-07-29 Thread Richard Henderson
From: Fabio D'Urso The num_threads field reports the total number of threads in the process. In QEMU, this is equal to the number of CPU instances. Signed-off-by: Fabio D'Urso Reviewed-by: Alex Bennée Message-ID: <20240619194109.248066-1-fdu...@google.com> Signed-off-by: Richard Henderson ---

[PULL 4/5] util/cpuinfo: Make use of elf_aux_info(3) on OpenBSD

2024-07-29 Thread Richard Henderson
From: Brad Smith Signed-off-by: Brad Smith Message-ID: Signed-off-by: Richard Henderson --- util/cpuinfo-aarch64.c | 9 ++--- util/cpuinfo-ppc.c | 5 +++-- util/getauxval.c | 2 +- meson.build| 8 4 files changed, 18 insertions(+), 6 deletions(-) diff --git

Re: [PATCH v5 05/11] exec/ioport: Add portio_list_set_address()

2024-07-29 Thread Bernhard Beschow
Am 29. Juli 2024 09:26:19 UTC schrieb "Philippe Mathieu-Daudé" : >On 14/1/24 13:39, Bernhard Beschow wrote: >> Some SuperI/O devices such as the VIA south bridges or the PC87312 controller >> are able to relocate their SuperI/O functions. Add a convenience function for >> implementing this in t

Re: [PATCH 09/14] tests/tcg: move test plugins into tcg subdir

2024-07-29 Thread Richard Henderson
On 7/30/24 00:44, Alex Bennée wrote: You cannot use plugins without TCG enabled so it doesn't make sense to have them separated off in the test directory structure. While we are at it rename the directory to plugins to reflect the plural nature of the directory and match up with contrib/plugins.

Re: [PATCH 06/14] docs/devel: update the testing introduction

2024-07-29 Thread Richard Henderson
On 7/30/24 00:44, Alex Bennée wrote: Move the mention of "check-help" up to the intro text and also mention the meson test integration. Signed-off-by: Alex Bennée --- docs/devel/testing.rst | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) Reviewed-by: Richard Hen

[PULL 0/5] misc patch queue

2024-07-29 Thread Richard Henderson
The following changes since commit 93b799fafd9170da3a79a533ea6f73a18de82e22: Merge tag 'pull-ppc-for-9.1-2-20240726-1' of https://gitlab.com/npiggin/qemu into staging (2024-07-26 15:10:45 +1000) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-misc-20240

[PULL 3/5] linux-user/main: Check errno when getting AT_EXECFD

2024-07-29 Thread Richard Henderson
From: Vivian Wang It's possible for AT_EXECFD to end up with a valid value of 0. Check errno when using qemu_getauxval instead of return value to handle this case. Not handling this case leads to a confusing condition where the executable ends up as fd 0, i.e. stdin. Signed-off-by: Vivian Wang

[PATCH for-9.1] tests/vm/openbsd: Install tomli

2024-07-29 Thread Richard Henderson
Tomli is now required by configure. Signed-off-by: Richard Henderson --- tests/vm/openbsd | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 5e646f7c51..49cab08782 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -32,6 +32,7 @@ class OpenBSDVM(ba

[PULL 1/5] target/rx: Use target_ulong for address in LI

2024-07-29 Thread Richard Henderson
Using int32_t meant that the address was sign-extended to uint64_t when passing to translator_ld*, triggering an assert. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2453 Signed-off-by: Richard Henderson Tested-by: Thomas Huth --- target/rx/translate.c | 3 ++- 1 file changed, 2 inse

Re: [PATCH v2 03/24] target/riscv: save and restore elp state on priv transitions

2024-07-29 Thread Richard Henderson
On 7/30/24 03:53, Deepak Gupta wrote: elp state is recorded in *status on trap entry (less privilege to higher privilege) and restored in elp from *status on trap exit (higher to less privilege). Additionally this patch introduces a forward cfi helper function to determine if current privilege h

Re: [PULL 0/2] QAPI patches patches for 2024-07-29

2024-07-29 Thread Richard Henderson
On 7/29/24 16:37, Markus Armbruster wrote: The following changes since commit 93b799fafd9170da3a79a533ea6f73a18de82e22: Merge tag 'pull-ppc-for-9.1-2-20240726-1' ofhttps://gitlab.com/npiggin/qemu into staging (2024-07-26 15:10:45 +1000) are available in the Git repository at: https://re

Re: [PATCH v5] osdep: add a qemu_close_all_open_fd() helper

2024-07-29 Thread Richard Henderson
On 7/30/24 00:20, Clément Léger wrote: On 29/07/2024 16:00, Philippe Mathieu-Daudé wrote: Hi Clément, On 26/7/24 09:54, Clément Léger wrote: Since commit 03e471c41d8b ("qemu_init: increase NOFILE soft limit on POSIX"), the maximum number of file descriptors that can be opened are raised to n

[PULL 2/5] util/getauxval: Ensure setting errno if not found

2024-07-29 Thread Richard Henderson
From: Vivian Wang Sometimes zero is a valid value for getauxval (e.g. AT_EXECFD). Make sure that we can distinguish between a valid zero value and a not found entry by setting errno. Assumes that getauxval from sys/auxv.h sets errno correctly. Signed-off-by: Vivian Wang Message-ID: <2024072310

[PATCH] target/arm: Fix BTI versus CF_PCREL

2024-07-29 Thread Richard Henderson
With pcrel, we cannot check the guarded page bit at translation time, as different mappings of the same physical page may or may not have the GP bit set. Instead, add a couple of helpers to check the page at runtime, after all other filters that might obviate the need for the check. The set_btype

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-07-29 Thread Jason Wang
On Tue, Jul 30, 2024 at 12:43 AM Akihiko Odaki wrote: > > On 2024/07/29 23:29, Peter Xu wrote: > > On Mon, Jul 29, 2024 at 01:45:12PM +0900, Akihiko Odaki wrote: > >> On 2024/07/29 12:50, Jason Wang wrote: > >>> On Sun, Jul 28, 2024 at 11:19 PM Akihiko Odaki > >>> wrote: > > On 2024/07

Re: [PATCH v1] target/s390x: move @deprecated-props to CpuModelExpansion Info

2024-07-29 Thread David Hildenbrand
+bitmap_zero(deprecated_feats, S390_FEAT_MAX); +s390_get_deprecated_features(deprecated_feats); + +if (delta_changes) { +/* + * Only populate deprecated features that are a + * subset of the features enabled on the CPU model. + */ +bitmap_an

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-29 Thread Jonah Palmer
On 7/29/24 2:20 PM, Eugenio Perez Martin wrote: On Mon, Jul 29, 2024 at 7:50 PM Jonah Palmer wrote: On 7/29/24 6:04 AM, Eugenio Perez Martin wrote: On Wed, Jul 24, 2024 at 7:00 PM Jonah Palmer wrote: On 5/13/24 11:56 PM, Jason Wang wrote: On Mon, May 13, 2024 at 5:58 PM Eugenio Per

Re: [PATCH v1] target/s390x: move @deprecated-props to CpuModelExpansion Info

2024-07-29 Thread Collin Walling
On 7/29/24 10:22 AM, David Hildenbrand wrote: The simplest way to address 4 is to tack 'if': 'TARGET_S390X' to @deprecated-props. >>> >>> diff --git a/qapi/machine-target.json b/qapi/machine-target.json >>> index 09dec2b9bb..0be95d559c 100644 >>> --- a/qapi/machine-target.json >>> ++

[PATCH v2] Hexagon: fix F2_conv_* instructions for negative zero

2024-07-29 Thread Matheus Tavares Bernardino
The implementation for these instructions handles -0 as an invalid float point value, whereas the Hexagon hardware considers it the same as +0 (which is valid). Let's fix that and add a regression test. Signed-off-by: Matheus Tavares Bernardino Reviewed-by: Brian Cain Reviewed-by: Taylor Simpson

[PATCH v2 2/2] hw/misc/aspeed_hace: Fix SG Accumulative hashing

2024-07-29 Thread Alejandro Zeise
Make the Aspeed HACE module use the new qcrypto accumulative hashing functions when in scatter-gather accumulative mode. A hash context will maintain a "running-hash" as each scatter-gather chunk is received. Previously each scatter-gather "chunk" was cached so the hash could be computed once the

[PATCH v2 1/2] crypto: add support for accumulative hashing

2024-07-29 Thread Alejandro Zeise
This change adds an accumulative hashing function (qcrypto_hash_accumulate_bytesv) and implementation for each of the crypto library backends that QEMU supports. The QCrypto API did not support hashing in an accumulative mode. As such, hardware hash modules (like the HACE from Aspeed's SoCs) are u

[PATCH v2 0/2] hw/misc/aspeed_hace: Fix SG Accumulative Hash Calculations

2024-07-29 Thread Alejandro Zeise
The goal of this patch series is to fix accumulative hashing support in the Aspeed HACE module. The issue that stemmed this patch was a failure to boot an OpenBMC image using the "ast2600-evb" machine. The U-boot 2019.04 loader failed to verify image hashes. These incorrect image hashes given by

RE: [PATCH] Hexagon: fix F2_conv_* instructions for negative zero

2024-07-29 Thread ltaylorsimpson
> -Original Message- > From: Matheus Tavares Bernardino > Sent: Sunday, July 28, 2024 11:16 AM > To: qemu-devel@nongnu.org > Cc: ltaylorsimp...@gmail.com; bc...@quicinc.com; sidn...@quicinc.com; > a...@rev.ng; a...@rev.ng > Subject: [PATCH] Hexagon: fix F2_conv_* instructions for negati

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-29 Thread Eugenio Perez Martin
On Mon, Jul 29, 2024 at 7:50 PM Jonah Palmer wrote: > > > > On 7/29/24 6:04 AM, Eugenio Perez Martin wrote: > > On Wed, Jul 24, 2024 at 7:00 PM Jonah Palmer > > wrote: > >> > >> > >> > >> On 5/13/24 11:56 PM, Jason Wang wrote: > >>> On Mon, May 13, 2024 at 5:58 PM Eugenio Perez Martin > >>> wro

[PATCH v2 13/24] target/riscv: implement zicfiss instructions

2024-07-29 Thread Deepak Gupta
zicfiss has following instructions - sspopchk: pops a value from shadow stack and compares with x1/x5. If they dont match, reports a sw check exception with tval = 3. - sspush: pushes value in x1/x5 on shadow stack - ssrdp: reads current shadow stack - ssamoswap: swaps contents of shadow sta

[PATCH v2 24/24] linux-user/riscv: Adding zicfiss/lp extension in hwprobe syscall

2024-07-29 Thread Deepak Gupta
Add zicfiss/lp extensions in the ext0 key of hwprobe syscall. It is aligned with Linux CFI patchset. Signed-off-by: Jim Shu Signed-off-by: Deepak Gupta --- linux-user/syscall.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f879be7cfe

[PATCH v2 21/24] target/riscv: add trace-hooks for each case of sw-check exception

2024-07-29 Thread Deepak Gupta
Violations to control flow rules setup by zicfilp and zicfiss lead to software check exceptions. To debug and fix such sw check issues in guest , add trace-hooks for each case. Signed-off-by: Jim Shu Signed-off-by: Deepak Gupta --- target/riscv/insn_trans/trans_rvi.c.inc | 1 + target/riscv/op_

[PATCH v2 20/24] disas/riscv: enable disassembly for compressed sspush/sspopchk

2024-07-29 Thread Deepak Gupta
sspush and sspopchk have equivalent compressed encoding taken from zcmop. cmop.1 is sspush x1 while cmop.5 is sspopchk x5. Due to unusual encoding for both rs1 and rs2 from space bitfield, this required a new codec. Signed-off-by: Deepak Gupta --- disas/riscv.c | 19 ++- disas/ri

[PATCH v2 08/24] linux-user/syscall: introduce prctl for indirect branch tracking

2024-07-29 Thread Deepak Gupta
Each application enables indirect branch tracking (forward cfi) for itself via prctl. Adding branch tracking prctl in linux-user/syscall. Using same prctl code as proposed in cfi patches in kernel mailing list [1] [1] - https://lore.kernel.org/all/20240403234054.2020347-1-de...@rivosinc.com/ Sig

[PATCH v2 05/24] target/riscv: tracking indirect branches (fcfi) for zicfilp

2024-07-29 Thread Deepak Gupta
zicfilp protects forward control flow (if enabled) by enforcing all indirect call and jmp must land on a landing pad instruction `lpad`. If target of an indirect call or jmp is not `lpad` then cpu/hart must raise a sw check exception with tval = 2. This patch implements the mechanism using TCG. Ta

[PATCH v2 00/24] riscv support for control flow integrity extensions

2024-07-29 Thread Deepak Gupta
Sending out v2 for riscv zicfilp and zicfiss extensions support in qemu. I sent out v1 [1] last week and had missed adding `trans_zicfiss.c.inc` in commit titled "implement zicifss instructions" and commit titled "shadow stack mmu index for shadow stack instructions". Revising both those commits an

[PATCH v2 06/24] target/riscv: zicfilp `lpad` impl and branch tracking

2024-07-29 Thread Deepak Gupta
Implements setting lp expected when `jalr` is encountered and implements `lpad` instruction of zicfilp. `lpad` instruction is taken out of auipc x0, . This is an existing HINTNOP space. If `lpad` is target of an indirect branch, cpu checks for 20 bit value in x7 upper with 20 bit value embedded in

[PATCH v2 09/24] linux-user/riscv: implement indirect branch tracking prctls

2024-07-29 Thread Deepak Gupta
Implements indirect branch tracking prctls for riscv. Setting and clearing branch tracking prctl simply turns on/off `ufcfien` field in `env`. tb flush is needed because branch tracking itself leverages tb creation logic. locking branch tracking (forward cfi) is not implemented yet (no need yet) b

[PATCH v2 10/24] target/riscv: Add zicfiss extension

2024-07-29 Thread Deepak Gupta
zicfiss [1] riscv cpu extension enables backward control flow integrity. This patch sets up space for zicfiss extension in cpuconfig. And imple- ments dependency on zicsr, zimop and zcmop extensions. [1] - https://github.com/riscv/riscv-cfi Signed-off-by: Deepak Gupta Co-developed-by: Jim Shu

[PATCH v2 12/24] target/riscv: tb flag for shadow stack instructions

2024-07-29 Thread Deepak Gupta
Shadow stack instructions can be decoded as zimop / zcmop or shadow stack instructions depending on whether shadow stack are enabled at current privilege. This requires a TB flag so that correct TB generation and correct TB lookup happens. `DisasContext` gets a field indicating whether bcfi is enab

[PATCH v2 04/24] target/riscv: additional code information for sw check

2024-07-29 Thread Deepak Gupta
sw check exception support was recently added. This patch further augments sw check exception by providing support for additional code which is provided in *tval. Adds `sw_check_code` field in cpuarchstate. Whenever sw check exception is raised *tval gets the value deposited in `sw_check_code`. Si

[PATCH v2 14/24] target/riscv: compressed encodings for sspush and sspopchk

2024-07-29 Thread Deepak Gupta
sspush/sspopchk have compressed encodings carved out of zcmops. compressed sspush is designated as c.mop.1 while compressed sspopchk is designated as c.mop.5. Note that c.sspush x1 exists while c.sspush x5 doesn't. Similarly c.sspopchk x5 exists while c.sspopchk x1 doesn't. Signed-off-by: Deepak

[PATCH v2 16/24] target/riscv: shadow stack mmu index for shadow stack instructions

2024-07-29 Thread Deepak Gupta
Shadow stack instructions shadow stack mmu index for load/stores. `MMU_IDX_SS_ACCESS` at bit positon 3 is used as shadow stack index. Shadow stack mmu index depend on privilege and SUM bit. If shadow stack accesses happening in user mode, shadow stack mmu index = 0b1000. If shaodw stack access happ

[PATCH v2 07/24] disas/riscv: enabled `lpad` disassembly

2024-07-29 Thread Deepak Gupta
Signed-off-by: Deepak Gupta Co-developed-by: Jim Shu Co-developed-by: Andy Chiu --- disas/riscv.c | 18 +- disas/riscv.h | 2 ++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/disas/riscv.c b/disas/riscv.c index c8364c2b07..c7c92acef7 100644 --- a/disas/riscv.c

[PATCH v2 23/24] linux-user: Add RISC-V zicfilp support in VDSO

2024-07-29 Thread Deepak Gupta
Add zicfilp support in VDSO. VDSO functions need lpad instruction so that userspace could call this function when landing pad extension is enabled. This solution only works when toolchain always use landing pad label 1. Otherwise, If extension is not enabled, lpad instructions will be lui instruct

[PATCH v2 19/24] disas/riscv: enable disassembly for zicfiss instructions

2024-07-29 Thread Deepak Gupta
Enable disassembly for sspush, sspopchk, ssrdp & ssamoswap. Disasembly is only enabled if zimop and zicfiss ext is set to true. Signed-off-by: Deepak Gupta --- disas/riscv.c | 34 ++ disas/riscv.h | 1 + 2 files changed, 35 insertions(+) diff --git a/disas/riscv

[PATCH v2 11/24] target/riscv: introduce ssp and enabling controls for zicfiss

2024-07-29 Thread Deepak Gupta
zicfiss introduces a new state ssp ("shadow stack register") in cpu. ssp is expressed as a new unprivileged csr (CSR_SSP=0x11) and holds virtual address for shadow stack as programmed by software. Shadow stack (for each mode) is enabled via bit3 in *envcfg CSRs. Shadow stack can be enabled for a m

[PATCH v2 15/24] target/riscv: mmu changes for zicfiss shadow stack protection

2024-07-29 Thread Deepak Gupta
zicfiss protects shadow stack using new page table encodings PTE.W=0, PTE.R=0 and PTE.X=0. This encoding is reserved if zicfiss is not implemented or if shadow stack are not enabled. Loads on shadow stack memory are allowed while stores to shadow stack memory leads to access faults. Shadow stack ac

[PATCH v2 17/24] linux-user/syscall: introduce prctl for shadow stack enable/disable

2024-07-29 Thread Deepak Gupta
Each application enables shadow stack for itself via prctl. Using prctl codes as proposed in riscv cfi patches on kernel mailing list [1] [1] - https://lore.kernel.org/all/20240403234054.2020347-1-de...@rivosinc.com/ Signed-off-by: Deepak Gupta Co-developed-by: Jim Shu Co-developed-by: Andy Chi

[PATCH v2 03/24] target/riscv: save and restore elp state on priv transitions

2024-07-29 Thread Deepak Gupta
elp state is recorded in *status on trap entry (less privilege to higher privilege) and restored in elp from *status on trap exit (higher to less privilege). Additionally this patch introduces a forward cfi helper function to determine if current privilege has forward cfi is enabled or not based o

[PATCH v2 18/24] linux-user/riscv: setup/teardown zicfiss shadow stack for qemu-user

2024-07-29 Thread Deepak Gupta
Implements shadow stack related prctls for qemu-user on riscv. Allocates shadow stack from host memory using `target_mmap` and tears down when user issues prctl to disable using `target_munmap`. Signed-off-by: Deepak Gupta Co-developed-by: Jesse Huang Co-developed-by: Jim Shu Co-developed-by: A

[PATCH v2 22/24] linux-user: permit RISC-V CFI dynamic entry in VDSO

2024-07-29 Thread Deepak Gupta
RISC-V CFI use new processor-specific dynamic entry in ELF. Permit it in VDSO post-processing script. Signed-off-by: Jim Shu Signed-off-by: Deepak Gupta --- linux-user/gen-vdso-elfn.c.inc | 7 +++ 1 file changed, 7 insertions(+) diff --git a/linux-user/gen-vdso-elfn.c.inc b/linux-user/gen-

[PATCH v2 01/24] target/riscv: Add zicfilp extension

2024-07-29 Thread Deepak Gupta
zicfilp [1] riscv cpu extension enables forward control flow integrity. If enabled, all indirect calls must land on a landing pad instruction. This patch sets up space for zicfilp extension in cpuconfig. zicfilp is dependend on zicsr. [1] - https://github.com/riscv/riscv-cfi Signed-off-by: Deepa

[PATCH v2 02/24] target/riscv: Introduce elp state and enabling controls for zicfilp

2024-07-29 Thread Deepak Gupta
zicfilp introduces a new state elp ("expected landing pad") in cpu. During normal execution, elp is idle (NO_LP_EXPECTED) i.e not expecting landing pad. On an indirect call, elp moves LP_EXPECTED. When elp is LP_EXPECTED, only a subsquent landing pad instruction can set state back to NO_LP_EXPECTED

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-29 Thread Jonah Palmer
On 7/29/24 6:04 AM, Eugenio Perez Martin wrote: On Wed, Jul 24, 2024 at 7:00 PM Jonah Palmer wrote: On 5/13/24 11:56 PM, Jason Wang wrote: On Mon, May 13, 2024 at 5:58 PM Eugenio Perez Martin wrote: On Mon, May 13, 2024 at 10:28 AM Jason Wang wrote: On Mon, May 13, 2024 at 2:28 PM

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-07-29 Thread Daniel P . Berrangé
On Mon, Jul 29, 2024 at 01:00:30PM -0400, Peter Xu wrote: > On Mon, Jul 29, 2024 at 04:58:03PM +0100, Daniel P. Berrangé wrote: > > > > We've got two mutually conflicting goals with the machine type > > definitions. > > > > Primarily we use them to ensure stable ABI, but an important > > secondar

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-07-29 Thread Akihiko Odaki
On 2024/07/30 2:00, Peter Xu wrote: On Mon, Jul 29, 2024 at 04:58:03PM +0100, Daniel P. Berrangé wrote: On Fri, Jul 26, 2024 at 04:47:40PM -0400, Peter Xu wrote: On Fri, Jul 26, 2024 at 04:17:12PM +0100, Daniel P. Berrangé wrote: In terms of launching QEMU I'd imagine: $QEMU -machine pc-q

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-07-29 Thread Akihiko Odaki
On 2024/07/30 0:58, Daniel P. Berrangé wrote: On Fri, Jul 26, 2024 at 04:47:40PM -0400, Peter Xu wrote: On Fri, Jul 26, 2024 at 04:17:12PM +0100, Daniel P. Berrangé wrote: In terms of launching QEMU I'd imagine: $QEMU -machine pc-q35-9.1 -platform linux-6.9 ...args... Any virtual machine

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-07-29 Thread Peter Xu
On Mon, Jul 29, 2024 at 04:58:03PM +0100, Daniel P. Berrangé wrote: > On Fri, Jul 26, 2024 at 04:47:40PM -0400, Peter Xu wrote: > > On Fri, Jul 26, 2024 at 04:17:12PM +0100, Daniel P. Berrangé wrote: > > > > > > In terms of launching QEMU I'd imagine: > > > > > > $QEMU -machine pc-q35-9.1 -plat

Re: [PATCH 4/4] scsi-disk: Always report RESERVATION_CONFLICT to guest

2024-07-29 Thread Kevin Wolf
Am 29.07.2024 um 14:26 hat Paolo Bonzini geschrieben: > Il lun 29 lug 2024, 14:20 Kevin Wolf ha scritto: > > > Apparently both oVirt and Kubevirt unconditionally use the stop policy, > > so I'm afraid in this case we must acknowledge that our expectations > > don't match reality. > > > > Yeah, o

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-07-29 Thread Akihiko Odaki
On 2024/07/29 23:29, Peter Xu wrote: On Mon, Jul 29, 2024 at 01:45:12PM +0900, Akihiko Odaki wrote: On 2024/07/29 12:50, Jason Wang wrote: On Sun, Jul 28, 2024 at 11:19 PM Akihiko Odaki wrote: On 2024/07/27 5:47, Peter Xu wrote: On Fri, Jul 26, 2024 at 04:17:12PM +0100, Daniel P. Berrangé w

Re: [PATCH v4 3/6] target/arm: Always add pmu property for Armv7-A/R+

2024-07-29 Thread Akihiko Odaki
On 2024/07/30 0:13, Peter Maydell wrote: On Sat, 20 Jul 2024 at 10:31, Akihiko Odaki wrote: kvm-steal-time and sve properties are added for KVM even if the corresponding features are not available. Always add pmu property for Armv8. Note that the property is added only for Armv7-A/R+ as QEMU c

Re: [PATCH v4 6/6] acpi/ghes: Add a logic to inject ARM processor CPER

2024-07-29 Thread Jonathan Cameron via
On Mon, 29 Jul 2024 15:21:10 +0200 Mauro Carvalho Chehab wrote: > Add an ACPI APEI GHES error injection logic for ARM > processor CPER, allowing to set fields at from > UEFI spec 2.10 tables N.16 and N.17 to any valid > value. > > As some GHES functions require handling addresses, add > a helper

Re: [PATCH] hvf: arm: Allow creating VMs with > 63GB of RAM on macOS 15+

2024-07-29 Thread Peter Maydell
On Fri, 19 Jul 2024 at 00:03, Danny Canter wrote: > > This patch's main focus is to enable creating VMs with > 63GB > of RAM on Apple Silicon machines by using some new HVF APIs. In > pursuit of this a couple of things related to how we handle the > physical address range we expose to guests were

Re: [PULL 38/96] hw/ssi: Extend SPI model

2024-07-29 Thread Chalapathi V
On 29-07-2024 17:38, Cédric Le Goater wrote: On 7/26/24 01:53, Nicholas Piggin wrote: +static void transfer(PnvSpi *s, PnvXferBuffer *payload) +{ +    uint32_t tx; +    uint32_t rx; +    PnvXferBuffer *rsp_payload = NULL; + +    rsp_payload = pnv_spi_xfer_buffer_new(); +    for (int offset = 0

Re: [PATCH v3] ptp: Add vDSO-style vmclock support

2024-07-29 Thread David Woodhouse
On Mon, 2024-07-29 at 11:33 -0400, Michael S. Tsirkin wrote: > you said you will use __le here? I hadn't intended to bother until we add the virtio discovery and negotiation paths; it would basically be cosmetic for now. Although I *will* do so with the QEMU side before posting the latest version

Re: [PATCH v4 2/6] arm/virt: Wire up GPIO error source for ACPI / GHES

2024-07-29 Thread Jonathan Cameron via
On Mon, 29 Jul 2024 15:21:06 +0200 Mauro Carvalho Chehab wrote: > From: Jonathan Cameron > > Creates a Generic Event Device (GED) as specified at I wrote this a while back and wasn't aware of the naming mess around GED in the ACPI spec. This one is just referred to as 'error device' whereas t

  1   2   3   >