[PULL 14/16] target/xtensa: Restrict semihosting to TCG

2024-07-22 Thread Alex Bennée
From: Philippe Mathieu-Daudé The semihosting feature depends on TCG (due to the probe_access API access). Although TCG is the single accelerator currently available for the xtensa target, use the Kconfig "imply" directive which is more correct (if we were to support a different accel). Reported-

[PULL 13/16] target/riscv: Restrict semihosting to TCG

2024-07-22 Thread Alex Bennée
From: Philippe Mathieu-Daudé Semihosting currently uses the TCG probe_access API. To prepare for encoding the TCG dependency in Kconfig, do not enable it unless TCG is available. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Message-Id: <202407

Re: [PATCH v4 6/6] virtio: Add VIRTIO_F_IN_ORDER property definition

2024-07-22 Thread Eugenio Perez Martin
On Mon, Jul 22, 2024 at 1:11 PM Eugenio Perez Martin wrote: > > On Sat, Jul 20, 2024 at 9:16 PM Michael S. Tsirkin wrote: > > > > On Wed, Jul 10, 2024 at 08:55:19AM -0400, Jonah Palmer wrote: > > > Extend the virtio device property definitions to include the > > > VIRTIO_F_IN_ORDER feature. > > >

Re: [PATCH v4] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-07-22 Thread Daniil Tatianin
Ping :) Any ideas on this? On 7/17/24 10:57 AM, Daniil Tatianin wrote: On 5/29/24 6:27 PM, Philippe Mathieu-Daudé wrote: On 29/5/24 16:34, Markus Armbruster wrote: Daniil Tatianin writes: On 5/29/24 4:39 PM, Philippe Mathieu-Daudé wrote: On 29/5/24 14:43, Daniil Tatianin wrote: On 5/29

[RFC PATCH v5 3/8] CI: Add build-system-rust-debian job

2024-07-22 Thread Manos Pitsidianakis
Add job that builds with rust support enabled on debian. Signed-off-by: Manos Pitsidianakis --- .gitlab-ci.d/buildtest.yml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index e3a0758bd9..e025e2cbf6 100644 --- a/.gitlab-ci

[RFC PATCH v5 6/8] rust: add crate to expose bindings and interfaces

2024-07-22 Thread Manos Pitsidianakis
Add rust/qemu-api, which exposes rust-bindgen generated FFI bindings and provides some declaration macros for symbols visible to the rest of QEMU. Signed-off-by: Manos Pitsidianakis --- MAINTAINERS | 6 ++ rust/meson.build | 13 +++ rust/qemu-api/.gitign

[RFC PATCH v5 1/8] build-sys: Add rust feature option

2024-07-22 Thread Manos Pitsidianakis
Add rust feature in meson.build, configure, to prepare for adding Rust code in the followup commits. Signed-off-by: Manos Pitsidianakis --- MAINTAINERS | 5 + configure | 12 meson.build | 17 - Kconfig

[RFC PATCH v5 4/8] rust: add bindgen step as a meson dependency

2024-07-22 Thread Manos Pitsidianakis
Add bindings_rs target for generating rust bindings to target-independent qemu C APIs. The bindings need be created before any rust crate that uses them is compiled. The bindings.rs file will end up in BUILDDIR/bindings.rs and have the same name as a target: ninja bindings.rs Signed-off-by: M

[RFC PATCH v5 5/8] .gitattributes: add Rust diff and merge attributes

2024-07-22 Thread Manos Pitsidianakis
Set rust source code to diff=rust (built-in with new git versions) and merge=binary for Cargo.lock files (they should not be merged but auto-generated by cargo) Reviewed-by: Alex Bennée Signed-off-by: Manos Pitsidianakis --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/

[RFC PATCH v5 2/8] build deps: update lcitool to include rust bits

2024-07-22 Thread Manos Pitsidianakis
From: Alex Bennée For rust development we need cargo, rustc and bindgen in our various development environments. Update the libvirt-ci project to (!495) and regenerate the containers and other dependency lists. Signed-off-by: Alex Bennée Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Ma

[RFC PATCH v5 0/8] Add Rust support, implement ARM PL011

2024-07-22 Thread Manos Pitsidianakis
Changes from v4->v5: - Added CI patch from Alex Benee - Removed all cargo use, use meson rust support - Added Kconfig logic Changes from v3->v4: - Add rust-specific files to .gitattributes - Added help text to scripts/cargo_wrapper.py arguments (thanks Stephan) - Split bindings separate crate - Ad

[RFC PATCH v5 7/8] rust: add PL011 device model

2024-07-22 Thread Manos Pitsidianakis
This commit adds a re-implementation of hw/char/pl011.c in Rust. How to build: 1. Configure a QEMU build with: --enable-system --target-list=aarch64-softmmu --enable-rust 2. Launching a VM with qemu-system-aarch64 should use the Rust version of the pl011 device Signed-off-by: Manos Pitsidi

Re: [RFC PATCH v5 16/16] hw/char/pl011: Implement TX FIFO

2024-07-22 Thread Philippe Mathieu-Daudé
On 19/7/24 23:25, Mark Cave-Ayland wrote: On 19/07/2024 19:10, Philippe Mathieu-Daudé wrote: If the UART back-end chardev doesn't drain data as fast as stdout does or blocks, buffer in the TX FIFO to try again later. This avoids having the IO-thread busy waiting on chardev back-ends, reported

Re: [PATCH 1/2] mips/loongson3_virt: remove useless type cast

2024-07-22 Thread Peter Maydell
On Mon, 22 Jul 2024 at 10:19, Yao Xingtao via wrote: > > The type of kernel_entry, kernel_low and kernel_high is uint64_t, cast > the pointer of this type to uint64_t* is useless. > > Signed-off-by: Yao Xingtao > --- > hw/mips/loongson3_virt.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 delet

Re: [PATCH 2/2] nvme/ctrl: remove useless type cast

2024-07-22 Thread Peter Maydell
On Mon, 22 Jul 2024 at 10:19, Yao Xingtao via wrote: > > The type of req->cmd is NvmeCmd, cast the pointer of this type to > NvmeCmd* is useless. > > Signed-off-by: Yao Xingtao > --- > hw/nvme/ctrl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/nvme/ctrl.c b/hw/nvm

Re: [PATCH 3/3] util/fifo8: Introduce fifo8_change_capacity()

2024-07-22 Thread Peter Maydell
On Mon, 22 Jul 2024 at 11:56, Philippe Mathieu-Daudé wrote: > > On 19/7/24 22:21, Mark Cave-Ayland wrote: > > On 19/07/2024 16:16, Philippe Mathieu-Daudé wrote: > > > >> FIFOs can be resized at runtime. Introduce the > >> fifo8_change_capacity() method to do that. > >> When capacity is changed, th

Re: [PATCH 2/2] nvme/ctrl: remove useless type cast

2024-07-22 Thread Klaus Jensen
On Jul 22 05:17, Yao Xingtao wrote: > The type of req->cmd is NvmeCmd, cast the pointer of this type to > NvmeCmd* is useless. > > Signed-off-by: Yao Xingtao > --- > hw/nvme/ctrl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c > index 5

Re: [PATCH] [PATCH] system/memory: Fix max access size

2024-07-22 Thread Paolo Bonzini
On Sat, Jul 20, 2024 at 4:30 PM Peter Maydell wrote: > If the HPET timer device is supposed to permit 64 bit writes and it is not > doing so, then that needs to be fixed in the HPET timer device model, by > making sure that its read/write functions correctly handle the size=8 case > and then setti

Re: [PATCH 1/8] hw/core: Make CPU topology enumeration arch-agnostic

2024-07-22 Thread Markus Armbruster
Zhao Liu writes: > Cache topology needs to be defined based on CPU topology levels. Thus, > define CPU topology enumeration in qapi/machine.json to make it generic > for all architectures. > > To match the general topology naming style, rename CPU_TOPO_LEVEL_SMT > and CPU_TOPO_LEVEL_PACKAGE to CP

Re: [PATCH v3 03/12] target/arm: Use set/clear_helper_retaddr in SVE and SME helpers

2024-07-22 Thread Peter Maydell
On Fri, 19 Jul 2024 at 02:08, Richard Henderson wrote: > > Avoid a race condition with munmap in another thread. > Use around blocks that exclusively use "host_fn". > Keep the blocks as small as possible, but without setting > and clearing for every operation on one page. > > Signed-off-by: Richar

Re: [PATCH qemu] ui/gtk: Reuse input event slots for GdkEventTouch

2024-07-22 Thread Sergio Lopez Pascual
Marc-André Lureau writes: > Hi > > Adding Sergio in CC, who wrote that code. I don't have means to test it, > which also limits my understanding and ability to check this. > > On Sat, Jul 20, 2024 at 11:58 PM ~katharine_chui > wrote: > >> From: Katharine Chui >> >> There seems to be no guarante

[PULL 01/12] tests/avocado/boot_xen.py: merge base classes

2024-07-22 Thread Thomas Huth
From: Cleber Rosa While it's a good practice to have reusable base classes, in this specific case there's no other user of the BootXenBase class. By unifying the class used in this test, we can improve readability and have the opportunity to add some future improvements in a clearer fashion. Si

[PULL 00/12] QTests, Avocado and s390x fixes for 9.1 softfreeze

2024-07-22 Thread Thomas Huth
Hi Richard! The following changes since commit a7ddb48bd1363c8bcdf42776d320289c42191f01: Merge tag 'pull-aspeed-20240721' of https://github.com/legoater/qemu into staging (2024-07-22 07:52:05 +1000) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-reques

[PULL 02/12] tests/avocado/boot_xen.py: unify tags

2024-07-22 Thread Thomas Huth
From: Cleber Rosa Because all tests share the same tags, it's possible to have all of them at the class level. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231208190911.102879-10-cr...@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/boot_xen.py | 26

[PULL 03/12] tests/avocado/boot_xen.py: use class attribute

2024-07-22 Thread Thomas Huth
From: Cleber Rosa Rather than defining a single use variable, let's just use the class attribute directly. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231208190911.102879-11-cr...@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/boot_xen.py | 3 +--

[PULL 04/12] tests/avocado: Allow overwriting AVOCADO_SHOW env variable

2024-07-22 Thread Thomas Huth
From: Philippe Mathieu-Daudé The 'app' level logging is useful, but sometimes we want more, for example QEMU leverages the 'console' logging. Allow overwriting AVOCADO_SHOW from environment, i.e.: $ make check-avocado AVOCADO_SHOW='app,console' Signed-off-by: Philippe Mathieu-Daudé Message-

[PULL 05/12] tests/avocado: Move LinuxTest related code into a separate file

2024-07-22 Thread Thomas Huth
Only some few tests are using the LinuxTest class. Move the related code into a separate file so that this does not pollute the main namespace. Message-ID: <20240719095031.32814-1-th...@redhat.com> Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Da

[PULL 06/12] tests/avocado/mem-addr-space-check: Remove unused "import signal"

2024-07-22 Thread Thomas Huth
The "signal" module is not used here, so we can remove this import statement. Message-ID: <20240719095408.33298-1-th...@redhat.com> Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- tests/avocado/mem-addr-space-check.py | 1 - 1 file changed, 1

[PULL 10/12] qtest/fuzz: make range overlap check more readable

2024-07-22 Thread Thomas Huth
From: Yao Xingtao use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Alexander Bulekov Message-ID: <20240722040742.11513-8-yaoxt.f.

[PULL 07/12] tests/avocado: Remove the remainders of the virtiofs_submounts test

2024-07-22 Thread Thomas Huth
The virtiofs_submounts test has been removed in commit 5da7701e2a ("virtiofsd: Remove test"), so we don't need this files anymore. Message-ID: <20240718173125.489901-1-th...@redhat.com> Signed-off-by: Thomas Huth --- .../virtiofs_submounts.py.data/cleanup.sh | 46 -- .../guest-cleanup.s

[PULL 12/12] target/s390x: filter deprecated properties based on model expansion type

2024-07-22 Thread Thomas Huth
From: Collin Walling Currently, there is no way to execute the query-cpu-model-expansion command to retrieve a comprehenisve list of deprecated properties, as the result is dependent per-model. To enable this, the expansion output is modified as such: When reporting a "full" CPU model, show the

Re: [PATCH qemu] ui/gtk: Reuse input event slots for GdkEventTouch

2024-07-22 Thread Marc-André Lureau
Hi On Mon, Jul 22, 2024 at 3:58 PM Sergio Lopez Pascual wrote: > Marc-André Lureau writes: > > > Hi > > > > Adding Sergio in CC, who wrote that code. I don't have means to test it, > > which also limits my understanding and ability to check this. > > > > On Sat, Jul 20, 2024 at 11:58 PM ~kathar

[PULL 09/12] hw: Fix crash that happens when introspecting scsi-block on older machine types

2024-07-22 Thread Thomas Huth
"make check SPEED=slow" is currently failing the device-introspect-test on older machine types since introspecting "scsi-block" is causing an abort: $ ./qemu-system-x86_64 -M pc-q35-8.0 -monitor stdio QEMU 9.0.50 monitor - type 'help' for more information (qemu) device_add scsi-block,help Unex

[PULL 08/12] tests/avocado/machine_aspeed.py: Increase timeout for TPM test

2024-07-22 Thread Thomas Huth
From: Cédric Le Goater On some runners, test_arm_ast2600_evb_buildroot_tpm can take longer than 90s to complete. Increase timeout for these. Reported-by: Thomas Huth Signed-off-by: Cédric Le Goater Message-ID: <20240722085547.90650-1-...@redhat.com> Signed-off-by: Thomas Huth --- tests/avoca

[PULL 11/12] tests: increase timeout per instance of bios-tables-test

2024-07-22 Thread Thomas Huth
From: Igor Mammedov CI often fails 'cross-i686-tci' job due to runner slowness Log shows that test almost complete, with a few remaining when bios-tables-test timeout hits: 19/270 qemu:qtest+qtest-aarch64 / qtest-aarch64/bios-tables-test TIMEOUT610.02s killed by signal 15 SIGTERM

[PATCH 3/7] hpet: remove unnecessary variable "index"

2024-07-22 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/timer/hpet.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index bbb1e5f0897..380e272fbeb 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -437,12 +437,12 @@ static uint64_t hpet_ram_r

[PATCH 1/7] hpet: fix and cleanup persistence of interrupt status

2024-07-22 Thread Paolo Bonzini
There are several bugs in the handling of the ISR register: - switching level->edge was not lowering the interrupt and clearing ISR - switching on the enable bit was not raising a level-triggered interrupt if the timer had fired - the timer must be kept running even if not enabled, in orde

[PATCH 2/7] hpet: ignore high bits of comparator in 32-bit mode

2024-07-22 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/timer/hpet.c | 4 hw/timer/trace-events | 1 + 2 files changed, 5 insertions(+) diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index 58073df02b5..bbb1e5f0897 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -585,6 +585,10 @@ static void hpet_ra

[PATCH 6/7] hpet: store full 64-bit target value of the counter

2024-07-22 Thread Paolo Bonzini
Store the full 64-bit value at which the timer should fire. This makes it possible to skip the imprecise hpet_calculate_diff() step, and to remove the clamping of the period to 31 or 63 bits. Signed-off-by: Paolo Bonzini --- hw/timer/hpet.c | 111 +---

[PATCH 7/7] hpet: avoid timer storms on periodic timers

2024-07-22 Thread Paolo Bonzini
If the period is set to a value that is too low, there could be no time left to run the rest of QEMU. Do not trigger interrupts faster than 1 MHz. Signed-off-by: Paolo Bonzini --- hw/timer/hpet.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/timer/hpet.c

[PATCH 4/7] hpet: place read-only bits directly in "new_val"

2024-07-22 Thread Paolo Bonzini
The variable "val" is used for two different purposes. As an intermediate value when writing configuration registers, and to store the cleared bits when writing ISR. Use "new_val" for the former, and rename the variable so that it is clearer for the latter case. Signed-off-by: Paolo Bonzini ---

[PATCH 5/7] hpet: accept 64-bit reads and writes

2024-07-22 Thread Paolo Bonzini
Declare the MemoryRegionOps so that 64-bit reads and writes to the HPET are received directly. This makes it possible to unify the code to process low and high parts: for 32-bit reads, extract the desired word; for 32-bit writes, just merge the desired part into the old value and proceed as with a

[PATCH 0/7] hpet: fixes for 64-bit mode and interrupt status registers

2024-07-22 Thread Paolo Bonzini
The main fixes are in patches 1 and 5: - switching level->edge was not lowering the interrupt and clearing ISR - switching on the enable bit was not raising a level-triggered interrupt if the timer had fired - the timer must be kept running even if not enabled, in order to set the ISR flag

Re: [PATCH v3 08/12] target/ppc: Improve helper_dcbz for user-only

2024-07-22 Thread Peter Maydell
On Fri, 19 Jul 2024 at 02:08, Richard Henderson wrote: > > Mark the reserve_addr check unlikely. Use tlb_vaddr_to_host > instead of probe_write, relying on the memset itself to test > for page writability. Use set/clear_helper_retaddr so that > we can properly unwind on segfault. > > With this,

Re: [PATCH v3 10/12] target/s390x: Use user_or_likely in access_memmove

2024-07-22 Thread Peter Maydell
On Fri, 19 Jul 2024 at 02:08, Richard Henderson wrote: > > Invert the conditional, indent the block, and use the macro > that expands to true for user-only. > > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/mem_helper.c | 54 +-- > 1 file changed, 26 i

Re: [PATCH 1/2] mips/loongson3_virt: remove useless type cast

2024-07-22 Thread Philippe Mathieu-Daudé
On 22/7/24 11:17, Yao Xingtao wrote: The type of kernel_entry, kernel_low and kernel_high is uint64_t, cast the pointer of this type to uint64_t* is useless. Signed-off-by: Yao Xingtao --- hw/mips/loongson3_virt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Phili

Re: [PATCH v3 11/12] target/s390x: Use set/clear_helper_retaddr in mem_helper.c

2024-07-22 Thread Peter Maydell
On Fri, 19 Jul 2024 at 02:09, Richard Henderson wrote: > > Avoid a race condition with munmap in another thread. > For access_memset and access_memmove, manage the value > within the helper. For uses of access_{get,set}_byte, > manage the value across the for loops. > > Signed-off-by: Richard Hen

Re: [PATCH 08/13] sparc/ldst_helper: make range overlap check more readable

2024-07-22 Thread Philippe Mathieu-Daudé
On 22/7/24 06:07, Yao Xingtao via wrote: use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- target/sparc/ldst_helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/sparc/ldst_

Re: [PATCH 3/3] util/fifo8: Introduce fifo8_change_capacity()

2024-07-22 Thread Philippe Mathieu-Daudé
On 22/7/24 13:52, Peter Maydell wrote: On Mon, 22 Jul 2024 at 11:56, Philippe Mathieu-Daudé wrote: On 19/7/24 22:21, Mark Cave-Ayland wrote: On 19/07/2024 16:16, Philippe Mathieu-Daudé wrote: FIFOs can be resized at runtime. Introduce the fifo8_change_capacity() method to do that. When capa

Re: [PATCH qemu] ui/gtk: Reuse input event slots for GdkEventTouch

2024-07-22 Thread Sergio Lopez Pascual
Marc-André Lureau writes: > Hi > > On Mon, Jul 22, 2024 at 3:58 PM Sergio Lopez Pascual wrote: > >> Marc-André Lureau writes: >> >> > Hi >> > >> > Adding Sergio in CC, who wrote that code. I don't have means to test it, >> > which also limits my understanding and ability to check this. >> > >>

Re: [PATCH for-9.0] qapi: drop unused QCryptoBlockCreateOptionsLUKS.detached-header

2024-07-22 Thread Daniel P . Berrangé
On Tue, Mar 19, 2024 at 05:06:07PM +0100, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > The 'detached-header' field in QCryptoBlockCreateOptionsLUKS > > was left over from earlier patch iterations. > > > > Signed-off-by: Daniel P. Berrangé > > --- > > qapi/crypto.json | 5 + >

Re: [PATCH] docs: add more information about CXL2.0 device type

2024-07-22 Thread Jonathan Cameron via
On Fri, 19 Jul 2024 12:57:33 +0800 luzhixing12345 wrote: > Add more information with CXL type1 and type2 devices. > > Original doc says "May also have device private memory accessible > via means such as PCI memory reads and writes to BARs.", but actually > CXL type1 devices doesn't have device

[PATCH 3/5] crypto: drop gnutls debug logging support

2024-07-22 Thread Daniel P . Berrangé
GNUTLS already supports dynamically enabling its logging at runtime by setting the env var 'GNUTLS_DEBUG_LEVEL=10', so there is no need to re-invent this logic in QEMU in a way that requires a re-compile. Signed-off-by: Daniel P. Berrangé --- crypto/init.c | 11 --- 1 file changed, 11 de

[PATCH 2/5] chardev: add tracing of socket error conditions

2024-07-22 Thread Daniel P . Berrangé
This adds trace points to every error scenario in the chardev socket backend that can lead to termination of the connection. Signed-off-by: Daniel P. Berrangé --- chardev/char-socket.c | 34 +- chardev/trace-events | 10 ++ 2 files changed, 31 insertions(

[PATCH 4/5] crypto: push error reporting into TLS session I/O APIs

2024-07-22 Thread Daniel P . Berrangé
The current TLS session I/O APIs just return a synthetic errno value on error, which has been translated from a gnutls error value. This looses a large amount of valuable information that distinguishes different scenarios. Pushing population of the "Error *errp" object into the TLS session I/O API

[PATCH 1/5] qapi: allow for g_autoptr(Error) usage

2024-07-22 Thread Daniel P . Berrangé
While common error propagation practice does not require manually free'ing of local 'Error' objects, there are some cases where this is needed. One example is where the 'Error' object is only used for providing info to a trace event probe. Supporting g_autoptr avoids the need to manually call 'erro

[PATCH 5/5] crypto: propagate errors from TLS session I/O callbacks

2024-07-22 Thread Daniel P . Berrangé
GNUTLS doesn't know how to perform I/O on anything other than plain FDs, so the TLS session provides it with some I/O callbacks. The GNUTLS API design requires these callbacks to return a unix errno value, which means we're currently loosing the useful QEMU "Error" object. This changes the I/O cal

[PATCH 0/5] crypto: improve error reporting detail

2024-07-22 Thread Daniel P . Berrangé
This small series came about after struggling to diagnose some problems with TLS, due to unhelpfully generic error messages. Daniel P. Berrangé (5): qapi: allow for g_autoptr(Error) usage chardev: add tracing of socket error conditions crypto: drop gnutls debug logging support crypto: push

Re: [PATCH 1/8] hw/core: Make CPU topology enumeration arch-agnostic

2024-07-22 Thread Markus Armbruster
One little thing... Zhao Liu writes: > Cache topology needs to be defined based on CPU topology levels. Thus, > define CPU topology enumeration in qapi/machine.json to make it generic > for all architectures. > > To match the general topology naming style, rename CPU_TOPO_LEVEL_SMT > and CPU_TOP

Re: [PATCH 2/8] qapi/qom: Introduce smp-cache object

2024-07-22 Thread Markus Armbruster
Zhao Liu writes: > Introduce smp-cache object so that user could define cache properties. > > In smp-cache object, define cache topology based on CPU topology level > with two reasons: > > 1. In practice, a cache will always be bound to the CPU container >(either private in the CPU container

Re: [PATCH 8/8] qemu-options: Add the description of smp-cache object

2024-07-22 Thread Markus Armbruster
Zhao Liu writes: > Signed-off-by: Zhao Liu This patch is just documentation. The code got added in some previous patch. Would it make sense to squash this patch into that previous patch? > --- > Changes since RFC v2: > * Rewrote the document of smp-cache object. > > Changes since RFC v1: >

Re: [PATCH V2 04/11] migration: stop vm earlier for cpr

2024-07-22 Thread Fabiano Rosas
Steven Sistare writes: > On 7/17/2024 2:59 PM, Fabiano Rosas wrote: >> Steve Sistare writes: >> >>> Stop the vm earlier for cpr, to guarantee consistent device state when >>> CPR state is saved. >>> >>> Signed-off-by: Steve Sistare >>> --- >>> migration/migration.c | 22 +

Re: [PATCH 1/8] hw/core: Make CPU topology enumeration arch-agnostic

2024-07-22 Thread Zhao Liu
Hi Markus, On Mon, Jul 22, 2024 at 03:24:24PM +0200, Markus Armbruster wrote: > Date: Mon, 22 Jul 2024 15:24:24 +0200 > From: Markus Armbruster > Subject: Re: [PATCH 1/8] hw/core: Make CPU topology enumeration > arch-agnostic > > One little thing... > > Zhao Liu writes: > > > Cache topology

Re: [PATCH] hw/vfio/container: Fix SIGSEV on vfio_container_instance_finalize()

2024-07-22 Thread Cédric Le Goater
On 7/19/24 18:50, Eric Auger wrote: In vfio_connect_container's error path, the base container is removed twice form the VFIOAddressSpace QLIST: first on the listener_release_exit label and second, on free_container_exit label, through object_unref(container), which calls vfio_container_instance_

Re: [PATCH 0/2] Don't initialize HOST_IOMMU_DEVICE with mdev

2024-07-22 Thread Cédric Le Goater
On 7/22/24 09:07, Zhenzhong Duan wrote: This fixes a potential issue with mdev that fails to initialize HOST_IOMMU_DEVICE. Reason is mdev isn't physical device and doesn't support IOMMU_GET_HW_INFO. I thought ap/ccw are all mdev type and need a fix. This series depends on a patch from Joao whi

Re: [PATCH v5 00/13] hw/iommufd: IOMMUFD Dirty Tracking

2024-07-22 Thread Cédric Le Goater
On 7/19/24 14:04, Joao Martins wrote: This small series adds support for IOMMU dirty tracking support via the IOMMUFD backend. The hardware capability is available on most recent x86 hardware. The series is divided organized as follows: * Patch 1-2: Fixes a regression into mdev support with IOMM

Re: [PATCH v16 00/13] Support blob memory and venus on qemu

2024-07-22 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Sun, Jun 23, 2024 at 06:23:30PM +0300, Dmitry Osipenko wrote: >> Hello, >> >> This series enables Vulkan Venus context support on virtio-gpu. >> >> All virglrender and almost all Linux kernel prerequisite changes >> needed by Venus are already in upstream. For

Re: [PATCH for-9.0] qapi: drop unused QCryptoBlockCreateOptionsLUKS.detached-header

2024-07-22 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Mar 19, 2024 at 05:06:07PM +0100, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> >> > The 'detached-header' field in QCryptoBlockCreateOptionsLUKS >> > was left over from earlier patch iterations. >> > >> > Signed-off-by: Daniel P. Berrangé >> >

Re: [PATCH v5 07/13] vfio/iommufd: Add hw_caps field to HostIOMMUDeviceCaps

2024-07-22 Thread Cédric Le Goater
On 7/19/24 14:04, Joao Martins wrote: Store the value of @caps returned by iommufd_backend_get_device_info() in a new field HostIOMMUDeviceCaps::hw_caps. Right now the only value is whether device IOMMU supports dirty tracking (IOMMU_HW_CAP_DIRTY_TRACKING). This is in preparation for HostIOMMUDe

Re: [PATCH v5 09/13] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-22 Thread Joao Martins
On 22/07/2024 09:58, Joao Martins wrote: > On 22/07/2024 07:05, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Joao Martins >>> Subject: [PATCH v5 09/13] vfio/iommufd: Probe and request hwpt dirty >>> tracking capability >>> >>> In preparation to using the dirty tracking UAP

Re: [PATCH v5 09/13] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-22 Thread Joao Martins
On 22/07/2024 15:09, Joao Martins wrote: > On 22/07/2024 09:58, Joao Martins wrote: >> On 22/07/2024 07:05, Duan, Zhenzhong wrote: >>> >>> -Original Message- From: Joao Martins Subject: [PATCH v5 09/13] vfio/iommufd: Probe and request hwpt dirty tracking capability

Re: [PATCH for-9.0] qapi: drop unused QCryptoBlockCreateOptionsLUKS.detached-header

2024-07-22 Thread Daniel P . Berrangé
On Mon, Jul 22, 2024 at 04:07:28PM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Tue, Mar 19, 2024 at 05:06:07PM +0100, Markus Armbruster wrote: > >> Daniel P. Berrangé writes: > >> > >> > The 'detached-header' field in QCryptoBlockCreateOptionsLUKS > >> > was left over

Re: [PATCH 2/8] qapi/qom: Introduce smp-cache object

2024-07-22 Thread Zhao Liu
Hi Markus, On Mon, Jul 22, 2024 at 03:33:13PM +0200, Markus Armbruster wrote: > Date: Mon, 22 Jul 2024 15:33:13 +0200 > From: Markus Armbruster > Subject: Re: [PATCH 2/8] qapi/qom: Introduce smp-cache object > > Zhao Liu writes: > > > Introduce smp-cache object so that user could define cache

Re: [PULL 29/63] hw/pci: Do not add ROM BAR for SR-IOV VF

2024-07-22 Thread Akihiko Odaki
On 2024/07/22 9:17, Michael S. Tsirkin wrote: From: Akihiko Odaki A SR-IOV VF cannot have a ROM BAR. Co-developed-by: Yui Washizu Signed-off-by: Akihiko Odaki Message-Id: <20240715-sriov-v5-1-3f5539093...@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- h

Re: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain creation

2024-07-22 Thread Cédric Le Goater
On 7/22/24 10:50, Joao Martins wrote: On 22/07/2024 06:16, Duan, Zhenzhong wrote: -Original Message- From: Joao Martins Subject: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain creation There's generally two modes of operation for IOMMUFD: 1) The simple user API which intends to

Re: [PATCH 8/8] qemu-options: Add the description of smp-cache object

2024-07-22 Thread Zhao Liu
Hi Markus, On Mon, Jul 22, 2024 at 03:37:43PM +0200, Markus Armbruster wrote: > Date: Mon, 22 Jul 2024 15:37:43 +0200 > From: Markus Armbruster > Subject: Re: [PATCH 8/8] qemu-options: Add the description of smp-cache > object > > Zhao Liu writes: > > > Signed-off-by: Zhao Liu > > This patc

Re: [PATCH] [PATCH] system/memory: Fix max access size

2024-07-22 Thread Philippe Mathieu-Daudé
On 22/7/24 13:53, Paolo Bonzini wrote: On Sat, Jul 20, 2024 at 4:30 PM Peter Maydell wrote: If the HPET timer device is supposed to permit 64 bit writes and it is not doing so, then that needs to be fixed in the HPET timer device model, by making sure that its read/write functions correctly han

Re: [PATCH 2/5] chardev: add tracing of socket error conditions

2024-07-22 Thread Philippe Mathieu-Daudé
On 22/7/24 15:16, Daniel P. Berrangé wrote: This adds trace points to every error scenario in the chardev socket backend that can lead to termination of the connection. Signed-off-by: Daniel P. Berrangé --- chardev/char-socket.c | 34 +- chardev/trace-events

Re: [PATCH 1/5] qapi: allow for g_autoptr(Error) usage

2024-07-22 Thread Philippe Mathieu-Daudé
On 22/7/24 15:16, Daniel P. Berrangé wrote: While common error propagation practice does not require manually free'ing of local 'Error' objects, there are some cases where this is needed. One example is where the 'Error' object is only used for providing info to a trace event probe. Supporting g_

Re: [PATCH 3/5] crypto: drop gnutls debug logging support

2024-07-22 Thread Philippe Mathieu-Daudé
On 22/7/24 15:16, Daniel P. Berrangé wrote: GNUTLS already supports dynamically enabling its logging at runtime by setting the env var 'GNUTLS_DEBUG_LEVEL=10', so there is no need to re-invent this logic in QEMU in a way that requires a re-compile. Signed-off-by: Daniel P. Berrangé --- crypto

Re: [PATCH 5/5] crypto: propagate errors from TLS session I/O callbacks

2024-07-22 Thread Philippe Mathieu-Daudé
On 22/7/24 15:16, Daniel P. Berrangé wrote: GNUTLS doesn't know how to perform I/O on anything other than plain FDs, so the TLS session provides it with some I/O callbacks. The GNUTLS API design requires these callbacks to return a unix errno value, which means we're currently loosing the useful

Re: [PATCH 4/5] crypto: push error reporting into TLS session I/O APIs

2024-07-22 Thread Philippe Mathieu-Daudé
On 22/7/24 15:16, Daniel P. Berrangé wrote: The current TLS session I/O APIs just return a synthetic errno value on error, which has been translated from a gnutls error value. This looses a large amount of valuable information that distinguishes different scenarios. Pushing population of the "Er

Re: [PATCH v3] target/s390x: filter deprecated properties based on model expansion type

2024-07-22 Thread Collin Walling
On 7/20/24 1:33 AM, Markus Armbruster wrote: > Collin Walling writes: > >> Currently, there is no way to execute the query-cpu-model-expansion >> command to retrieve a comprehenisve list of deprecated properties, as >> the result is dependent per-model. To enable this, the expansion output >> is

Re: [PATCH v5 12/13] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-22 Thread Cédric Le Goater
On 7/19/24 19:26, Joao Martins wrote: On 19/07/2024 15:24, Joao Martins wrote: On 19/07/2024 15:17, Cédric Le Goater wrote: On 7/19/24 14:05, Joao Martins wrote: By default VFIO migration is set to auto, which will support live migration if the migration capability is set *and* also dirty page

Re: [PATCH 2/2] vfio/ccw: Don't initialize HOST_IOMMU_DEVICE with mdev

2024-07-22 Thread Eric Farman
On Mon, 2024-07-22 at 15:07 +0800, Zhenzhong Duan wrote: > mdevs aren't "physical" devices and when asking for backing IOMMU info, > it fails the entire provisioning of the guest. Fix that by setting > vbasedev->mdev true so skipping HostIOMMUDevice initialization in the > presence of mdevs. Hmm,

Re: [PATCH v5 12/13] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-22 Thread Joao Martins
On 22/07/2024 15:53, Cédric Le Goater wrote: > On 7/19/24 19:26, Joao Martins wrote: >> On 19/07/2024 15:24, Joao Martins wrote: >>> On 19/07/2024 15:17, Cédric Le Goater wrote: On 7/19/24 14:05, Joao Martins wrote: > By default VFIO migration is set to auto, which will support live >

Re: [PATCH 3/5] crypto: drop gnutls debug logging support

2024-07-22 Thread Daniel P . Berrangé
On Mon, Jul 22, 2024 at 04:32:23PM +0200, Philippe Mathieu-Daudé wrote: > On 22/7/24 15:16, Daniel P. Berrangé wrote: > > GNUTLS already supports dynamically enabling its logging at runtime by > > setting the env var 'GNUTLS_DEBUG_LEVEL=10', so there is no need to > > re-invent this logic in QEMU i

Re: [PATCH 2/2] vfio/ccw: Don't initialize HOST_IOMMU_DEVICE with mdev

2024-07-22 Thread Joao Martins
On 22/07/2024 15:57, Eric Farman wrote: > On Mon, 2024-07-22 at 15:07 +0800, Zhenzhong Duan wrote: >> mdevs aren't "physical" devices and when asking for backing IOMMU info, >> it fails the entire provisioning of the guest. Fix that by setting >> vbasedev->mdev true so skipping HostIOMMUDevice init

Re: [PATCH v5 12/13] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-22 Thread Cédric Le Goater
On 7/22/24 17:01, Joao Martins wrote: On 22/07/2024 15:53, Cédric Le Goater wrote: On 7/19/24 19:26, Joao Martins wrote: On 19/07/2024 15:24, Joao Martins wrote: On 19/07/2024 15:17, Cédric Le Goater wrote: On 7/19/24 14:05, Joao Martins wrote: By default VFIO migration is set to auto, which

Re: [PATCH 2/2] vfio/ccw: Don't initialize HOST_IOMMU_DEVICE with mdev

2024-07-22 Thread Cédric Le Goater
On 7/22/24 17:09, Joao Martins wrote: On 22/07/2024 15:57, Eric Farman wrote: On Mon, 2024-07-22 at 15:07 +0800, Zhenzhong Duan wrote: mdevs aren't "physical" devices and when asking for backing IOMMU info, it fails the entire provisioning of the guest. Fix that by setting vbasedev->mdev true s

Re: [PATCH v5 12/13] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-22 Thread Joao Martins
On 22/07/2024 16:13, Cédric Le Goater wrote: > On 7/22/24 17:01, Joao Martins wrote: >> On 22/07/2024 15:53, Cédric Le Goater wrote: >>> On 7/19/24 19:26, Joao Martins wrote: On 19/07/2024 15:24, Joao Martins wrote: > On 19/07/2024 15:17, Cédric Le Goater wrote: >> On 7/19/24 14:05, Jo

Re: [PATCH 1/2] vfio/ap: Don't initialize HOST_IOMMU_DEVICE with mdev

2024-07-22 Thread Anthony Krowiak
On 7/22/24 5:18 AM, Joao Martins wrote: On 22/07/2024 08:07, Zhenzhong Duan wrote: mdevs aren't "physical" devices and when asking for backing IOMMU info, it fails the entire provisioning of the guest. Fix that by setting vbasedev->mdev true so skipping HostIOMMUDevice initialization in the pr

Re: [PATCH 1/2] vfio/ap: Don't initialize HOST_IOMMU_DEVICE with mdev

2024-07-22 Thread Joao Martins
On 22/07/2024 16:46, Anthony Krowiak wrote: > > On 7/22/24 5:18 AM, Joao Martins wrote: >> On 22/07/2024 08:07, Zhenzhong Duan wrote: >>> mdevs aren't "physical" devices and when asking for backing IOMMU info, >>> it fails the entire provisioning of the guest. Fix that by setting >>> vbasedev->mde

Re: [PATCH v5 12/13] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-22 Thread Cédric Le Goater
On 7/22/24 17:42, Joao Martins wrote: On 22/07/2024 16:13, Cédric Le Goater wrote: On 7/22/24 17:01, Joao Martins wrote: On 22/07/2024 15:53, Cédric Le Goater wrote: On 7/19/24 19:26, Joao Martins wrote: On 19/07/2024 15:24, Joao Martins wrote: On 19/07/2024 15:17, Cédric Le Goater wrote: O

[PATCH 1/4] gdbstub: Use specific MMU index when probing MTE addresses

2024-07-22 Thread Gustavo Romero
Use arm_mmu_idx() to determine the specific translation regime (MMU index) before probing addresses using allocation_tag_mem_probe(). Currently, the MMU index is hardcoded to 0 and only works for user mode. By obtaining the specific MMU index according to the translation regime, future use of the

[PATCH 2/4] gdbstub: Add support for MTE in system mode

2024-07-22 Thread Gustavo Romero
This commit makes handle_q_memtag, handle_q_isaddresstagged, and handle_Q_memtag stubs build for system mode, allowing all GDB 'memory-tag' subcommands to work with QEMU gdbstub on aarch64 system mode. Signed-off-by: Gustavo Romero --- target/arm/gdbstub64.c | 4 +--- 1 file changed, 1 insertion

[PATCH 4/4] tests/tcg/aarch64: Extend MTE gdbstub tests to system mode

2024-07-22 Thread Gustavo Romero
Extend MTE gdbstub tests to also run in system mode (share tests between user mode and system mode). The tests will only run if a version of GDB that supports MTE is available in the test environment and if available compiler supports the 'memtag' flag (-march=armv8.5-a+memtag). For the tests runn

[PATCH v2 0/7] util/fifo8: Rework fifo8_pop_buf()

2024-07-22 Thread Philippe Mathieu-Daudé
Rename current fifo8_pop_buf() as fifo8_pop_constbuf() and expose ESP's fifo8_pop_buf() which takes care of wrapped FIFO buffer. Supersedes: <20240719151628.46253-1-phi...@linaro.org> util/fifo8: Introduce fifo8_change_capacity() Philippe Mathieu-Daudé (7): chardev/char-fe: Document returned

[PATCH v2 3/7] util/fifo8: Use fifo8_reset() in fifo8_create()

2024-07-22 Thread Philippe Mathieu-Daudé
Avoid open-coding fifo8_reset() in fifo8_create(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- util/fifo8.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/util/fifo8.c b/util/fifo8.c index 4e01b532d9..2925fe5611 100644 --- a/util/

[PATCH v2 6/7] util/fifo8: Expose fifo8_pop_buf()

2024-07-22 Thread Philippe Mathieu-Daudé
Extract fifo8_pop_buf() from hw/scsi/esp.c and expose it as part of the API. This function takes care of non-contiguous (wrapped) FIFO buffer (which is an implementation detail). Suggested-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/fifo8.h | 14 ++

<    1   2   3   4   5   >