[PULL 9/9] qerror: QERR_PROPERTY_VALUE_OUT_OF_RANGE is no longer used, drop

2024-10-18 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-ID: <20241010150144.986655-8-arm...@redhat.com> Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé --- include/qapi/qmp/qerror.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h

Re: [RFC PATCH] cli: add connect-gpios option

2024-10-18 Thread Octavian Purdila
On Fri, Oct 18, 2024 at 9:09 AM Peter Maydell wrote: > > On Fri, 18 Oct 2024 at 17:05, Daniel P. Berrangé wrote: > > > > On Fri, Oct 18, 2024 at 04:38:24PM +0100, Peter Maydell wrote: > > > On Thu, 10 Oct 2024 at 18:39, Octavian Purdila wrote: > > > > > > > > From: Valentin Ghita > > > > > > >

Re: [PATCH v2 5/6] virtio-gpu: Support asynchronous fencing

2024-10-18 Thread Dmitry Osipenko
On 10/18/24 08:28, Akihiko Odaki wrote: >> +static void virgl_write_context_fence(void *opaque, uint32_t ctx_id, >> +  uint32_t ring_idx, uint64_t fence) >> +{ >> +    VirtIOGPU *g = opaque; > > What about taking the BQL here instead of having a QEMUBH? That wi

Re: [PATCH] Migration: Add trace points for vmstate handler insertion/removal

2024-10-18 Thread Peter Xu
On Fri, Oct 18, 2024 at 10:44:26AM -0400, Peter Xu wrote: > SaveStateEntry has lots of magics internally, on alias_id, get_id() being > able to overwrite the original idstr, compat fields, ID_ANY, and so on. It > may not be always clear that what all these fields are being registered for > some de

Re: [RFC V1 04/14] accel: set accelerator and machine props earlier

2024-10-18 Thread Steven Sistare
On 10/18/2024 11:32 AM, Steven Sistare wrote: On 10/18/2024 11:08 AM, Fabiano Rosas wrote: Steve Sistare writes: Make all global and compat properties available before the first objects are created.  Set accelerator compatibility properties in configure_accelerators, when the accelerator is c

Re: [RFC V1 04/14] accel: set accelerator and machine props earlier

2024-10-18 Thread Steven Sistare
On 10/18/2024 11:40 AM, Steven Sistare wrote: On 10/18/2024 11:32 AM, Steven Sistare wrote: On 10/18/2024 11:08 AM, Fabiano Rosas wrote: Steve Sistare writes: Make all global and compat properties available before the first objects are created.  Set accelerator compatibility properties in co

[PATCH v2 3/5] guestperf: Support deferred migration for multifd

2024-10-18 Thread Hyman Huang
The way to enable multifd migration has been changed by commit, 82137e6c8c (migration: enforce multifd and postcopy preempt to be set before incoming), and guestperf has not made the necessary changes. If multifd migration had been enabled in the previous manner, the following error would have occu

Re: [RFC V1 04/14] accel: set accelerator and machine props earlier

2024-10-18 Thread Fabiano Rosas
Steve Sistare writes: > Make all global and compat properties available before the first objects > are created. Set accelerator compatibility properties in > configure_accelerators, when the accelerator is chosen, and call > configure_accelerators earlier. Set machine options earlier. > > Signe

Re: [PATCH] tests: Wait for migration completion on destination QEMU to avoid failures

2024-10-18 Thread Michael Tokarev
16.10.2024 18:21, Stefan Berger wrote: Rather than waiting for the completion of migration on the source side, wait for it on the destination QEMU side to avoid accessing the TPM TIS memory mapped registers before QEMU could restore their state. This error condition could be triggered on busy sys

[PATCH v2 1/5] tests/migration: Move the guestperf tool to scripts directory

2024-10-18 Thread Hyman Huang
Guestperf was designed to test the performance of migration, with a loose connection to the fundamental test cases of QEMU. To improve the repository's structure, move it to the scripts directory. Add myself as a maintainer for the guestperf so that I can help to fix bugs. Signed-off-by: Hyman H

Re: [PATCH] net: Check if nc is NULL in qemu_get_vnet_hdr_len()

2024-10-18 Thread Michael Tokarev
17.08.2024 10:00, Akihiko Odaki wrote: A netdev may not have a peer specified, resulting in NULL. We should make it behave like /dev/null in such a case instead of letting it cause segmentatin fault. Fixes: 4b52d63249a5 ("tap: Remove qemu_using_vnet_hdr()") Feels like qemu-stable material (Cc'

[PATCH v2 0/5] Guestperf: miscellaneous refinement and enrichment

2024-10-18 Thread Hyman Huang
v2: 1. Update the MAINTAINERS section suggested by Fabiano Rosas 2. Ensure the dependencies when build the initrd-stress.img suggested by Daniel 3. Fix some bugs Please review, thanks Yong v1: The previous patchset: https://lore.kernel.org/qemu-devel/cover.1722957352.git.yong.hu...@smartx.com/

[PATCH v2 4/5] guestperf: Nitpick the inconsistent parameters

2024-10-18 Thread Hyman Huang
Signed-off-by: Hyman Huang Reviewed-by: Fabiano Rosas --- scripts/migration/guestperf/comparison.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/migration/guestperf/comparison.py b/scripts/migration/guestperf/comparison.py index 42cc0372d1..40e9d2eb1d 100644 --- a

[PATCH v2 5/5] guestperf: Introduce multifd compression option

2024-10-18 Thread Hyman Huang
Guestperf tool does not cover the multifd compression option currently, it is worth supporting so that developers can analysis the migration performance with different compression algorithms. Multifd support 4 compression algorithms currently: zlib, zstd, qpl, uadk To request that multifd with th

[PATCH v2 2/5] tests/migration: Make initrd-stress.img built by default

2024-10-18 Thread Hyman Huang
The initrd-stress.img was compiled by specifying the target, to make it easier for developers to play the guestperf tool, make it built when dependencies suffices. Signed-off-by: Hyman Huang --- tests/migration/meson.build | 33 - 1 file changed, 20 insertions(+),

Re: [PATCH] tests: Wait for migration completion on destination QEMU to avoid failures

2024-10-18 Thread Stefan Berger
On 10/18/24 12:23 PM, Michael Tokarev wrote: 16.10.2024 18:21, Stefan Berger wrote: Rather than waiting for the completion of migration on the source side, wait for it on the destination QEMU side to avoid accessing the TPM TIS memory mapped registers before QEMU could restore their state. Th

Re: [PATCH V1 0/4] Arch agnostic ACPI changes to support vCPU Hotplug (on Archs like ARM)

2024-10-18 Thread Gustavo Romero
Hi Miguel, On 10/15/24 15:41, Miguel Luis wrote: Hi Salil, I’ve ran the usual tests successfully of hotplug/unplug from the number of cold-booted cpus up to maxcpus and migration on ARM. Please feel free to add: Do you mind sharing what cpus you used for your tests? Did you use tcg or kvm f

Re: [PATCH v2] ui/console-vc: Silence warning about sprintf() on OpenBSD

2024-10-18 Thread Michael Tokarev
15.10.2024 14:25, Thomas Huth wrote: The linker on OpenBSD complains: ld: warning: console-vc.c:824 (../src/ui/console-vc.c:824)([...]): warning: sprintf() is often misused, please use snprintf() Using g_strdup_printf() is certainly better here, so let's switch to that function instead. R

Re: [RFC PATCH 00/16] rust: allow older versions of rustc and bindgen

2024-10-18 Thread Kevin Wolf
Am 18.10.2024 um 17:43 hat Paolo Bonzini geschrieben: > On 10/18/24 15:31, Daniel P. Berrangé wrote: > > On Tue, Oct 15, 2024 at 03:17:18PM +0200, Paolo Bonzini wrote: > > > On top of this, the required version of bindgen is still too new > > > for Debian 12 and Ubuntu 22.04. This is fixed by the

[PATCH v2] spapr: nested: Add support for DPDES SPR in GSB for TCG L0

2024-10-18 Thread Amit Machhiwal
The DPDES support for doorbell emulation and handling for KVM on PAPR guests was added in Linux via [1]. Subsequently, a new GSB (Guest State Buffer) element for DPDES was added in Linux; the same has been missing in TCG L0 implementation. Add support for DPDES register's APIv2 GSB element and requ

Re: [PATCH] vmdk:truncate more one sector in init extent

2024-10-18 Thread Kevin Wolf
Am 22.08.2024 um 12:52 hat luzhipeng geschrieben: > issue:https://gitlab.com/qemu-project/qemu/-/issues/1357 > empty vmdk only contains metadata, ovftool failed. > So it allocates more one sector for empty disk. the ovftool > command line: ovftool input.ovf output.ova > > Signed-off-by: luzhipeng

Re: [PATCH] replace error_setg(&error_fatal, ...) with error_report()

2024-10-18 Thread Michael Tokarev
08.10.2024 01:27, Tudor Gheorghiu wrote: According to include/qapi/error.h: * Please don't error_setg(&error_fatal, ...), use error_report() and * exit(), because that's more obvious. Patch updates all instances of error_setg(&error_fatal, ...) with error_report(...), adds the explicit exit(1) a

Re: [PATCH 4/4] ci: Add check-migration-quick to the clang job

2024-10-18 Thread Daniel P . Berrangé
On Fri, Oct 18, 2024 at 04:25:07PM +0100, Peter Maydell wrote: > On Fri, 18 Oct 2024 at 10:01, Daniel P. Berrangé wrote: > > Test reliability is a different thing. If a particular test is > > flaky, it needs to either be fixed or disabled. Splitting into > > a fast & slow grouping doesn't address

Re: [PATCH] stubs: remove stubs/qdev.c

2024-10-18 Thread Zhao Liu
On Fri, Oct 18, 2024 at 04:33:33PM +0200, Paolo Bonzini wrote: > Date: Fri, 18 Oct 2024 16:33:33 +0200 > From: Paolo Bonzini > Subject: [PATCH] stubs: remove stubs/qdev.c > X-Mailer: git-send-email 2.46.2 > > qapi_event_send_device_deleted is always included (together > with the rest of QAPI) in

Re: [PATCH] meson.build: Remove ncurses workaround for OpenBSD

2024-10-18 Thread Michael Tokarev
12.10.2024 06:38, Brad Smith wrote: meson.build: Remove ncurses workaround for OpenBSD OpenBSD 7.5 has upgraded to ncurses 6.4. Queued to qemu-trivial tree, thanks! /mjt

[PATCH RFC v3 0/3] cxl: Multi-headed Single Logical Device (MHSLD)

2024-10-18 Thread Gregory Price
MHSLDs allow multiple hosts to access dynamic capacity on a single backing device. This complicates DC management because adds, removals, and accesses need to be vetted such that hosts don't stomp on each other's data. This patchset proposes a set of hooks to be called in cxl_type3.c when each of

Re: [PATCH RFC 0/5] hw/cxl: Type 2 Device RFC

2024-10-18 Thread Jonathan Cameron via
On Fri, 18 Oct 2024 16:25:58 +0100 Alejandro Lucero Palau wrote: > On 10/18/24 15:49, Zhi Wang wrote: > > On 17/10/2024 19.57, Cédric Le Goater wrote: > >> External email: Use caution opening links or attachments > >> > >> > >> Hello, > >> > >> On 5/18/23 04:45, Ira Weiny wrote: > >>> Type 2

Re: [RFC PATCH] cli: add connect-gpios option

2024-10-18 Thread Daniel P . Berrangé
On Fri, Oct 18, 2024 at 04:38:24PM +0100, Peter Maydell wrote: > On Thu, 10 Oct 2024 at 18:39, Octavian Purdila wrote: > > > > From: Valentin Ghita > > > > Add option to allow for connecting device GPIOs. This is useful when > > adding a peripheral device from the command line which uses an > > i

[PATCH RFC v3 2/3] cxl_type3: add MHD callbacks

2024-10-18 Thread Gregory Price
From: Svetly Todorov Introduce an API for validating DC adds, removes, and responses against a multi-headed device. mhd_reserve_extents() is called during a DC add request. This allows a multi-headed device to check whether the requested extents belong to another host. If not, then this function

[PATCH RFC v3 1/3] cxl-mailbox-utils: move CXLUpdateDCExtentListInPl into header

2024-10-18 Thread Gregory Price
From: Svetly Todorov Allows other CXL devices to access host DCD-add-response payload. Signed-off-by: Gregory Price Signed-off-by: Svetly Todorov --- hw/cxl/cxl-mailbox-utils.c | 16 include/hw/cxl/cxl_device.h | 16 2 files changed, 16 insertions(+), 16 del

Re: [PATCH v2] docs/system/cpu-hotplug: Update example's socket-id/core-id

2024-10-18 Thread Peter Maydell
On Thu, 10 Oct 2024 at 14:18, Peter Maydell wrote: > > The example of how to do vCPU hotplug and hot-unlpug in the > cpu-hotplug documentation no longer works, because the way we > allocate socket-id and core-id to CPUs by default has changed at some > point. The output also no longer matches wha

[PATCH RFC v3 3/3] mhsld: implement MHSLD device

2024-10-18 Thread Gregory Price
From: Svetly Todorov Using a shared-memory bytemap, validates that DC adds, releases, and reclamations happen on extents belonging to the appropriate host. The MHSLD device inherits from the CXL_TYPE3 class and adds the following configuration options: --mhd-head= --mhd-state_file= --mhd-init=

Re: [PATCH 07/10] target/i386/tcg: Use DPL-level accesses for interrupts and call gates

2024-10-18 Thread Michael Tokarev
10.07.2024 09:29, Paolo Bonzini wrote: This fixes a bug wherein i386/tcg assumed an interrupt return using the CALL or JMP instructions were always going from kernel or user mode to kernel mode, when using a call gate. This assumption is violated if the call gate has a DPL that is greater than 0.

Re: [RFC PATCH] cli: add connect-gpios option

2024-10-18 Thread Peter Maydell
On Fri, 18 Oct 2024 at 17:05, Daniel P. Berrangé wrote: > > On Fri, Oct 18, 2024 at 04:38:24PM +0100, Peter Maydell wrote: > > On Thu, 10 Oct 2024 at 18:39, Octavian Purdila wrote: > > > > > > From: Valentin Ghita > > > > > > Add option to allow for connecting device GPIOs. This is useful when >

Re: [PATCH] tests/qtest: Raise the ide-test timeout

2024-10-18 Thread Peter Maydell
On Tue, 15 Oct 2024 at 12:37, Peter Maydell wrote: > > The ide-test occasionally times out: on the system I run > vm-build-openbsd on, it usually takes about 18 seconds, but > occasionally hits the 60s timeout, likely when the host machine is > under heavy load. I have also seen this test hit its

Re: [RFC PATCH 00/16] rust: allow older versions of rustc and bindgen

2024-10-18 Thread Paolo Bonzini
On 10/18/24 15:31, Daniel P. Berrangé wrote: On Tue, Oct 15, 2024 at 03:17:18PM +0200, Paolo Bonzini wrote: On top of this, the required version of bindgen is still too new for Debian 12 and Ubuntu 22.04. This is fixed by the last four patches. This is an RFC for two reasons. First, because i

Re: [PATCH RFC 0/5] hw/cxl: Type 2 Device RFC

2024-10-18 Thread Alejandro Lucero Palau
On 10/18/24 15:49, Zhi Wang wrote: On 17/10/2024 19.57, Cédric Le Goater wrote: External email: Use caution opening links or attachments Hello, On 5/18/23 04:45, Ira Weiny wrote: Type 2 devices are not yet a reality.  Developing core kernel support is difficult without some test device to

Re: [PATCH 07/16] rust: use std::os::raw instead of core::ffi

2024-10-18 Thread Zhao Liu
On Tue, Oct 15, 2024 at 03:17:25PM +0200, Paolo Bonzini wrote: > Date: Tue, 15 Oct 2024 15:17:25 +0200 > From: Paolo Bonzini > Subject: [PATCH 07/16] rust: use std::os::raw instead of core::ffi > X-Mailer: git-send-email 2.46.2 > > core::ffi::c_* types were introduced in Rust 1.64.0. Use the old

Re: [PATCH] hw/arm: add Quanta GSZ bmc machine

2024-10-18 Thread Peter Maydell
On Mon, 7 Oct 2024 at 18:17, Titus Rwantare wrote: > > This patch adds the quanta-gsz-bmc target, a current Google machine of > the day. This machine will be used as a platform to enable features such > as the PECI bmc interface, and Intel eSPI virtual wire interface in > QEMU. > > Signed-off-by:

Re: [PATCH 06/16] rust: do not use OnceLock for properties

2024-10-18 Thread Zhao Liu
On Tue, Oct 15, 2024 at 03:17:24PM +0200, Paolo Bonzini wrote: > Date: Tue, 15 Oct 2024 15:17:24 +0200 > From: Paolo Bonzini > Subject: [PATCH 06/16] rust: do not use OnceLock for properties > X-Mailer: git-send-email 2.46.2 > > Properties are initialized lazily but always accessed within the big

Re: [PATCH] hw/sd/sdcard: Allow user creation of eMMCs

2024-10-18 Thread Peter Maydell
On Tue, 15 Oct 2024 at 14:57, Jan Luebbe wrote: > > For testing eMMC-specific functionality (such as handling boot > partitions), it would be very useful to attach them to generic VMs such > as x86_64 via the sdhci-pci device: > ... > -drive if=none,id=emmc-drive,file=emmc.img,format=raw \ > -d

Re: [PATCH v4 1/4] KVM: Dynamic sized kvm memslots array

2024-10-18 Thread Michael Tokarev
17.09.2024 19:38, Peter Xu wrote: Zhiyi reported an infinite loop issue in VFIO use case. The cause of that was a separate discussion, however during that I found a regression of dirty sync slowness when profiling. Each KVMMemoryListerner maintains an array of kvm memslots. Currently it's stat

Re: [PATCH 04/16] rust: patch bilge-impl to allow compilation with 1.63.0

2024-10-18 Thread Zhao Liu
On Tue, Oct 15, 2024 at 03:17:22PM +0200, Paolo Bonzini wrote: > Date: Tue, 15 Oct 2024 15:17:22 +0200 > From: Paolo Bonzini > Subject: [PATCH 04/16] rust: patch bilge-impl to allow compilation with > 1.63.0 > X-Mailer: git-send-email 2.46.2 > > Apply a patch that removes "let ... else" construc

Re: [RFC PATCH] cli: add connect-gpios option

2024-10-18 Thread Peter Maydell
On Thu, 10 Oct 2024 at 18:39, Octavian Purdila wrote: > > From: Valentin Ghita > > Add option to allow for connecting device GPIOs. This is useful when > adding a peripheral device from the command line which uses an > interrupt. > > It takes the following options: > > * in-dev-path, out-dev-path

Re: [QEMU RFC] hw/mem/cxl_type3: add guard to avoid event log overflow during a DC extent add/release request

2024-10-18 Thread Fan Ni
On Mon, Oct 14, 2024 at 12:23:22PM +0100, Jonathan Cameron wrote: > On Fri, 11 Oct 2024 13:24:50 -0700 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > One DC extent add/release request can take multiple DC extents. > > For each extent in the request, one DC event record will be generated

Re: [RFC V1 04/14] accel: set accelerator and machine props earlier

2024-10-18 Thread Steven Sistare
On 10/18/2024 11:08 AM, Fabiano Rosas wrote: Steve Sistare writes: Make all global and compat properties available before the first objects are created. Set accelerator compatibility properties in configure_accelerators, when the accelerator is chosen, and call configure_accelerators earlier.

Re: [PATCH v3 0/2] throttling for BLOCK_IO_ERROR

2024-10-18 Thread Kevin Wolf
Am 02.10.2024 um 17:18 hat Vladimir Sementsov-Ogievskiy geschrieben: > v2: switch to qom-path as discriminator, for this, add patch 01. > > Leonid Kaplan (1): > block-backend: per-device throttling of BLOCK_IO_ERROR reports > > Vladimir Sementsov-Ogievskiy (1): > qapi: add qom-path to BLOCK_I

Re: [PATCH v4] arm/kvm: add support for MTE

2024-10-18 Thread Peter Maydell
On Tue, 8 Oct 2024 at 12:43, Ganapatrao Kulkarni wrote: > > From: Cornelia Huck > > Extend the 'mte' property for the virt machine to cover KVM as > well. For KVM, we don't allocate tag memory, but instead enable > the capability. > > If MTE has been enabled, we need to disable migration, as we d

Re: [PATCH 4/4] ci: Add check-migration-quick to the clang job

2024-10-18 Thread Peter Maydell
On Fri, 18 Oct 2024 at 10:01, Daniel P. Berrangé wrote: > Test reliability is a different thing. If a particular test is > flaky, it needs to either be fixed or disabled. Splitting into > a fast & slow grouping doesn't address reliability, just hides > the problem from view. On the subject of 'fl

Re: [PATCH v4 0/6] migration: auto-converge refinements for huge VM

2024-10-18 Thread Peter Xu
On Thu, Oct 17, 2024 at 02:42:49PM +0800, yong.hu...@smartx.com wrote: > From: Hyman Huang > > v4: > 1. split the [PATCH v3 1/6] into smaller patches. > 2. refine some comment and commit message > 3. fix race issue for the throttle_dirty_sync_timer > 4. refine the util function cpu_throttle_dirty

Re: [PATCH 01/16] meson: import rust module into a global variable

2024-10-18 Thread Zhao Liu
On Tue, Oct 15, 2024 at 03:17:19PM +0200, Paolo Bonzini wrote: > Date: Tue, 15 Oct 2024 15:17:19 +0200 > From: Paolo Bonzini > Subject: [PATCH 01/16] meson: import rust module into a global variable > X-Mailer: git-send-email 2.46.2 > > Signed-off-by: Paolo Bonzini > --- > meson.build

Re: [PATCH 02/16] meson: remove repeated search for rust_root_crate.sh

2024-10-18 Thread Zhao Liu
On Tue, Oct 15, 2024 at 03:17:20PM +0200, Paolo Bonzini wrote: > Date: Tue, 15 Oct 2024 15:17:20 +0200 > From: Paolo Bonzini > Subject: [PATCH 02/16] meson: remove repeated search for rust_root_crate.sh > X-Mailer: git-send-email 2.46.2 > > Avoid repeated lines of the form > > Program scripts/ru

Re: [PATCH 0/2] fix backup-discard-source test for XFS

2024-10-18 Thread Kevin Wolf
Am 03.10.2024 um 08:39 hat Vladimir Sementsov-Ogievskiy geschrieben: > Hi Kevin! > > Now I revisit my old series, and looking here I see that I forget add you > into CC. > > Does it still make sense? Oops, I missed this one indeed. Thanks, applied to the block branch. Kevin

Re: [PATCH V1 3/4] hw/acpi: Reflect ACPI vCPU {present,enabled} states in ACPI _STA.{PRES,ENA} Bits

2024-10-18 Thread Igor Mammedov
On Fri, 18 Oct 2024 13:12:52 +0800 Zhao Liu wrote: > Hi Salil, > > On Mon, Oct 14, 2024 at 08:22:04PM +0100, Salil Mehta wrote: > > Date: Mon, 14 Oct 2024 20:22:04 +0100 > > From: Salil Mehta > > Subject: [PATCH V1 3/4] hw/acpi: Reflect ACPI vCPU {present,enabled} states > > in ACPI _STA.{PRES

Re: [PATCH RFC 0/5] hw/cxl: Type 2 Device RFC

2024-10-18 Thread Zhi Wang
On 17/10/2024 19.57, Cédric Le Goater wrote: > External email: Use caution opening links or attachments > > > Hello, > > On 5/18/23 04:45, Ira Weiny wrote: >> Type 2 devices are not yet a reality.  Developing core kernel support >> is difficult without some test device to model against. >> >> De

Re: [PATCH] Migration: Add trace points for vmstate handler insertion/removal

2024-10-18 Thread Fabiano Rosas
Peter Xu writes: > SaveStateEntry has lots of magics internally, on alias_id, get_id() being > able to overwrite the original idstr, compat fields, ID_ANY, and so on. It > may not be always clear that what all these fields are being registered for > some device we care. > > Add trace points for

Re: [PATCH 4/4] ci: Add check-migration-quick to the clang job

2024-10-18 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Fri, Oct 18, 2024 at 10:51:08AM -0300, Fabiano Rosas wrote: >> Daniel P. Berrangé writes: >> >> > On Thu, Oct 17, 2024 at 01:29:35PM -0300, Fabiano Rosas wrote: >> >> Daniel P. Berrangé writes: >> >> >> >> > On Thu, Oct 17, 2024 at 11:32:11AM -0300, Fabiano Ros

Re: [PATCH V1 0/4] Arch agnostic ACPI changes to support vCPU Hotplug (on Archs like ARM)

2024-10-18 Thread Igor Mammedov
On Mon, 14 Oct 2024 20:22:01 +0100 Salil Mehta wrote: > Certain CPU architecture specifications [1][2][3] prohibit changes to the CPUs > *presence* after the kernel has booted. This is because many system > initializations depend on the exact CPU count at boot time and do not expect > it > to ch

[PATCH 09/13] rust: clean up define_property macro

2024-10-18 Thread Paolo Bonzini
Use the "struct update" syntax to initialize most of the fields to zero, and simplify the handmade type-checking of $name. Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/device_class.rs | 29 ++--- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/rust/qe

[PATCH] Migration: Add trace points for vmstate handler insertion/removal

2024-10-18 Thread Peter Xu
SaveStateEntry has lots of magics internally, on alias_id, get_id() being able to overwrite the original idstr, compat fields, ID_ANY, and so on. It may not be always clear that what all these fields are being registered for some device we care. Add trace points for SaveStateEntry insertions/remo

[PATCH 02/13] meson: remove repeated search for rust_root_crate.sh

2024-10-18 Thread Paolo Bonzini
Avoid repeated lines of the form Program scripts/rust/rust_root_crate.sh found: YES (/home/pbonzini/work/upstream/qemu/scripts/rust/rust_root_crate.sh) in the meson logs. Reviewed-by: Junjie Mao Signed-off-by: Paolo Bonzini --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH 06/13] rust: remove unused macro module_init!

2024-10-18 Thread Paolo Bonzini
Registering the object is now done by the #[derive(Object)] macro. Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/definitions.rs | 43 1 file changed, 43 deletions(-) diff --git a/rust/qemu-api/src/definitions.rs b/rust/qemu-api/src/definitions.rs index 49ac

[PATCH 04/13] rust: do not use --no-size_t-is-usize

2024-10-18 Thread Paolo Bonzini
This not necessary and makes it harder to write code that is portable between 32- and 64-bit systems: it adds extra casts even though size_of, align_of or offset_of already return the right type. Signed-off-by: Paolo Bonzini --- meson.build | 1 - rust/qemu-api/src/definitio

[PATCH 07/13] rust: modernize #[derive(Object)] for ELF platforms

2024-10-18 Thread Paolo Bonzini
Some newer ABI implementations do not provide .ctors; and while some linkers rewrite .ctors into .init_array, not all of them do. Use the newer .init_array ABI, which works more reliably, and apply it to all non-Apple, non-Windows platforms. This is similar to how the ctor crate operates; without

[PATCH 08/13] rust: build integration test for the qemu_api crate

2024-10-18 Thread Paolo Bonzini
Adjust the integration test to compile with a subset of QEMU object files, and make it actually create an object of the class it defines. Follow the Rust filesystem conventions, where tests go in tests/ if they use the library in the same way any other code would. Signed-off-by: Paolo Bonzini --

[PATCH 01/13] meson: import rust module into a global variable

2024-10-18 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- meson.build | 1 + rust/qemu-api-macros/meson.build | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index d26690ce204..ffd78b6cbb3 100644 --- a/meson.build +++ b/meson.build @@ -15,6 +15,7 @@ me

[PATCH 00/13] rust: miscellaneous cleanups + QOM integration tests

2024-10-18 Thread Paolo Bonzini
This series integrates some of the observations from the MSRV patches at https://lore.kernel.org/qemu-devel/20241015131735.518771-1-pbonz...@redhat.com/. The main changes here are two: first, build an integration test that actually tries to create a QOM object that is defined by Rust code; second,

[PATCH 10/13] qdev: make properties array "const"

2024-10-18 Thread Paolo Bonzini
Constify all accesses to qdev properties, except for the ObjectPropertyAccessor itself. This makes it possible to place them in read-only memory, and also lets Rust bindings switch from "static mut" arrays to "static"; which is advantageous, because mutable statics are highly discouraged. Signed-

[PATCH 11/13] rust: make properties array immutable

2024-10-18 Thread Paolo Bonzini
Now that device_class_set_props() takes a const pointer, the only part of "define_property!" that needs to be non-const is the call to try_into(). This in turn will only break if offset_of returns a value with the most significant bit set (i.e. a struct size that is >=2^31 or >= 2^63, respectively

[PATCH 03/13] meson: pass rustc_args when building all crates

2024-10-18 Thread Paolo Bonzini
rustc_args is needed to smooth the difference in warnings between the various versions of rustc. Always include those arguments. Signed-off-by: Paolo Bonzini --- meson.build | 18 +++--- rust/qemu-api/meson.build | 2 +- rust/qemu-api/src/device_class.

[PATCH 12/13] rust: provide safe wrapper for MaybeUninit::zeroed()

2024-10-18 Thread Paolo Bonzini
MaybeUninit::zeroed() is handy, but it introduces unsafe (and has a pretty heavy syntax in general). Introduce a trait that provides the same functionality while staying within safe Rust. In addition, MaybeUninit::zeroed() is not available as a "const" function until Rust 1.75.0, so this also pre

[PATCH 13/13] rust: do not use TYPE_CHARDEV unnecessarily

2024-10-18 Thread Paolo Bonzini
In the invocation of qdev_prop_set_chr(), "chardev" is the name of a property rather than a type and has to match the name of the property in device_class.rs. Do not use TYPE_CHARDEV here, just like in the C version of pl011_create. Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device

[PATCH 05/13] rust: remove uses of #[no_mangle]

2024-10-18 Thread Paolo Bonzini
Mangled symbols do not cause any issue; disabling mangling is only useful if C headers reference the Rust function, which is not the case here. Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 5 - rust/hw/char/pl011/src/device_class.rs | 2 -- rust/hw/char/pl011/src

Re: [PATCH v2] block/file-posix: optimize append write

2024-10-18 Thread Kevin Wolf
Am 04.10.2024 um 12:41 hat Sam Li geschrieben: > When the file-posix driver emulates append write, it holds the lock > whenever accessing wp, which limits the IO queue depth to one. > > The write IO flow can be optimized to allow concurrent writes. The lock > is held in two cases: > 1. Assumed tha

Re: [PATCH 4/4] ci: Add check-migration-quick to the clang job

2024-10-18 Thread Daniel P . Berrangé
On Fri, Oct 18, 2024 at 11:28:53AM -0300, Fabiano Rosas wrote: > Daniel P. Berrangé writes: > > > On Fri, Oct 18, 2024 at 10:51:03AM -0300, Fabiano Rosas wrote: > >> Daniel P. Berrangé writes: > >> > >> > That could be a good reason to split the migration-test into > >> > two distinct programs.

[PATCH] stubs: remove stubs/qdev.c

2024-10-18 Thread Paolo Bonzini
qapi_event_send_device_deleted is always included (together with the rest of QAPI) in libqemuutil.a, so it is unnecessary to include a stub for it. This avoids a duplicate symbol in libqemuutil.a, which in principle could result in missing events on the monitor. Cc: qemu-sta...@nongnu.org Signed-

Re: [PATCH V1 4/4] hw/acpi: Populate vCPU Hotplug VMSD to migrate `is_{present,enabled}` states

2024-10-18 Thread Igor Mammedov
On Mon, 14 Oct 2024 20:22:05 +0100 Salil Mehta wrote: > The ACPI CPU hotplug states `is_{present, enabled}` must be migrated alongside > other vCPU hotplug states to the destination VM. Therefore, they should be > integrated into the existing CPU Hotplug VM State Description (VMSD) table. > Depen

Re: [PATCH 4/4] ci: Add check-migration-quick to the clang job

2024-10-18 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Fri, Oct 18, 2024 at 10:51:03AM -0300, Fabiano Rosas wrote: >> Daniel P. Berrangé writes: >> >> > On Fri, Oct 18, 2024 at 10:46:55AM +0100, Peter Maydell wrote: >> >> On Fri, 18 Oct 2024 at 10:01, Daniel P. Berrangé >> >> wrote: >> >> > >> >> > On Thu, Oct 17,

Re: [PATCH V1 3/4] hw/acpi: Reflect ACPI vCPU {present,enabled} states in ACPI _STA.{PRES,ENA} Bits

2024-10-18 Thread Igor Mammedov
On Mon, 14 Oct 2024 20:22:04 +0100 Salil Mehta wrote: > Reflect the ACPI CPU hotplug `is_{present, enabled}` states in the `_STA.PRES` > (presence) and `_STA.ENA` (enabled) bits when the guest kernel evaluates the > ACPI `_STA` method during initialization, as well as when vCPUs are > hot-plugge

Re: [PATCH 4/4] ci: Add check-migration-quick to the clang job

2024-10-18 Thread Daniel P . Berrangé
On Fri, Oct 18, 2024 at 10:51:08AM -0300, Fabiano Rosas wrote: > Daniel P. Berrangé writes: > > > On Thu, Oct 17, 2024 at 01:29:35PM -0300, Fabiano Rosas wrote: > >> Daniel P. Berrangé writes: > >> > >> > On Thu, Oct 17, 2024 at 11:32:11AM -0300, Fabiano Rosas wrote: > >> >> Recent changes to h

Re: [PATCH V1 2/4] hw/acpi: Update ACPI CPU Status `is_{present, enabled}` during vCPU hot(un)plug

2024-10-18 Thread Igor Mammedov
On Mon, 14 Oct 2024 20:22:03 +0100 Salil Mehta wrote: > Update the `AcpiCpuStatus` for `is_enabled` and `is_present` accordingly when > vCPUs are hot-plugged or hot-unplugged, taking into account the *persistence* > of the vCPUs. > > Signed-off-by: Salil Mehta > --- > hw/acpi/cpu.c | 7 +++

[PATCH 1/7] docs/system/arm/stm32: List olimex-stm32-h405 in document title

2024-10-18 Thread Peter Maydell
List the olimex-stm32-h405 board in the document title, so that the board name appears in the table of contents in system/target-arm.rst. Signed-off-by: Peter Maydell --- docs/system/arm/stm32.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/system/arm/stm32.rst b

[PATCH 7/7] docs/system/target-arm.rst: Remove "many boards are undocumented" note

2024-10-18 Thread Peter Maydell
We now have at least placeholder documentation for every Arm board, so we can remove the apologetic note that says that there are undocumented ones which you can only find out about via the ``--machine help`` option. Signed-off-by: Peter Maydell --- docs/system/target-arm.rst | 4 1 file ch

[PATCH 5/7] docs/system/arm: Add placeholder doc for xlnx-zcu102 board

2024-10-18 Thread Peter Maydell
Add a placeholder doc for the xlnx-zcu102 board. Signed-off-by: Peter Maydell --- MAINTAINERS | 1 + docs/system/arm/xlnx-zcu102.rst | 19 +++ docs/system/target-arm.rst | 1 + 3 files changed, 21 insertions(+) create mode 100644 docs/system/arm/xlnx-z

[PATCH 2/7] docs/system/arm: Don't use wildcard '*-bmc' in doc titles

2024-10-18 Thread Peter Maydell
We have two Arm board doc files which both use '*-bmc' in their documentation title. The result is that when you read the table of contents in system/target-arm.html you don't know which boards are covered by which file. Expand out the board names entirely in the document titles. Signed-off-by: P

[PATCH 4/7] docs/system/arm: Add placeholder doc for exynos4 boards

2024-10-18 Thread Peter Maydell
Add a placeholder doc for the exynos4 boards nuri and smdkc210. Signed-off-by: Peter Maydell --- MAINTAINERS| 1 + docs/system/arm/exynos.rst | 9 + docs/system/target-arm.rst | 1 + 3 files changed, 11 insertions(+) create mode 100644 docs/system/arm/exynos.rst diff --

[PATCH 3/7] docs/system/arm: Split fby35 out from aspeed.rst

2024-10-18 Thread Peter Maydell
The fby35 machine is not implemented in hw/arm/aspeed.c, but its documentation is currently stuck at the end of aspeed.rst, formatted in a way that it gets its own heading in the top-level list of boards in target-arm.html. We don't have any other boards that we document like this; split it out in

[PATCH 0/7] docs/system/arm: Provide at least skeleton docs for all boards

2024-10-18 Thread Peter Maydell
In target-arm.rst there is an apologetic note: Unfortunately many of the Arm boards QEMU supports are currently undocumented; you can get a complete list by running ``qemu-system-aarch64 --machine help``. However, the situation isn't actually as bleak as this suggests: over the years we hav

[PATCH 6/7] docs/system/arm: Add placeholder docs for mcimx6ul-evk and mcimx7d-sabre

2024-10-18 Thread Peter Maydell
Add placeholder docs for the mcimx6ul-evk and mcimx7d-sabre boards. Signed-off-by: Peter Maydell --- MAINTAINERS | 2 ++ docs/system/arm/mcimx6ul-evk.rst | 5 + docs/system/arm/mcimx7d-sabre.rst | 5 + docs/system/target-arm.rst| 2 ++ 4 files changed, 14 i

Re: [PATCH V1 1/4] hw/acpi: Initialize ACPI Hotplug CPU Status with Support for vCPU `Persistence`

2024-10-18 Thread Igor Mammedov
On Mon, 14 Oct 2024 20:22:02 +0100 Salil Mehta wrote: > Certain CPU architecture specifications [1][2][3] prohibit changes to CPU ^ these do not point to specs but never mind > presence after the kernel has booted. This limitation exists because

Re: [PATCH v9 4/7] qapi: add blockdev-replace command

2024-10-18 Thread Kevin Wolf
Am 04.10.2024 um 19:01 hat Vladimir Sementsov-Ogievskiy geschrieben: > On 02.10.24 17:41, Vladimir Sementsov-Ogievskiy wrote: > > On 26.06.24 14:53, Vladimir Sementsov-Ogievskiy wrote: > > > diff --git a/qapi/block-core.json b/qapi/block-core.json > > > index df5e07debd..0a6f08a6e0 100644 > > > ---

Re: [PATCH 4/4] ci: Add check-migration-quick to the clang job

2024-10-18 Thread Daniel P . Berrangé
On Fri, Oct 18, 2024 at 10:51:03AM -0300, Fabiano Rosas wrote: > Daniel P. Berrangé writes: > > > On Fri, Oct 18, 2024 at 10:46:55AM +0100, Peter Maydell wrote: > >> On Fri, 18 Oct 2024 at 10:01, Daniel P. Berrangé > >> wrote: > >> > > >> > On Thu, Oct 17, 2024 at 01:29:35PM -0300, Fabiano Rosa

Re: [PATCH 4/4] ci: Add check-migration-quick to the clang job

2024-10-18 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Thu, Oct 17, 2024 at 01:29:35PM -0300, Fabiano Rosas wrote: >> Daniel P. Berrangé writes: >> >> > On Thu, Oct 17, 2024 at 11:32:11AM -0300, Fabiano Rosas wrote: >> >> Recent changes to how we invoke the migration tests have >> >> (intentionally) caused them to no

Re: [PATCH 4/4] ci: Add check-migration-quick to the clang job

2024-10-18 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Fri, Oct 18, 2024 at 10:46:55AM +0100, Peter Maydell wrote: >> On Fri, 18 Oct 2024 at 10:01, Daniel P. Berrangé wrote: >> > >> > On Thu, Oct 17, 2024 at 01:29:35PM -0300, Fabiano Rosas wrote: >> > > Daniel P. Berrangé writes: >> > > >> > > > On Thu, Oct 17, 2024

[PULL v1 0/3] Merge tpm 2024/10/18 v1

2024-10-18 Thread Stefan Berger
Hello! This PR fixes an issue with a TPM test case under heavy system load and improves control channel error message handling. Stefan The following changes since commit 95a16ee753d6da651fce8df876333bf7fcf134d9: Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into

[PULL v1 3/3] tests: Wait for migration completion on destination QEMU to avoid failures

2024-10-18 Thread Stefan Berger
Rather than waiting for the completion of migration on the source side, wait for it on the destination QEMU side to avoid accessing the TPM TIS memory mapped registers before QEMU could restore their state. This error condition could be triggered on busy systems where the destination QEMU did not h

Re: [PATCH v2 0/4] block: Miscellaneous minor Coverity fixes

2024-10-18 Thread Kevin Wolf
Am 08.10.2024 um 18:47 hat Peter Maydell geschrieben: > This patchset is the remaining stragglers from my > first set of "minor Coverity fixes" patches posted a > couple of months back: > https://patchew.org/QEMU/20240731143617.3391947-1-peter.mayd...@linaro.org/ > Of that series, patches 3, 4, 5 a

[PULL v1 1/3] tpm: Use new ptm_cap_n structure for PTM_GET_CAPABILITY

2024-10-18 Thread Stefan Berger
Use the new ptm_cap_n structure for getting the PTM_GET_CAPABILITY response from swtpm. Previously only 17 bits could possibly have been set in ptm_cap (uint64_t) in big endian order and those bits are now found in the 2nd 32bit word in the response in the caps field. This data structure makes it

[PULL v1 2/3] tpm_emulator: Read control channel response in 2 passes

2024-10-18 Thread Stefan Berger
Error responses from swtpm are typically only 4 bytes long with the exception of a few commands that return more bytes. Therefore, read the entire response in 2 steps and stop if the first few bytes indicate an error response with no subsequent bytes readable. Read the rest in a 2nd step, if needed

Re: [PATCH v2 31/31] system: remove unused qerror.h header

2024-10-18 Thread Daniel P . Berrangé
On Fri, Oct 18, 2024 at 06:17:15PM +0800, Zhao Liu wrote: > Hi Daniel, > > On Thu, Oct 17, 2024 at 12:33:43PM +0100, Daniel P. Berrangé wrote: > > Date: Thu, 17 Oct 2024 12:33:43 +0100 > > From: "Daniel P. Berrangé" > > Subject: [PATCH v2 31/31] system: remove unused qerror.h header > > > > Sign

  1   2   >