Re: [PATCH v8 00/18] Adding partial support for 128-bit riscv target

2025-04-03 Thread Alistair Francis
On Sat, Mar 22, 2025 at 1:09 AM Philippe Mathieu-Daudé wrote: > > Hi, > > On 6/1/22 22:00, Frédéric Pétrot wrote: > > This series of patches provides partial 128-bit support for the riscv > > target architecture, namely RVI and RVM, with minimal csr support. > > > > Frédéric Pétrot (18): > >ex

[PATCH 0/6] misc hexagon patches

2025-04-03 Thread Brian Cain
While preparing the system emulation patches, these ones stuck out as not-strictly-related to sysemu. We can review and apply them independently of those. Brian Cain (6): target/hexagon: handle .new values target/hexagon: Fix badva reference, delete CAUSE target/hexagon: Add missing A_CALL

[PATCH 3/6] target/hexagon: Add missing A_CALL attr, hintjumpr to multi_cof

2025-04-03 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/hex_common.py | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index 242dee3731..85eabc9876 100755 --- a/target/hexagon/hex_common.py +++ b/target/

Re: [PATCH v2 2/4] docs, qapi: generate undocumented return sections

2025-04-03 Thread John Snow
On Tue, Apr 1, 2025 at 2:07 AM Markus Armbruster wrote: > John Snow writes: > > > On Thu, Mar 27, 2025 at 5:11 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > This patch changes the qapidoc transmogrifier to generate Return value > >> > documentation for any command that h

Re: [PATCH 3/3] hw/riscv/riscv_iommu: Remove the "bus" property

2025-04-03 Thread Alistair Francis
On Sun, Mar 2, 2025 at 7:13 PM Jason Chien wrote: > > This property was originally intended to set the bus number for non-root > endpoints. However, since the PCIe bus number is assigned and modified > at runtime, setting this property before software execution is incorrect. > Additionally, the pr

[RFC PATCH-for-10.1 33/39] hw/core/machine: Allow dynamic registration of valid CPU types

2025-04-03 Thread Philippe Mathieu-Daudé
Add MachineClass::valid_cpu_types_list, a dynamic list of strings. CPU types can be registered with machine_class_add_valid_cpu_type(). Suggested-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daudé --- include/hw/boards.h | 8 hw/core/machine.c | 28 +

Re: [PATCH 2/2] rust/hw/char/pl011/src/device: Implement logging

2025-04-03 Thread Bernhard Beschow
Am 2. April 2025 13:27:53 UTC schrieb "Daniel P. Berrangé" : >On Wed, Apr 02, 2025 at 09:33:16AM +, Bernhard Beschow wrote: >> >> >> Am 31. März 2025 09:18:05 UTC schrieb "Daniel P. Berrangé" >> : >> >On Sun, Mar 30, 2025 at 10:58:57PM +0200, Bernhard Beschow wrote: >> >> Now that there

[PATCH v2 1/2] block/file-posix.c: Use pwritev2() with RWF_DSYNC for FUA

2025-04-03 Thread Pinku Deb Nath
Full Unit Access (FUA) is an optimization where a disk write with the flag set will be persisted to disk immediately instead of potentially remaining in the disk's write cache. This commit address the todo task for using pwritev2() with RWF_DSYNC in the thread pool section of raw_co_prw(), if pwrit

Re: [PATCH v8 3/7] migration: enable multifd and postcopy together

2025-04-03 Thread Prasad Pandit
On Mon, 31 Mar 2025 at 20:57, Fabiano Rosas wrote: > > --- a/migration/ram.c > > +++ b/migration/ram.c > > @@ -1297,7 +1297,7 @@ static int find_dirty_block(RAMState *rs, > > PageSearchStatus *pss) > > pss->page = 0; > > pss->block = QLIST_NEXT_RCU(pss->block, next); > >

Re: [PATCH v5 49/65] i386/tdx: handle TDG.VP.VMCALL

2025-04-03 Thread Daniel P . Berrangé
On Thu, Apr 03, 2025 at 03:28:43PM +0800, Xiaoyao Li wrote: > On 4/2/2025 11:49 PM, Daniel P. Berrangé wrote: > > On Wed, Apr 02, 2025 at 11:26:11PM +0800, Xiaoyao Li wrote: > > > > > > I guess the raw mode was introduced due to the design was changed to let > > > guest kernel to forward to TD rep

Re: [PATCH v8 03/28] vfio/container: support VFIO_DMA_UNMAP_FLAG_ALL

2025-04-03 Thread John Levon
On Wed, Apr 02, 2025 at 06:49:50PM +0200, Cédric Le Goater wrote: > On 2/19/25 15:48, John Levon wrote: > > Some containers can directly implement unmapping all regions; > > add a new flag to support this. > > > > Originally-by: John Johnson > > Signed-off-by: Elena Ufimtseva > > Signed-off-by:

Re: [PATCH v8 06/28] vfio: refactor out vfio_interrupt_setup()

2025-04-03 Thread John Levon
On Thu, Apr 03, 2025 at 11:23:09AM +0200, Cédric Le Goater wrote: > On 2/19/25 15:48, John Levon wrote: > > Refactor the interrupt setup code out of vfio_realize(), as we will > > later need this for vfio-user too. > > > > Signed-off-by: John Levon > > static void vfio_realize(PCIDevice *pdev,

Re: [PATCH] hw/ufs: Fix incorrect comment for segment_size and allocation_unit_size

2025-04-03 Thread Jeuk Kim
2025-04-03 오후 6:21에 Keoseong Park 이(가) 쓴 글: The comments for segment_size and allocation_unit_size incorrectly described them as 4KB. According to the UFS specification, segment_size is expressed in units of 512 bytes. Given segment_size = 0x2000 (8192), the actual size is 4MB. Similarly, alloc

[PATCH 2/3] target/i386: emulate: microoptimize and explain ADD_COUT_VEC/SUB_COUT_VEC

2025-04-03 Thread Paolo Bonzini
The logic is the same, but the majority(NOT a, b, c) is brought out to a separate macro and implemented without NOT operations. Signed-off-by: Paolo Bonzini --- target/i386/hvf/x86_flags.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/target/i386

[PATCH v1 2/2] virtio-gpu: refactor async blob unmapping

2025-04-03 Thread Manos Pitsidianakis
Change the 3 part async cleanup of a blob memory mapping to check if the unmapping has finished already after deleting the subregion; this condition allows us to skip suspending the command and responding to the guest right away. Signed-off-by: Manos Pitsidianakis --- hw/display/virtio-gpu-virgl

[PATCH v1 0/2] virtio-gpu: fix blob unmapping sequence

2025-04-03 Thread Manos Pitsidianakis
A hang was observed when running a small kernel that exercised VIRTIO GPU under TCG. This is an edge-case and won't happen under typical conditions. When unmapping a blob object, its MemoryRegion's freeing is deferred to the RCU thread. The hang's cause was determined to be a busy main loop no

[PATCH v1 1/2] virtio-gpu: fix hang under TCG when unmapping blob

2025-04-03 Thread Manos Pitsidianakis
This commit fixes an indefinite hang when using VIRTIO GPU blob objects under TCG in certain conditions. The VIRTIO_GPU_CMD_RESOURCE_MAP_BLOB VIRTIO command creates a MemoryRegion and attaches it to an offset on a PCI BAR of the VirtIOGPUdevice. The VIRTIO_GPU_CMD_RESOURCE_UNMAP_BLOB command unmap

[PATCH 2/2] plugins: add qemu_plugin_register_time_cb support

2025-04-03 Thread Alex Bennée
This allows the a plugin which has control of time to supply a callback so it can control the reported virtual time instead of using the default cpu_get_clock(). Time control plugins still need to call qemu_plugin_update_ns() to ensure timers are moved forward. Signed-off-by: Alex Bennée --- in

[PATCH 1/2] accel/tcg: add get_virtual_clock for TCG

2025-04-03 Thread Alex Bennée
Rather than allowing cpus_get_virtual_clock() to fall through to cpu_get_clock() introduce a TCG handler so it can make a decision about what time it is. Initially this just calls cpu_get_clock() as before but this will change in later commits. Signed-off-by: Alex Bennée --- accel/tcg/tcg-accel

Re: [PATCH-for-10.0 1/5] qtest/bios-tables-test: Add test for -M virt,its=off

2025-04-03 Thread Philippe Mathieu-Daudé
On 3/4/25 08:25, Gustavo Romero wrote: Hi Phil, On 4/2/25 07:30, Philippe Mathieu-Daudé wrote: On 2/4/25 08:41, Gustavo Romero wrote: Hi Phil, On 3/31/25 19:12, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé Please, put commit message (body) into the commits. For exa

Re: [PATCH v8 2/7] migration: Refactor channel discovery mechanism

2025-04-03 Thread Fabiano Rosas
Prasad Pandit writes: > Hello Fabiano, > > On Mon, 31 Mar 2025 at 20:31, Fabiano Rosas wrote: >> > +} else if (mis->from_src_file) { >> This is redundant. > > * This was to ensure (double check) that when the Postcopy connection > comes in, the main channel is established. Also a couple of v

Re: [PATCH v8 3/7] migration: enable multifd and postcopy together

2025-04-03 Thread Fabiano Rosas
Prasad Pandit writes: > On Mon, 31 Mar 2025 at 20:57, Fabiano Rosas wrote: >> > --- a/migration/ram.c >> > +++ b/migration/ram.c >> > @@ -1297,7 +1297,7 @@ static int find_dirty_block(RAMState *rs, >> > PageSearchStatus *pss) >> > pss->page = 0; >> > pss->block = QLIST_NEXT_RC

Re: [PATCH v8 0/7] Allow to enable multifd and postcopy migration together

2025-04-03 Thread Fabiano Rosas
Prasad Pandit writes: > On Tue, 1 Apr 2025 at 02:24, Fabiano Rosas wrote: >> The postcopy/multifd/plain test is still hanging from time to time. I >> see a vmstate load function trying to access guest memory and the >> postcopy-listen thread already finished, waiting for that >> qemu_loadvm_stat

[PATCH 1/3] target/i386: tcg: simplify computation of AF after INC/DEC

2025-04-03 Thread Paolo Bonzini
No difference in generated code, but the XOR-based formula is easily understood on its own. This will make more sense once ADD/SUB stop using dst^src1^src2 to compute AF. Signed-off-by: Paolo Bonzini --- target/i386/tcg/cc_helper_template.h.inc | 10 ++ 1 file changed, 2 insertions(+),

[PATCH 3/3] target/i386: tcg: use cout to commonize add/adc/sub/sbb cases

2025-04-03 Thread Paolo Bonzini
Use the carry-out vector as the basis to compute AF, CF and OF. The cost is pretty much the same, because the carry-out is just four boolean operations, and the code is much smaller because add/adc/sub/sbb now share most of it. A similar algorithm to what is used in target/i386/emulate can also b

[PATCH for 10.1 0/3] target/i386: share some EFLAGS code between TCG and x86_emu

2025-04-03 Thread Paolo Bonzini
This reduces by ~20% the size of helper_cc_compute_all, and also shares some code between TCG and x86_emu. Also, the line of code delta is negative despite adding a bunch of comments. :) Paolo Paolo Bonzini (3): target/i386: tcg: simplify computation of AF after INC/DEC target/i386: emulate:

Re: [PATCH v1 1/2] virtio-gpu: fix hang under TCG when unmapping blob

2025-04-03 Thread Michael S. Tsirkin
On Thu, Apr 03, 2025 at 03:17:01PM +0300, Manos Pitsidianakis wrote: > This commit fixes an indefinite hang when using VIRTIO GPU blob objects > under TCG in certain conditions. > > The VIRTIO_GPU_CMD_RESOURCE_MAP_BLOB VIRTIO command creates a > MemoryRegion and attaches it to an offset on a PCI B

[PATCH-for-10.0 v2 05/14] hw/arm: Do not build VMapple machine by default

2025-04-03 Thread Philippe Mathieu-Daudé
Unfortunately as of v10.0.0-rc2 the VMapple machine is unusable: $ qemu-system-aarch64 -M vmapple [...] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PGIOSurfaceHostDeviceDescriptor setMapMemory:]: unrecognized selector sent to instance 0x61e

[PATCH-for-10.0 v2 03/14] tests/functional: Skip aarch64_replay test on macOS

2025-04-03 Thread Philippe Mathieu-Daudé
As of v10.0.0-rc2 this test is still failing on macos: $ make check-functional-aarch64 V=1 ... ERROR:../../replay/replay-internal.c:235:replay_mutex_unlock: assertion failed: (replay_mutex_locked()) Bail out! ERROR:../../replay/replay-internal.c:235:replay_mutex_unlock: assertion failed:

[PATCH-for-10.0? v2 14/14] qtest/bios-tables-test: Update aarch64/virt 'its_off' variant blobs

2025-04-03 Thread Philippe Mathieu-Daudé
Commit the blobs generated by tests/data/acpi/rebuild-expected-aml.sh. Changes in the tables: @@ -1,32 +1,32 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20240927 (64-bit version) * Copyright (c) 2000 - 2023 Intel Corporation * * Disassembly o

[PATCH-for-10.0? v2 08/14] hw/arm/virt: Simplify create_its()

2025-04-03 Thread Philippe Mathieu-Daudé
No need to strstr() check the class name when we can use kvm_irqchip_in_kernel(). Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/virt.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index c0748cbb95a..d17755548e8 100644 --- a/hw/

[PATCH-for-10.0? v2 06/14] hw/arm/virt: Remove pointless VirtMachineState::tcg_its field

2025-04-03 Thread Philippe Mathieu-Daudé
VirtMachineState::tcg_its has the same value of VirtMachineClass::no_tcg_its. Directly use the latter, removing the former. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/virt.h | 1 - hw/arm/virt.c | 13 + 2 files changed, 5 insertions(+), 9 deletions(-) diff --g

[PATCH-for-10.0 v2 02/14] tests/functional: Add a decorator for skipping tests on particular OS

2025-04-03 Thread Philippe Mathieu-Daudé
Since tests might be failing on some operating systems, introduce the skipIfOperatingSystem() decorator. Signed-off-by: Philippe Mathieu-Daudé --- tests/functional/qemu_test/__init__.py | 2 +- tests/functional/qemu_test/decorators.py | 15 ++- 2 files changed, 15 insertions(+), 2

[PATCH-for-10.0? v2 09/14] hw/arm/virt-acpi: Factor its_enabled() helper out

2025-04-03 Thread Philippe Mathieu-Daudé
GIC ITS is checked for the MADT and IORT tables. Factor the checks out to the its_enabled() helper. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Gustavo Romero --- hw/arm/virt-acpi-build.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/arm/virt-acpi-bu

[PATCH-for-10.0? v2 13/14] hw/arm/virt-acpi: Do not advertise disabled GIC ITS

2025-04-03 Thread Philippe Mathieu-Daudé
GIC ITS can be disabled at runtime using '-M its=off', which sets VirtMachineState::its = false. Check this field to avoid advertising the ITS in the MADT table. Reported-by: Udo Steinberg Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2886 Signed-off-by: Philippe Mathieu-Daudé Reviewed

[PATCH-for-10.0? v2 10/14] qtest/bios-tables-test: Add test for -M virt, its=off

2025-04-03 Thread Philippe Mathieu-Daudé
Add the use case reported as issue #2886 [*]. The test passes while it shouldn't. We are going to fix that in the following commits. [*] https://gitlab.com/qemu-project/qemu/-/issues/2886 Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/bios-tables-test.c | 21 + 1 file

[PATCH-for-10.0? v2 11/14] qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs

2025-04-03 Thread Philippe Mathieu-Daudé
We are going to fix the test_acpi_aarch64_virt_tcg_its_off() test. In preparation, copy the ACPI tables which will be altered as 'its_off' variants, and whitelist them. Reviewed-by: Gustavo Romero Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ t

Re: [PATCH-for-10.1 v2 38/43] tcg: Move cpu_req_mo() macro to target-agnostic 'backend-ldst.h'

2025-04-03 Thread Richard Henderson
On 4/2/25 14:23, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/backend-ldst.h| 41 + accel/tcg/internal-common.h | 27 accel/tcg/internal-target.h | 28 - accel/tcg/c

Re: [PATCH-for-10.1 v2 39/43] tcg: Move qemu_tcg_mttcg_enabled() to 'system/tcg.h'

2025-04-03 Thread Richard Henderson
On 4/2/25 14:23, Philippe Mathieu-Daudé wrote: qemu_tcg_mttcg_enabled() is specific to 1/ TCG and 2/ system emulation. Move the prototype declaration to "system/tcg.h", reducing 'mttcg_enabled' variable scope. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- include/hw/c

Re: [PULL 04/23] include/exec: Split out exec/cpu-interrupt.h

2025-04-03 Thread Richard Henderson
On 4/2/25 13:13, Philippe Mathieu-Daudé wrote: On 2/4/25 20:46, Richard Henderson wrote: On 4/2/25 03:17, Philippe Mathieu-Daudé wrote: Hi Richard, On 8/3/25 23:58, Richard Henderson wrote: Some of these bits are actually common to all cpus; while the reset have common reservations for target

Re: [PATCH v8 7/7] migration/ram: Implement save_postcopy_prepare()

2025-04-03 Thread Fabiano Rosas
Prasad Pandit writes: > Hi, > > On Mon, 31 Mar 2025 at 20:49, Fabiano Rosas wrote: >> > +static bool ram_save_postcopy_prepare(QEMUFile *f, void *opaque, Error >> > **errp) >> > +{ >> > +int ret; >> > + >> > +if (migrate_multifd()) { >> > +/* >> > + * When multifd is ena

Re: [PATCH-for-10.0 0/5] hw/arm/virt-acpi: Do not advertise disabled GIC ITS in MADT table

2025-04-03 Thread Michael S. Tsirkin
On Tue, Apr 01, 2025 at 12:12:34AM +0200, Philippe Mathieu-Daudé wrote: > GIC ITS can be disabled using '-M its=off'. > When that occurs, it shouldn't be advertised in ACPI tables. I doubt this is 10.0 material. How common is its=off that we urgently need to fix it? > Philippe Mathieu-Daudé (5):

Re: [PATCH v3 2/4] hw/s390x: add Control-Program Identification to QOM

2025-04-03 Thread Shalini Chellathurai Saroja
On 2025-04-01 15:55, Nina Schoetterl-Glausch wrote: On Mon, 2025-03-31 at 16:00 +0200, Shalini Chellathurai Saroja wrote: Add Control-Program Identification data to the QEMU Object Model (QOM), along with the timestamp in which the data was received. Example: virsh # qemu-monitor-command vm --p

[PATCH] target/hexagon: Implement CPUState.mmu_index

2025-04-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hexagon/cpu.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 766b678651..59fc9ed698 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -313,6 +313,11 @@ static void hexagon_cpu_re

<    1   2   3