Re: [PATCH for-10.1 17/32] vfio: Move vfio_kvm_device_add/del_fd() to helpers.c

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:54:00AM +0100, Cédric Le Goater wrote: > vfio_kvm_device_add/del_fd() are low level routines. Move them with > the other helpers. > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

RE: [PATCH 32/39] target/hexagon: Define system, guest reg names

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [RFC PATCH v2 13/20] hw/arm/smmuv3-accel: Introduce helpers to batch and issue cache invalidations

2025-03-19 Thread Nicolin Chen
On Wed, Mar 19, 2025 at 12:24:32PM -0400, Donald Dutile wrote: > > > On 3/11/25 10:10 AM, Shameer Kolothum wrote: > > > > From: Nicolin Chen > > > > > > > > Inroduce an SMMUCommandBatch and some helpers to batch and issue > > > the > > > Introduce > > > > commands. Currently separat

Re: [PATCH for-10.1 05/32] vfio: Make vfio_viommu_preset() static

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:53:48AM +0100, Cédric Le Goater wrote: > This routine is only used in file "migration.c". Move it there. > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

[PATCH v2 2/2] utils/qemu-sockets: Introduce keep-alive-idle-period inet socket option

2025-03-19 Thread Juraj Marcin
From: Juraj Marcin The default idle period for TCP connection could be even 2 hours. However, in some cases, the application needs to be aware of a connection issue much sooner. This is the case, for example, for postcopy live migration. If there is no traffic from the migration destination gues

Re: [PATCH 0/3] Cleanups around returns

2025-03-19 Thread Markus Armbruster
Peter Maydell writes: > On Wed, 19 Mar 2025 at 15:23, Markus Armbruster wrote: >> >> Markus Armbruster (3): >> cleanup: Re-run return_directly.cocci >> cleanup: Drop pointless return at end of function >> cleanup: Drop pointless label at end of function >> > >> .../user/ase/msa/bit-count/

Re: [PULL 19/25] rust: pl011: switch to safe chardev operation

2025-03-19 Thread Peter Maydell
On Sun, 9 Mar 2025 at 10:33, Paolo Bonzini wrote: > > Switch bindings::CharBackend with chardev::CharBackend. This removes > occurrences of "unsafe" due to FFI and switches the wrappers for receive, > can_receive and event callbacks to the common ones implemented by > chardev::CharBackend. > > Si

[PATCH 4/4] target/riscv: Enable/Disable S/VS-mode Timer when STCE bit is changed

2025-03-19 Thread Jim Shu
Updating STCE will enable/disable SSTC in S-mode or/and VS-mode, so we also need to update S/VS-mode Timer and S/VSTIP bits in $mip CSR. Signed-off-by: Jim Shu --- target/riscv/csr.c | 44 target/riscv/time_helper.c | 51 ++

[PATCH 3/4] target/riscv: Fix VSTIP bit in sstc extension.

2025-03-19 Thread Jim Shu
VSTIP is only writable when both [mh]envcfg.STCE is enabled, or it will revert it's defined behavior as if sstc extension is not implemented. Signed-off-by: Jim Shu --- target/riscv/csr.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/riscv/csr.c b/target/risc

[PATCH 2/4] hw/intc: riscv_aclint: Fix mtime write for sstc extension

2025-03-19 Thread Jim Shu
When changing the mtime value, the period of [s|vs]timecmp timers should also be updated like the period of mtimecmp timer. Signed-off-by: Jim Shu --- hw/intc/riscv_aclint.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/intc/riscv_aclint.c b/hw/intc/riscv_aclint.c index db374a7c2d.

[PATCH 1/4] target/riscv: Add the checking into stimecmp write function.

2025-03-19 Thread Jim Shu
Preparation commit to let aclint timer to use stimecmp write function. Aclint timer doesn't call sstc() predicate so we need to check inside the stimecmp write function. Signed-off-by: Jim Shu --- target/riscv/time_helper.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(

[PATCH 1/2] rust: Kconfig: Factor out whether PL011 is Rust or C

2025-03-19 Thread Peter Maydell
Currently every board that uses the PL011 duplicates the logic that selects the Rust implementation if Rust was enabled and the C implementation if it does not. Factor this out into a separate Kconfig stanza, so that boards can go back to simply doing "select PL011" and get whichever implementatio

Re: [PATCH 3/3] cleanup: Drop pointless label at end of function

2025-03-19 Thread Markus Armbruster
Corey Minyard writes: > Is this official coding style? I'm not a big fan of having return > statements in the middle of functions, I generally only put them at > the beginning or the end. There's nothing in docs/devel/style.rst. I count more than 42,000 return statements with indentation > 4.

Re: [PATCH] block: Zero block driver state before reopening

2025-03-19 Thread Eric Blake
On Mon, Mar 10, 2025 at 11:48:58AM +0100, Kevin Wolf wrote: > Block drivers assume in their .bdrv_open() implementation that their > state in bs->opaque has been zeroed; it is initially allocated with > g_malloc0() in bdrv_open_driver(). > > bdrv_snapshot_goto() needs to make sure that it is zeroe

Re: [PATCH 3/3] cleanup: Drop pointless label at end of function

2025-03-19 Thread Markus Armbruster
Corey Minyard writes: > On Wed, Mar 19, 2025 at 08:21:20PM +0100, Markus Armbruster wrote: >> Corey Minyard writes: >> >> > Is this official coding style? I'm not a big fan of having return >> > statements in the middle of functions, I generally only put them at >> > the beginning or the end.

RE: [PATCH 12/39] target/hexagon: Add implementation of cycle counters

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [PATCH v6 13/18] system/xen: remove inline stubs

2025-03-19 Thread Pierrick Bouvier
On 3/19/25 06:56, Anthony PERARD wrote: On Mon, Mar 17, 2025 at 11:34:12AM -0700, Pierrick Bouvier wrote: Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier This was a bad copy-paste, thanks. Reviewed-by: Anthony PERARD Thanks,

Re: [PATCH] 9pfs: fix 'total_open_fd' decrementation

2025-03-19 Thread Christian Schoenebeck
On Wednesday, March 19, 2025 11:08:58 AM CET Christian Schoenebeck wrote: > According to 'man 2 close' errors returned by close() should only be used > for either diagnostic purposes or for catching data loss due to a previous > write error, as an error result of close() usually indicates a deferre

Re: vof-nvram.bin: what it is and how it is used?

2025-03-19 Thread BALATON Zoltan
On Wed, 19 Mar 2025, Michael Tokarev wrote: Hi! Commit fc8c745d50150a63f6c "spapr: Implement Open Firmware client interface" in Jun-2021 added a new file, pc-bios/vof-nvram.bin, to qemu sources. But there's nothing in the sources which refers to this file, and there's no mentions about its cont

Re: [PATCH for-10.1 25/32] vfio: Move vfio_set_migration_error() into migration.c

2025-03-19 Thread Prasad Pandit
On Tue, 18 Mar 2025 at 15:29, Cédric Le Goater wrote: > This routine is related to VFIO migration. It belongs to "migration.c". > While at it, rename it to better reflect the namespace it belongs to. > > Signed-off-by: Cédric Le Goater > --- > hw/vfio/migration.h | 1 + > hw/vfio/dirty-tra

Re: [PATCH for-10.1 03/32] vfio: Introduce a new header file for external migration services

2025-03-19 Thread Avihai Horon
On 18/03/2025 11:53, Cédric Le Goater wrote: External email: Use caution opening links or attachments The migration core subsytem makes uses of the VFIO migration API to collect statistics on the number of bytes transferred. These services are declared in "hw/vfio/vfio-common.h" which also co

Re: [PATCH for-10.1 04/32] vfio: Make vfio_un/block_multiple_devices_migration() static

2025-03-19 Thread Joao Martins
On 18/03/2025 09:53, Cédric Le Goater wrote: > Both of these routines are only used in file "migration.c". Move them > there. > > Signed-off-by: Cédric Le Goater Reviewed-by: Joao Martins > --- > include/hw/vfio/vfio-common.h | 2 -- > hw/vfio/common.c | 62 -

[PATCH PoC 2/7] Add gpiodev dummy

2025-03-19 Thread Nikita Shubin via B4 Relay
From: Nikita Shubin Add gpiodev stub with single help option. Signed-off-by: Nikita Shubin --- gpiodev/gpio.c | 145 + gpiodev/meson.build| 5 ++ include/gpiodev/gpio.h | 34 meson.build| 11 +++- qemu-opt

[PATCH] Fix duplicate symbol error on MacOS build

2025-03-19 Thread Tanish Desai
The issue started after commit https://github.com/qemu/qemu/commit/59f4d65584bd3372070e2484876436c8d02505e4 Reproduction: 1. In the build directory on MacOS (haven't tried on other OS), run: ../configure --enable-rust --target-list=aarch64-softmmu 2. Then run either: ninja -C .

[PATCH PoC 6/7] hw/arm: ast2600: set id for gpio

2025-03-19 Thread Nikita Shubin via B4 Relay
From: Nikita Shubin Set device id for gpios to allow gpiodev binding. Signed-off-by: Nikita Shubin --- hw/arm/aspeed_ast2600.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index 07210483bb29a50824c8312021bebf1ca32cac95..09ce944d6263d8

[PATCH PoC 5/7] hw/gpio/aspeed: Add gpiodev support

2025-03-19 Thread Nikita Shubin via B4 Relay
From: Nikita Shubin Add gpiodev support for: - getting line info - getting/setting lines - monitoring line events - monitoting config events Binding is done via id, i.e.: ... -gpiodev chardev,id=aspeed-gpio0 Signed-off-by: Nikita Shubin --- hw/gpio/aspeed_gpio.c | 127 ++

[PATCH PoC 4/7] gpiodev: Add GPIO backend over chardev

2025-03-19 Thread Nikita Shubin via B4 Relay
From: Nikita Shubin Currently based on passing linux GPIO UAPI structs over UNIX socket. This is more a PoC than a real application, still this is something to start with. Signed-off-by: Nikita Shubin --- gpiodev/gpio-chardev.c | 479 + gpiodev/

[PATCH PoC 1/7] QAPI: gpio JSON

2025-03-19 Thread Nikita Shubin via B4 Relay
From: Nikita Shubin Signed-off-by: Nikita Shubin --- qapi/gpio.json| 68 +++ qapi/meson.build | 1 + qapi/qapi-schema.json | 1 + 3 files changed, 70 insertions(+) diff --git a/qapi/gpio.json b/qapi/gpio.json new file mode 100644 i

Re: [PATCH] tests/functional/test_migration: Use "ncat" instead of "nc" in the exec test

2025-03-19 Thread Philippe Mathieu-Daudé
On 19/3/25 11:56, Thomas Huth wrote: From: Thomas Huth "nc" can either bei GNU netcat, OpenBSD netcat or NMap ncat. At least GNU netcat currently does not work with this test anymore, though the comment in the test says otherwise. GNU netcat seems to be quite unmaintained nowadays, according to

[PULL 4/8] docs/system: Use the meson binary from the pyvenv

2025-03-19 Thread Thomas Huth
From: Thomas Huth To avoid problems with the meson installation from the host system, we should always use the meson from our venv instead. Thus use this in the documentation, too. While we're at it, also mention that it has to be run from the build folder (in the igb.rst file; the other two fil

Re: [PULL 05/11] hpet: fix and cleanup persistence of interrupt status

2025-03-19 Thread Fiona Ebner
Am 19.03.25 um 16:30 schrieb Paolo Bonzini: > On Wed, Mar 19, 2025 at 4:29 PM Fiona Ebner wrote: >> >> Hi, >> If necessary, our management layer downstream could disable the hpet >> timer by default and make users explicitly enable it if >> desired/required. I just wanted to ask if the issue is kn

qemu-system-ppc64: ../system/memory.c:2666: memory_region_add_subregion_common: Assertion `!subregion->container' failed.

2025-03-19 Thread Michal Suchánek
Hello, reportedly since the inclusion of Linux patch 6aa989ab2bd0d37540c812b4270006ff794662e7 powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory qemu fails to reboot VM. When running Linux with this patch inside VM qemu crashes due to assertion failure: KVM: Failed to creat

Re: [PULL 05/11] hpet: fix and cleanup persistence of interrupt status

2025-03-19 Thread Paolo Bonzini
On Wed, Mar 19, 2025 at 4:47 PM Fiona Ebner wrote: > We'll only be able to disable it starting from a new (downstream) > machine version, but that is fine. For now, I'll go for the revert, > thank you for the suggestion! Is disabling it strongly suggested because > of those bug reports? Or are the

Re: [PULL 05/11] hpet: fix and cleanup persistence of interrupt status

2025-03-19 Thread Fiona Ebner
Am 19.03.25 um 16:51 schrieb Paolo Bonzini: > On Wed, Mar 19, 2025 at 4:47 PM Fiona Ebner wrote: >> We'll only be able to disable it starting from a new (downstream) >> machine version, but that is fine. For now, I'll go for the revert, >> thank you for the suggestion! Is disabling it strongly sug

Re: [PATCH 1/2] qga-win: implement a 'guest-get-load' command

2025-03-19 Thread Daniel P . Berrangé
On Fri, Mar 14, 2025 at 01:38:46PM +0200, Konstantin Kostiuk wrote: > Windows has no native equivalent API, but it would be possible to > simulate it as illustrated here (BSD-3-Clause): > > https://github.com/giampaolo/psutil/pull/1485 > > Signed-off-by: Konstantin Kostiuk > --- > qga/command

Re: [PATCH v3 4/6] hw/uefi-vars-sysbus: allow for riscv virt

2025-03-19 Thread Daniel Henrique Barboza
On 3/19/25 11:11 AM, Gerd Hoffmann wrote: Allow the device being added to riscv virt VMs. Signed-off-by: Gerd Hoffmann --- Reviewed-by: Daniel Henrique Barboza hw/riscv/virt.c | 2 ++ hw/uefi/Kconfig | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/riscv/virt

Re: [PATCH for-10.1 06/32] vfio: Introduce a new header file for internal migration services

2025-03-19 Thread Prasad Pandit
On Tue, 18 Mar 2025 at 15:26, Cédric Le Goater wrote: > Gather all VFIO migration related declarations into "migration.h" to > reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". > > Signed-off-by: Cédric Le Goater > --- > hw/vfio/migration.h | 72

Re: test_migration.py not working with netcat-traditional

2025-03-19 Thread Daniel P . Berrangé
On Wed, Mar 19, 2025 at 08:49:53AM +0100, Thomas Huth wrote: > On 18/03/2025 22.13, Matheus Tavares Bernardino wrote: > > Hi, > > > > tests/functional/test_migration.py says "The test works for both > > netcat-traditional and netcat-openbsd packages." But when I run it for > > qemu-system-aarch64

Re: [PATCH for-10.1 31/32] vfio: Introduce vfio_dirty_tracking_un/register() routines

2025-03-19 Thread Joao Martins
On 18/03/2025 09:54, Cédric Le Goater wrote: > This hides the MemoryListener implementation and makes the code common > to both IOMMU backends, legacy and IOMMUFD. > > Signed-off-by: Cédric Le Goater Reviewed-by: Joao Martins > --- > hw/vfio/dirty-tracking.h | 4 ++-- > hw/vfio/container.c

[PULL 0/8] Functional and s390x patches for v10.0-rc1

2025-03-19 Thread Thomas Huth
Hi Stefan! The following changes since commit 1dae461a913f9da88df05de6e2020d3134356f2e: Update version for v10.0.0-rc0 release (2025-03-18 10:18:14 -0400) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-2025-03-19 for you to fetch changes up to

[PULL 7/8] tests/functional/test_x86_64_kvm_xen: Remove avocado tags

2025-03-19 Thread Thomas Huth
From: Thomas Huth They have been forgotten to be removed when converting the test to the functional framework. Since they are of no use anymore, let's remove them now. Message-ID: <20250318171530.94966-1-th...@redhat.com> Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- tests/fu

[PATCH-for-10.1 01/12] tcg: Declare TARGET_INSN_START_EXTRA_WORDS in 'cpu-param.h'

2025-03-19 Thread Philippe Mathieu-Daudé
To avoid including the huge "cpu.h" for a simple definition, move TARGET_INSN_START_EXTRA_WORDS to "cpu-param.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu-param.h| 14 ++ target/arm/cpu.h | 14 -- target/hppa/cpu-param.h | 2 ++

Re: [PATCH] Fix duplicate symbol error on MacOS build

2025-03-19 Thread Tanish Desai
It will work for PL011 but there are other devices using the same method for selecting rust or c++ file like HPET in timer. You can check this:- https://github.com/qemu/qemu/blob/master/hw/timer/Kconfig Wouldn’t it create inconsistencies in code if we change only for PL011? On Wed, 19 Mar 2025 at

[PATCH 03/10] target/arm: convert 32 bit gdbstub to new helper

2025-03-19 Thread Alex Bennée
For some of the helpers we need a temporary variable to copy from although we could add some helpers to return pointers into env in those cases if we wanted to. Signed-off-by: Alex Bennée --- target/arm/gdbstub.c | 57 1 file changed, 36 insertions(+)

[PATCH 01/10] include/gdbstub: fix include guard in commands.h

2025-03-19 Thread Alex Bennée
Signed-off-by: Alex Bennée --- include/gdbstub/commands.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gdbstub/commands.h b/include/gdbstub/commands.h index 40f0514fe9..bff3674872 100644 --- a/include/gdbstub/commands.h +++ b/include/gdbstub/commands.h @@ -1,5 +1,5

[PATCH 04/10] target/arm: convert 64 bit gdbstub to new helper

2025-03-19 Thread Alex Bennée
For some of the helpers we need a temporary variable to copy from although we could add some helpers to return pointers into env in those cases if we wanted to. Signed-off-by: Alex Bennée --- target/arm/gdbstub64.c | 53 ++ 1 file changed, 33 insertions(+)

Re: [PATCH v2 06/42] include/exec: Split out cpu-mmu-index.h

2025-03-19 Thread Pierrick Bouvier
On 3/18/25 18:16, Richard Henderson wrote: On 3/18/25 17:02, Pierrick Bouvier wrote: On 3/18/25 14:31, Richard Henderson wrote: The implementation of cpu_mmu_index was split between cpu-common.h and cpu-all.h, depending on CONFIG_USER_ONLY.  We already have the plumbing common to user and syste

Re: [PATCH 0/3] Cleanups around returns

2025-03-19 Thread Richard Henderson
On 3/19/25 08:21, Markus Armbruster wrote: Markus Armbruster (3): cleanup: Re-run return_directly.cocci cleanup: Drop pointless return at end of function cleanup: Drop pointless label at end of function Reviewed-by: Richard Henderson r~

RE: [PATCH 36/39] target/hexagon: Add TCG overrides for transfer insts

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-19 Thread Nicolin Chen
On Wed, Mar 19, 2025 at 07:09:33PM +0100, Eric Auger wrote: > > Option means something like this: > > -device smmuv3,accel=on > > instead of > > -device "smmuv3-accel" > > ? > > > > Yea, I think that's good. > Yeah actually that's a big debate for not much. From an implementation > pov tha

RE: [PATCH 39/39] target/hexagon: Add pcycle setting functionality

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-19 Thread Eric Auger
On 3/18/25 10:22 PM, Donald Dutile wrote: > > > On 3/18/25 3:13 PM, Nicolin Chen wrote: >> On Tue, Mar 18, 2025 at 07:31:36PM +0100, Eric Auger wrote: >>> On 3/17/25 9:19 PM, Nicolin Chen wrote: On Mon, Mar 17, 2025 at 04:24:53PM -0300, Jason Gunthorpe wrote: > On Mon, Mar 17, 2025 at

<    1   2   3