Re: [PATCH-for-9.0? 01/12] accel/tcg/plugin: Remove CONFIG_SOFTMMU_GATE definition

2024-03-14 Thread Thomas Huth
On 13/03/2024 22.33, Philippe Mathieu-Daudé wrote: The CONFIG_SOFTMMU_GATE definition was never used, remove it. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/plugin-gen.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 802

Re: [PATCH-for-9.0? 02/12] travis-ci: Rename SOFTMMU -> SYSTEM

2024-03-14 Thread Thomas Huth
On 13/03/2024 22.33, Philippe Mathieu-Daudé wrote: Since we *might* have user emulation with softmmu, rename MAIN_SOFTMMU_TARGETS as MAIN_SYSTEM_TARGETS to express 'system emulation targets'. Signed-off-by: Philippe Mathieu-Daudé --- .travis.yml | 8 1 file changed, 4 insertions(+),

Re: [External] Re: [PATCH v2 1/1] memory tier: acpi/hmat: create CPUless memory tiers after obtaining HMAT info

2024-03-14 Thread Huang, Ying
"Ho-Ren (Jack) Chuang" writes: > On Tue, Mar 12, 2024 at 2:21 AM Huang, Ying wrote: >> >> "Ho-Ren (Jack) Chuang" writes: >> >> > The current implementation treats emulated memory devices, such as >> > CXL1.1 type3 memory, as normal DRAM when they are emulated as normal memory >> > (E820_TYPE_RA

Re: [PATCH v3] target/riscv: Implement dynamic establishment of custom decoder

2024-03-14 Thread Philippe Mathieu-Daudé
On 14/3/24 07:24, Huang Tao wrote: Hi, On 2024/3/13 18:47, Philippe Mathieu-Daudé wrote: +{ +    GPtrArray *dynamic_decoders; +    dynamic_decoders = g_ptr_array_sized_new(decoder_table_size); +    for (size_t i = 0; i < decoder_table_size; ++i) { +    if (decoder_table[i].guard_func && +

Re: [PATCH] vfio/iommufd: Fix memory leak

2024-03-14 Thread Cédric Le Goater
On 3/14/24 04:31, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Sent: Thursday, March 14, 2024 5:06 AM To: qemu-devel@nongnu.org Cc: Alex Williamson ; Cédric Le Goater ; Eric Auger ; Liu, Yi L ; Duan, Zhenzhong Subject: [PATCH] vfio/iommufd: Fix memory leak Make s

[PATCH v2] vfio/iommufd: Fix memory leak

2024-03-14 Thread Cédric Le Goater
Coverity reported a memory leak on variable 'contents' in routine iommufd_cdev_getfd(). Use g_autofree variables to simplify the exit path and get rid of g_free() calls. Cc: Eric Auger Cc: Yi Liu Fixes: CID 1540007 Fixes: 5ee3dc7af785 ("vfio/iommufd: Implement the iommufd backend") Suggested-by:

Re: [PATCH v3 3/3] Add support for RAPL MSRs in KVM/Qemu

2024-03-14 Thread Anthony Harivel
Hi Daniel, > You don't need to access it via the /node/ hierarchy > > The canonical path for CPUs would be > > /sys/devices/system/cpu/cpuNNN/topology > > The core_cpus_list file is giving you hyper-thread siblings within > a core, which I don't think is what you want. > > If you're after dis

[PATCH v3 2/2] vhost: Perform memory section dirty scans once per iteration

2024-03-14 Thread Si-Wei Liu
On setups with one or more virtio-net devices with vhost on, dirty tracking iteration increases cost the bigger the number amount of queues are set up e.g. on idle guests migration the following is observed with virtio-net with vhost=on: 48 queues -> 78.11% [.] vhost_dev_sync_region.isra.13 8 que

[PATCH v3 1/2] vhost: dirty log should be per backend type

2024-03-14 Thread Si-Wei Liu
There could be a mix of both vhost-user and vhost-kernel clients in the same QEMU process, where separate vhost loggers for the specific vhost type have to be used. Make the vhost logger per backend type, and have them properly reference counted. Suggested-by: Michael S. Tsirkin Signed-off-by: Si

Re: [PATCH v3 3/3] Add support for RAPL MSRs in KVM/Qemu

2024-03-14 Thread Daniel P . Berrangé
On Thu, Mar 14, 2024 at 09:26:53AM +0100, Anthony Harivel wrote: > > Hi Daniel, > > > > You don't need to access it via the /node/ hierarchy > > > > The canonical path for CPUs would be > > > > /sys/devices/system/cpu/cpuNNN/topology > > > > The core_cpus_list file is giving you hyper-thread s

Re: [PATCH v6 03/17] hw/loongarch: Add slave cpu boot_code

2024-03-14 Thread gaosong
在 2024/3/14 9:31, maobibo 写道: On 2024/3/11 下午2:50, maobibo wrote: On 2024/3/8 下午5:36, gaosong wrote: 在 2024/3/8 16:27, maobibo 写道: On 2024/3/8 上午12:48, Song Gao wrote: Signed-off-by: Song Gao Message-Id: <20240301093839.663947-4-gaos...@loongson.cn> ---   hw/loongarch/boot.c | 70

Re: [PATCH v6 03/17] hw/loongarch: Add slave cpu boot_code

2024-03-14 Thread gaosong
在 2024/3/14 10:28, chen huacai 写道: Song, On Fri, Mar 8, 2024 at 12:51 AM Song Gao wrote: Signed-off-by: Song Gao Message-Id: <20240301093839.663947-4-gaos...@loongson.cn> --- hw/loongarch/boot.c | 70 - 1 file changed, 69 insertions(+), 1 del

Re: [PATCH v4 05/23] qapi: create QAPISchemaDefinition

2024-03-14 Thread Markus Armbruster
John Snow writes: > Include entities don't have names, but we generally expect "entities" to > have names. Reclassify all entities with names as *definitions*, leaving > the nameless include entities as QAPISchemaEntity instances. > > This is primarily to help simplify typing around expectations

RE: [PATCH v2] vfio/iommufd: Fix memory leak

2024-03-14 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH v2] vfio/iommufd: Fix memory leak > >Coverity reported a memory leak on variable 'contents' in routine >iommufd_cdev_getfd(). Use g_autofree variables to simplify the exit >path and get rid of g_free() calls. > >Cc: Eric Auger

[PATCH v4] target/riscv: Implement dynamic establishment of custom decoder

2024-03-14 Thread Huang Tao
In this patch, we modify the decoder to be a freely composable data structure instead of a hardcoded one. It can be dynamically builded up according to the extensions. This approach has several benefits: 1. Provides support for heterogeneous cpu architectures. As we add decoder in RISCVCPU, each

[PATCH v2 3/4] tests/avocado: use OpenBSD 7.4 for sbsa-ref

2024-03-14 Thread Marcin Juszkiewicz
7.4 was released in October 2023, time to update before 7.3 gets dropped. Disabled tests for 'max' cpu as OpenBSD fails there. Signed-off-by: Marcin Juszkiewicz --- tests/avocado/machine_aarch64_sbsaref.py | 47 +++- 1 file changed, 34 insertions(+), 13 deletions(-)

[PATCH v2 2/4] tests/avocado: drop virtio-rng from sbsa-ref tests

2024-03-14 Thread Marcin Juszkiewicz
sbsa-ref is supposed to emulate real hardware so virtio-rng-pci does not fit here Signed-off-by: Marcin Juszkiewicz --- tests/avocado/machine_aarch64_sbsaref.py | 8 1 file changed, 8 deletions(-) diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machine_aarch64_sb

[PATCH v2 1/4] tests/avocado: update sbsa-ref firmware

2024-03-14 Thread Marcin Juszkiewicz
We now have CI job to build those and publish in space with readable urls. Firmware is built using Debian 'bookworm' cross toolchain (gcc 12.2.0). Used versions: - Trusted Firmware v2.10.2 - Tianocore EDK2 stable202402 - Tianocore EDK2 Platforms code commit 085c2fb Signed-off-by: Marcin Juszkie

[PATCH v2 0/4] tests/avocado: update sbsa-ref firmware to latest

2024-03-14 Thread Marcin Juszkiewicz
Updating sbsa-ref firmware for QEMU CI was manual task. Now it is replaced by CI job run on CodeLinaro Gitlab instance. This patchset updates to current state: - Trusted Firmware v2.10.2 (latest LTS) - Tianocore EDK2 stable202402 (latest release) And Tianocore EDK2-platforms commit 085c2fb (edk2

[PATCH v2 4/4] tests/avocado: sbsa-ref: add Alpine tests for misc 'max' setup

2024-03-14 Thread Marcin Juszkiewicz
PAuth makes run timeout on CI so add tests using 'max' without it and with impdef one. Signed-off-by: Marcin Juszkiewicz --- tests/avocado/machine_aarch64_sbsaref.py | 18 ++ 1 file changed, 18 insertions(+) diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/

Re: [PATCH for-9.0 v14 3/8] target/riscv: always clear vstart in whole vec move insns

2024-03-14 Thread Daniel Henrique Barboza
On 3/13/24 19:36, Richard Henderson wrote: On 3/13/24 12:01, Daniel Henrique Barboza wrote: These insns have 2 paths: we'll either have vstart already cleared if vstart_eq_zero or we'll do a brcond to check if vstart >= maxsz to call the 'vmvr_v' helper. The helper will clear vstart if it exe

Re: [PATCH for-9.0 v14 4/8] target/riscv/vector_helpers: do early exit when vstart >= vl

2024-03-14 Thread Daniel Henrique Barboza
On 3/14/24 00:52, Max Chou wrote: Hi Daniel, According the v spec section 15.2 & 15.3. "The vcpop.m instruction writes x[rd] even if vl=0 (with the value 0, since no mask elements are active).   Traps on vcpop.m are always reported with a vstart of 0. The vcpop.m instruction will raise an

[PATCH v4] linux-aio: add IO_CMD_FDSYNC command support

2024-03-14 Thread Prasad Pandit
From: Prasad Pandit Libaio defines IO_CMD_FDSYNC command to sync all outstanding asynchronous I/O operations, by flushing out file data to the disk storage. Enable linux-aio to submit such aio request. This helps to reduce latency induced via pthread_create calls by thread-pool (aio=threads). S

[PATCH] file-posix: rearrange BDRVRawState fields

2024-03-14 Thread Prasad Pandit
From: Prasad Pandit Rearrange BRDVRawState structure fields to avoid memory fragments in its object's memory and save some(~8) bytes per object. Signed-off-by: Prasad Pandit --- block/file-posix.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-)

[PATCH v6 0/3] Introduce sdtrig ISA extension

2024-03-14 Thread Himanshu Chauhan
All the CPUs may or may not implement the debug triggers. Some CPUs may implement only debug specification v0.13 and not sdtrig ISA extension. This patchset, adds sdtrig ISA as an extension which can be turned on or off by sdtrig= option. It is turned off by default. When debug is true and sdtrig

[PATCH v6 2/3] target/riscv: Expose sdtrig ISA extension

2024-03-14 Thread Himanshu Chauhan
This patch adds "sdtrig" in the ISA string when sdtrig extension is enabled. The sdtrig extension may or may not be implemented in a system. Therefore, the -cpu rv64,sdtrig= option can be used to dynamically turn sdtrig extension on or off. Since, the sdtrig ISA extension is a superset

[PATCH v6 1/3] target/riscv: Enable mcontrol6 triggers only when sdtrig is selected

2024-03-14 Thread Himanshu Chauhan
The mcontrol6 triggers are not defined in debug specification v0.13 These triggers are defined in sdtrig ISA extension. This patch: * Adds ext_sdtrig capability which is used to select mcontrol6 triggers * Keeps the debug property. All triggers that are defined in v0.13 are exposed. Si

[PATCH v6 3/3] target/riscv: Enable sdtrig for Ventana's Veyron CPUs

2024-03-14 Thread Himanshu Chauhan
Ventana's Veyron CPUs support sdtrig ISA extension. By default, enable the sdtrig extension and disable the debug property for these CPUs. Signed-off-by: Himanshu Chauhan --- target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 66c9

[RFC PATCH v2] contrib/plugins: control flow plugin (WIP!)

2024-03-14 Thread Alex Bennée
This is a simple control flow tracking plugin that uses the latest inline and conditional operations to detect and track control flow changes. It is currently an exercise at seeing how useful the changes are. Based-on: <20240312075428.244210-1-pierrick.bouv...@linaro.org> Cc: Gustavo Romero Cc: P

[PATCH 1/5] roms/efi: clean up edk2 build config

2024-03-14 Thread Gerd Hoffmann
Needed to avoid stale toolchain configurations breaking firmware builds. Signed-off-by: Gerd Hoffmann --- roms/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/roms/Makefile b/roms/Makefile index 8e5d8d26a9a0..edc234a0e886 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -187,6 +187

[PATCH 4/5] roms/efi: use pure 64-bit build for edk2-x86_64-secure-code.fd

2024-03-14 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- roms/edk2-build.config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roms/edk2-build.config b/roms/edk2-build.config index ef3eb7beebe7..cc9b21154205 100644 --- a/roms/edk2-build.config +++ b/roms/edk2-build.config @@ -70,11 +70,11 @@ c

[PATCH 3/5] roms/efi: exclude efi shell from secure boot builds

2024-03-14 Thread Gerd Hoffmann
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4641 Signed-off-by: Gerd Hoffmann --- roms/edk2-build.config | 1 + 1 file changed, 1 insertion(+) diff --git a/roms/edk2-build.config b/roms/edk2-build.config index 05cbafef70cb..ef3eb7beebe7 100644 --- a/roms/edk2-build.config +++ b/roms

[PATCH 0/5] roms/efi: cleanup fix, config update, ekd2 binary rebuild

2024-03-14 Thread Gerd Hoffmann
Gerd Hoffmann (5): roms/efi: clean up edk2 build config roms/efi: drop workaround for edk2-stable202308 roms/efi: exclude efi shell from secure boot builds roms/efi: use pure 64-bit build for edk2-x86_64-secure-code.fd update edk2 binaries for arm, risc-v and x86 secure boot. pc-bios

[PATCH 2/5] roms/efi: drop workaround for edk2-stable202308

2024-03-14 Thread Gerd Hoffmann
Not needed for newer edk2 versions. Signed-off-by: Gerd Hoffmann --- roms/edk2-build.config | 6 -- 1 file changed, 6 deletions(-) diff --git a/roms/edk2-build.config b/roms/edk2-build.config index 0d367dbdb775..05cbafef70cb 100644 --- a/roms/edk2-build.config +++ b/roms/edk2-build.config @

Re: [RFC PATCH v2] contrib/plugins: control flow plugin (WIP!)

2024-03-14 Thread Alex Bennée
Alex Bennée writes: > This is a simple control flow tracking plugin that uses the latest > inline and conditional operations to detect and track control flow > changes. It is currently an exercise at seeing how useful the changes > are. > > Based-on: <20240312075428.244210-1-pierrick.bouv...@lina

Re: [PATCH v2 2/4] tests/avocado: drop virtio-rng from sbsa-ref tests

2024-03-14 Thread Alex Bennée
Marcin Juszkiewicz writes: > sbsa-ref is supposed to emulate real hardware so virtio-rng-pci > does not fit here What is real anyway ;-) VirtIO devices exist in real life and I would argue for PCI the device appears very much like a normal PCI device. I could see the argument for avoiding virti

Re: [PATCH v2 2/4] tests/avocado: drop virtio-rng from sbsa-ref tests

2024-03-14 Thread Peter Maydell
On Thu, 14 Mar 2024 at 12:11, Alex Bennée wrote: > > Marcin Juszkiewicz writes: > > > sbsa-ref is supposed to emulate real hardware so virtio-rng-pci > > does not fit here > > What is real anyway ;-) > > VirtIO devices exist in real life and I would argue for PCI the device > appears very much li

Re: [PATCH v2 3/4] tests/avocado: use OpenBSD 7.4 for sbsa-ref

2024-03-14 Thread Alex Bennée
Marcin Juszkiewicz writes: > 7.4 was released in October 2023, time to update before 7.3 gets dropped. > > Disabled tests for 'max' cpu as OpenBSD fails there. > > Signed-off-by: Marcin Juszkiewicz > --- > tests/avocado/machine_aarch64_sbsaref.py | 47 > +++- > 1 fi

Re: [RFC PATCH v2] contrib/plugins: control flow plugin (WIP!)

2024-03-14 Thread Pierrick Bouvier
On 3/14/24 16:02, Alex Bennée wrote: Alex Bennée writes: This is a simple control flow tracking plugin that uses the latest inline and conditional operations to detect and track control flow changes. It is currently an exercise at seeing how useful the changes are. Based-on: <20240312075428.2

Re: [PATCH v2 1/6] virtio/virtio-pci: Handle extra notification data

2024-03-14 Thread Jonah Palmer
On 3/13/24 11:01 PM, Jason Wang wrote: On Wed, Mar 13, 2024 at 7:55 PM Jonah Palmer wrote: Add support to virtio-pci devices for handling the extra data sent from the driver to the device when the VIRTIO_F_NOTIFICATION_DATA transport feature has been negotiated. The extra data that's passe

Re: [PATCH v2 2/4] tests/avocado: drop virtio-rng from sbsa-ref tests

2024-03-14 Thread Alex Bennée
Peter Maydell writes: > On Thu, 14 Mar 2024 at 12:11, Alex Bennée wrote: >> >> Marcin Juszkiewicz writes: >> >> > sbsa-ref is supposed to emulate real hardware so virtio-rng-pci >> > does not fit here >> >> What is real anyway ;-) >> >> VirtIO devices exist in real life and I would argue for PC

Re: [PATCH v2] gitlab: aggressively avoid extra GIT data

2024-03-14 Thread Manos Pitsidianakis
On Tue, 12 Mar 2024 at 19:09, Alex Bennée wrote: > > This avoids fetching blobs and tree references for branches we are not > going to worry about. Also skip tag references which are similarly not > useful and keep the default --prune. This keeps the .git data to > around 100M rather than the ~400

Re: [PATCH v2] block: Use LVM tools for LV block device truncation

2024-03-14 Thread Daniel P . Berrangé
On Wed, Mar 13, 2024 at 11:43:27AM +0100, Alexander Ivanov wrote: > If a block device is an LVM logical volume we can resize it using > standard LVM tools. > > Add a helper to detect if a device is a DM device. In raw_co_truncate() > check if the block device is DM and resize it executing lvresize

Re: [PATCH v4] linux-aio: add IO_CMD_FDSYNC command support

2024-03-14 Thread Stefan Hajnoczi
On Thu, Mar 14, 2024 at 04:46:28PM +0530, Prasad Pandit wrote: > From: Prasad Pandit > > Libaio defines IO_CMD_FDSYNC command to sync all outstanding > asynchronous I/O operations, by flushing out file data to the > disk storage. > > Enable linux-aio to submit such aio request. This helps to > r

Re: [PATCH] file-posix: rearrange BDRVRawState fields

2024-03-14 Thread Stefan Hajnoczi
On Thu, Mar 14, 2024 at 04:47:41PM +0530, Prasad Pandit wrote: > From: Prasad Pandit > > Rearrange BRDVRawState structure fields to avoid memory > fragments in its object's memory and save some(~8) bytes > per object. > > Signed-off-by: Prasad Pandit > --- > block/file-posix.c | 39 +++

Re: [PATCH v4 16/23] qapi/schema: Don't initialize "members" with `None`

2024-03-14 Thread Markus Armbruster
John Snow writes: > Declare, but don't initialize the "members" field with type > List[QAPISchemaObjectTypeMember]. > > This simplifies the typing from what would otherwise be > Optional[List[T]] to merely List[T]. This removes the need to add > assertions to several callsites that this value is

Re: [PATCH for-9.0 v14 4/8] target/riscv/vector_helpers: do early exit when vstart >= vl

2024-03-14 Thread Max Chou
According v spec section 7.9. Vector Load/Store Whole Register Instructions "The instructions operate with an effective vector length, evl=NFIELDS*VLEN/EEW, regardless of current settings in vtype and vl. The usual property that no elements are written if vstart ≥ vl does not apply to these in

Re: [PATCH for-9.0 v14 4/8] target/riscv/vector_helpers: do early exit when vstart >= vl

2024-03-14 Thread Daniel Henrique Barboza
On 3/14/24 10:14, Max Chou wrote: According v spec section 7.9. Vector Load/Store Whole Register Instructions "The instructions operate with an effective vector length, evl=NFIELDS*VLEN/EEW, regardless of current settings in vtype and vl. The usual property that no elements are written if v

Re: [PATCH v4 05/23] qapi: create QAPISchemaDefinition

2024-03-14 Thread John Snow
On Thu, Mar 14, 2024, 5:12 AM Markus Armbruster wrote: > John Snow writes: > > > Include entities don't have names, but we generally expect "entities" to > > have names. Reclassify all entities with names as *definitions*, leaving > > the nameless include entities as QAPISchemaEntity instances.

Re: [PATCH v4 16/23] qapi/schema: Don't initialize "members" with `None`

2024-03-14 Thread John Snow
On Thu, Mar 14, 2024, 9:01 AM Markus Armbruster wrote: > John Snow writes: > > > Declare, but don't initialize the "members" field with type > > List[QAPISchemaObjectTypeMember]. > > > > This simplifies the typing from what would otherwise be > > Optional[List[T]] to merely List[T]. This removes

Re: [PATCH for-9.0 v14 4/8] target/riscv/vector_helpers: do early exit when vstart >= vl

2024-03-14 Thread Daniel Henrique Barboza
On 3/14/24 10:27, Daniel Henrique Barboza wrote: On 3/14/24 10:14, Max Chou wrote: According v spec section 7.9. Vector Load/Store Whole Register Instructions "The instructions operate with an effective vector length, evl=NFIELDS*VLEN/EEW, regardless of current settings in vtype and vl. T

Re: [PATCH v4 4/5] qapi: blockdev-backup: add discard-source parameter

2024-03-14 Thread Vladimir Sementsov-Ogievskiy
On 13.03.24 19:08, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add a parameter that enables discard-after-copy. That is mostly useful in "push backup with fleecing" scheme, when source is snapshot-access format driver node, based on copy-before-write filter snapshot-access AP

Re: [PATCH v4 16/23] qapi/schema: Don't initialize "members" with `None`

2024-03-14 Thread Markus Armbruster
John Snow writes: > On Thu, Mar 14, 2024, 9:01 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Declare, but don't initialize the "members" field with type >> > List[QAPISchemaObjectTypeMember]. >> > >> > This simplifies the typing from what would otherwise be >> > Optional[List[T]] t

Re: [PATCH v4 16/23] qapi/schema: Don't initialize "members" with `None`

2024-03-14 Thread John Snow
On Thu, Mar 14, 2024, 9:58 AM Markus Armbruster wrote: > John Snow writes: > > > On Thu, Mar 14, 2024, 9:01 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > Declare, but don't initialize the "members" field with type > >> > List[QAPISchemaObjectTypeMember]. > >> > > >> > Th

Re: [PATCH v4 05/23] qapi: create QAPISchemaDefinition

2024-03-14 Thread Markus Armbruster
John Snow writes: > On Thu, Mar 14, 2024, 5:12 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Include entities don't have names, but we generally expect "entities" to >> > have names. Reclassify all entities with names as *definitions*, leaving >> > the nameless include entities as

Re: [PATCH v4 05/23] qapi: create QAPISchemaDefinition

2024-03-14 Thread John Snow
On Thu, Mar 14, 2024, 10:04 AM Markus Armbruster wrote: > John Snow writes: > > > On Thu, Mar 14, 2024, 5:12 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > Include entities don't have names, but we generally expect "entities" > to > >> > have names. Reclassify all entitie

Re: [PATCH v2 3/4] tests/avocado: use OpenBSD 7.4 for sbsa-ref

2024-03-14 Thread Marcin Juszkiewicz
W dniu 14.03.2024 o 13:14, Alex Bennée pisze: +# OpenBSD 7.4 does not boot on current max cpu. +# +# def test_sbsaref_openbsd_max_pauth_off(self): +# """ +# :avocado: tags=cpu:max +# :avocado: tags=os:openbsd +# """ +# self.boot_openbsd("max,pauth=off") If we are

Re: [PATCH for-9.0] mirror: Don't call job_pause_point() under graph lock

2024-03-14 Thread Stefan Hajnoczi
On Wed, Mar 13, 2024 at 04:30:00PM +0100, Kevin Wolf wrote: > Calling job_pause_point() while holding the graph reader lock > potentially results in a deadlock: bdrv_graph_wrlock() first drains > everything, including the mirror job, which pauses it. The job is only > unpaused at the end of the dra

Re: [PATCH v2 3/4] tests/avocado: use OpenBSD 7.4 for sbsa-ref

2024-03-14 Thread Philippe Mathieu-Daudé
On 14/3/24 13:14, Alex Bennée wrote: Marcin Juszkiewicz writes: 7.4 was released in October 2023, time to update before 7.3 gets dropped. Disabled tests for 'max' cpu as OpenBSD fails there. Signed-off-by: Marcin Juszkiewicz --- tests/avocado/machine_aarch64_sbsaref.py | 47 ++

Re: [PATCH v4 00/23] qapi: statically type schema.py

2024-03-14 Thread Markus Armbruster
John Snow writes: > This is *v4*, for some definitions of "version" and "four". Series Reviewed-by: Markus Armbruster I'll replace PATCH 12, not because it's wrong, just because I like my replacement better. I'll post this and two follow-up patches as v5. I will not let the two follow-up patc

Re: [PATCH v4 00/23] qapi: statically type schema.py

2024-03-14 Thread John Snow
On Thu, Mar 14, 2024, 10:43 AM Markus Armbruster wrote: > John Snow writes: > > > This is *v4*, for some definitions of "version" and "four". > > Series > Reviewed-by: Markus Armbruster > > I'll replace PATCH 12, not because it's wrong, just because I like my > replacement better. I'll post th

Re: [PATCH v2 1/6] virtio/virtio-pci: Handle extra notification data

2024-03-14 Thread Eugenio Perez Martin
On Thu, Mar 14, 2024 at 1:16 PM Jonah Palmer wrote: > > > > On 3/13/24 11:01 PM, Jason Wang wrote: > > On Wed, Mar 13, 2024 at 7:55 PM Jonah Palmer > > wrote: > >> > >> Add support to virtio-pci devices for handling the extra data sent > >> from the driver to the device when the VIRTIO_F_NOTIFIC

Re: [PATCH v2 3/4] tests/avocado: use OpenBSD 7.4 for sbsa-ref

2024-03-14 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 14/3/24 13:14, Alex Bennée wrote: >> Marcin Juszkiewicz writes: >> >>> 7.4 was released in October 2023, time to update before 7.3 gets dropped. >>> >>> Disabled tests for 'max' cpu as OpenBSD fails there. >>> >>> Signed-off-by: Marcin Juszkiewicz >>> --- >>

Re: [RFC PATCH 4/5] cxl/core: add report option for cxl_mem_get_poison()

2024-03-14 Thread Shiyang Ruan via
在 2024/2/10 14:49, Dan Williams 写道: Shiyang Ruan wrote: When a poison event is received, driver uses GET_POISON_LIST command to get the poison list. Now driver has cxl_mem_get_poison(), so reuse it and add a parameter 'bool report', report poison record to MCE if set true. If the memory er

Re: [PATCH v2 2/2] migration/multifd: Ensure we're not given a socket for file migration

2024-03-14 Thread Peter Xu
On Wed, Mar 13, 2024 at 06:28:24PM -0300, Fabiano Rosas wrote: > When doing migration using the fd: URI, the incoming migration starts > before the user has passed the file descriptor to QEMU. This means > that the checks at migration_channels_and_transport_compatible() > happen too soon and we nee

Re: Intention to work on GSoC project

2024-03-14 Thread Eugenio Perez Martin
On Fri, Mar 1, 2024 at 7:29 PM Sahil wrote: > > Hi, > > On Friday, March 1, 2024 1:10:49 PM IST you wrote: > > [...] > > You can add the recently published > > "virtio-live-migration-technical-deep-dive" :) [1]. > > > > [1] > > https://developers.redhat.com/articles/2024/02/21/virtio-live-migratio

Re: [PATCH v2 1/2] migration: Fix iocs leaks during file and fd migration

2024-03-14 Thread Peter Xu
On Wed, Mar 13, 2024 at 06:28:23PM -0300, Fabiano Rosas wrote: > The memory for the io channels is being leaked in three different ways > during file migration: > > 1) if the offset check fails we never drop the ioc reference; > > 2) we allocate an extra channel for no reason; > > 3) if multifd

Re: [PATCH v2 0/2] migration mapped-ram fixes

2024-03-14 Thread Peter Xu
On Wed, Mar 13, 2024 at 06:28:22PM -0300, Fabiano Rosas wrote: > Hi, > > In this v2: > > patch 1 - The fix for the ioc leaks, now including the main channel > > patch 2 - A fix for an fd: migration case I thought I had written code > for, but obviously didn't. Maybe I found one more i

[PATCH v4 07/21] smbios: avoid mangling user provided tables

2024-03-14 Thread Igor Mammedov
currently smbios_entry_add() preserves internally '-smbios type=' options but tables provided with '-smbios file=' are stored directly into blob that eventually will be exposed to VM. And then later QEMU adds default/'-smbios type' entries on top into the same blob. It makes impossible to generate

[PATCH v4 00/21] Workaround Windows failing to find 64bit SMBIOS entry point with SeaBIOS

2024-03-14 Thread Igor Mammedov
Changelog: v4: * rebase on top of current master due to conflict with new SMBIOS table 9 commits * add extra patch with comments about obscure legacy entries counting v3: * whitespace missed by checkpatch * fix idndent in QAPI * reorder 17/20 before 1st 'auto' can be used *

[PATCH v4 13/21] smbios: get rid of global smbios_ep_type

2024-03-14 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Acked-by: Daniel Henrique Barboza Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- hw/i386/fw_cfg.h | 3 ++- include/hw/firmware/smbios.h | 5 +++-- hw/arm/virt.c| 4 ++-- hw/i386/fw_cfg.c | 8 hw/i386/pc.c

[PATCH v4 11/21] smbios: build legacy mode code only for 'pc' machine

2024-03-14 Thread Igor Mammedov
basically moving code around without functional change. And exposing some symbols so that they could be shared between smbbios.c and new smbios_legacy.c plus some meson magic to build smbios_legacy.c only for 'pc' machine and otherwise replace it with stub if not selected. Signed-off-by: Igor Mam

[PATCH v4 09/21] smbios: add smbios_add_usr_blob_size() helper

2024-03-14 Thread Igor Mammedov
it will be used by follow up patch when legacy handling is moved out into a separate file. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha --- hw/smbios/smbios.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c i

[PATCH v4 02/21] tests: smbios: add test for -smbios type=11 option

2024-03-14 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- tests/data/smbios/type11_blob | Bin 0 -> 11 bytes tests/qtest/bios-tables-test.c | 17 + 2 files changed, 17 insertions(+) create mode 100644 tests/data/smbios/type11_blob diff --git a/tests/data

[PATCH v4 15/21] smbios: extend smbios-entry-point-type with 'auto' value

2024-03-14 Thread Igor Mammedov
later patches will use it to pick SMBIOS version at runtime depending on configuration. Signed-off-by: Igor Mammedov Acked-by: Markus Armbruster Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- v3: - make sure i2nd line of comment is indented on 4 spaces only --- qapi/machine.json | 5 ++

[PATCH v4 14/21] smbios: clear smbios_type4_count before building tables

2024-03-14 Thread Igor Mammedov
it will help to keep type 4 tables accounting correct in case SMBIOS tables are built multiple times. Signed-off-by: Igor Mammedov Tested-by: Fiona Ebner --- hw/smbios/smbios.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 7fefe98c85..9aad8f2d

[PATCH v4 18/21] tests: acpi/smbios: whitelist expected blobs

2024-03-14 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Acked-by: Ani Sinha --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..81148a604f 100644 --- a/tests/qtest/bi

[PATCH v4 05/21] smbios: get rid of smbios_smp_sockets global

2024-03-14 Thread Igor Mammedov
it makes smbios_validate_table() independent from smbios_smp_sockets global, which in turn lets smbios_get_tables() avoid using not related legacy code. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner --- goal here is to isolate legacy handling from generic smbios_get

[PATCH v4 16/21] smbios: in case of entry point is 'auto' try to build v2 tables 1st

2024-03-14 Thread Igor Mammedov
QEMU for some time now uses SMBIOS 3.0 for PC/Q35 machines by default, however Windows has a bug in locating SMBIOS 3.0 entrypoint and fails to find tables when booted on SeaBIOS (on UEFI SMBIOS 3.0 tables work fine since firmware hands over tables in another way) Missing SMBIOS tables may lead to

[PATCH v4 21/21] smbios: add extra comments to smbios_get_table_legacy()

2024-03-14 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/smbios/smbios_legacy.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/smbios/smbios_legacy.c b/hw/smbios/smbios_legacy.c index 06907cd16c..c37a8ee821 100644 --- a/hw/smbios/smbios_legacy.c +++ b/hw/smbios/smbios_legacy.c @@ -151,6 +151,9 @@ uint8

[PATCH v4 12/21] smbios: handle errors consistently

2024-03-14 Thread Igor Mammedov
Current code uses mix of error_report()+exit(1) and error_setg() to handle errors. Use newer error_setg() everywhere, beside consistency it will allow to detect error condition without killing QEMU and attempt switch-over to SMBIOS3.x tables/entrypoint in follow up patch. while at it, clear smbios

Re: [RFC PATCH 3/5] cxl/core: introduce cxl_mem_report_poison()

2024-03-14 Thread Shiyang Ruan via
在 2024/2/10 14:46, Dan Williams 写道: Shiyang Ruan wrote: If poison is detected(reported from cxl memdev), OS should be notified to handle it. Introduce this function: 1. translate DPA to HPA; 2. construct a MCE instance; (TODO: more details need to be filled) 3. log it into MCE event

[PATCH v4 20/21] tests: acpi: update expected SSDT.dimmpxm blob

2024-03-14 Thread Igor Mammedov
address shift is caused by switch to 32-bit SMBIOS entry point which has slightly different size from 64-bit one and happens to trigger a bit different memory layout. Expected diff: -Name (MEMA, 0x07FFE000) +Name (MEMA, 0x07FFF000) Signed-off-by: Igor Mammedov Acked-by: Ani Sinha ---

[PATCH v4 06/21] smbios: get rid of smbios_legacy global

2024-03-14 Thread Igor Mammedov
clean up smbios_set_defaults() which is reused by legacy and non legacy machines from being aware of 'legacy' notion and need to turn it off. And push legacy handling up to PC machine code where it's relevant. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Acked-by: Daniel Henrique Barboza

[PATCH v4 08/21] smbios: don't check type4 structures in legacy mode

2024-03-14 Thread Igor Mammedov
legacy mode doesn't support structures of type 2 and more, and CLI has a check for '-smbios type' option, however it's still possible to sneak in type4 as a blob with '-smbios file' option. However doing the later makes SMBIOS tables broken since SeaBIOS doesn't expect that. Rather than trying to

[PATCH v4 10/21] smbios: rename/expose structures/bitmaps used by both legacy and modern code

2024-03-14 Thread Igor Mammedov
As a preparation to move legacy handling into a separate file, add prefix 'smbios_' to type0/type1/have_binfile_bitmap/have_fields_bitmap and expose them in smbios.h so that they can be reused in legacy and modern code. Doing it as a separate patch to avoid rename cluttering follow-up patch which

[PATCH v4 01/21] tests: smbios: make it possible to write SMBIOS only test

2024-03-14 Thread Igor Mammedov
Cureently it not possible to run SMBIOS test without ACPI one, which gets into the way when testing ACPI-less configs. Extract SMBIOS testing into separate routines that could also be run without ACPI dependency and use that for testing SMBIOS. As the 1st user add "acpi/piix4/smbios-options" test

[PATCH v4 04/21] smbios: cleanup smbios_get_tables() from legacy handling

2024-03-14 Thread Igor Mammedov
smbios_get_tables() bails out right away if leagacy mode is enabled and won't generate any SMBIOS tables. At the same time x86 specific fw_cfg_build_smbios() will genarate legacy tables and then proceed to preparing temporary mem_array for useless call to smbios_get_tables() and then discard it. D

[PATCH v4 17/21] smbios: error out when building type 4 table is not possible

2024-03-14 Thread Igor Mammedov
If SMBIOS v2 version is requested but number of cores/threads are more than it's possible to describe with v2, error out instead of silently ignoring the fact and filling core/thread count with bogus values. This will help caller to decide if it should fallback to SMBIOSv3 when smbios-entry-point-

[PATCH v4 03/21] tests: smbios: add test for legacy mode CLI options

2024-03-14 Thread Igor Mammedov
Unfortunately having 2.0 machine type deprecated is not enough to get rid of legacy SMBIOS handling since 'isapc' also uses that and it's staying around. Hence add test for CLI options handling to be sure that it ain't broken during SMBIOS code refactoring. Signed-off-by: Igor Mammedov Reviewed-

[PATCH v4 19/21] pc/q35: set SMBIOS entry point type to 'auto' by default

2024-03-14 Thread Igor Mammedov
Use smbios-entry-point-type='auto' for newer machine types as a workaround for Windows not detecting SMBIOS tables. Which makes QEMU pick SMBIOS tables based on configuration (with 2.x preferred and fallback to 3.x if the former isn't compatible with configuration) Default compat setting of smbios

Re: [PATCH v3 1/2] vhost: dirty log should be per backend type

2024-03-14 Thread Eugenio Perez Martin
On Thu, Mar 14, 2024 at 9:38 AM Si-Wei Liu wrote: > > There could be a mix of both vhost-user and vhost-kernel clients > in the same QEMU process, where separate vhost loggers for the > specific vhost type have to be used. Make the vhost logger per > backend type, and have them properly reference

Re: [PATCH v4 00/21] Workaround Windows failing to find 64bit SMBIOS entry point with SeaBIOS

2024-03-14 Thread Michael S. Tsirkin
On Thu, Mar 14, 2024 at 04:22:41PM +0100, Igor Mammedov wrote: > Changelog: > v4: >* rebase on top of current master due to conflict with > new SMBIOS table 9 commits >* add extra patch with comments about obscure legacy entries counting Thanks a lot for the quick turnaround Igor!

Re: [PATCH v3 2/2] vhost: Perform memory section dirty scans once per iteration

2024-03-14 Thread Eugenio Perez Martin
On Thu, Mar 14, 2024 at 9:38 AM Si-Wei Liu wrote: > > On setups with one or more virtio-net devices with vhost on, > dirty tracking iteration increases cost the bigger the number > amount of queues are set up e.g. on idle guests migration the > following is observed with virtio-net with vhost=on:

Re: [PATCH v2 2/2] migration/multifd: Ensure we're not given a socket for file migration

2024-03-14 Thread Peter Xu
On Thu, Mar 14, 2024 at 11:10:12AM -0400, Peter Xu wrote: > On Wed, Mar 13, 2024 at 06:28:24PM -0300, Fabiano Rosas wrote: > > When doing migration using the fd: URI, the incoming migration starts > > before the user has passed the file descriptor to QEMU. This means > > that the checks at migratio

Re: [PATCH v2 3/4] tests/avocado: use OpenBSD 7.4 for sbsa-ref

2024-03-14 Thread Marcin Juszkiewicz
W dniu 14.03.2024 o 15:56, Alex Bennée pisze: If we are not going to delete the entries then at least use a @skip instead of commenting. Maybe: @skip("Potential un-diagnosed upstream bug?") Daniel or Peter suggested to open a GitLab issue and use @skip("https://gitlab.com/qemu-project/

question on s390x topology: KVM only, or also TCG?

2024-03-14 Thread Claudio Fontana
Hello Pierre, Ilya, I have a question on the s390x "topology" feature and examples. Mainly, is this feature supposed to be KVM accelerator-only, or also available when using the TCG accelerator? (docs/devel/s390-cpu-topology.rst vs https://www.qemu.org/docs/master/system/s390x/cpu-topology.htm

Re: question on s390x topology: KVM only, or also TCG?

2024-03-14 Thread Thomas Huth
On 14/03/2024 16.49, Claudio Fontana wrote: Hello Pierre, Ilya, I have a question on the s390x "topology" feature and examples. Mainly, is this feature supposed to be KVM accelerator-only, or also available when using the TCG accelerator? Hi Claudio! Pierre left IBM, please CC: Nina with r

Re: [PATCH v2 1/6] virtio/virtio-pci: Handle extra notification data

2024-03-14 Thread Jonah Palmer
On 3/14/24 10:55 AM, Eugenio Perez Martin wrote: On Thu, Mar 14, 2024 at 1:16 PM Jonah Palmer wrote: On 3/13/24 11:01 PM, Jason Wang wrote: On Wed, Mar 13, 2024 at 7:55 PM Jonah Palmer wrote: Add support to virtio-pci devices for handling the extra data sent from the driver to the dev

Re: [PATCH V4 1/1] target/loongarch: Fixed tlb huge page loading issue

2024-03-14 Thread Richard Henderson
On 3/13/24 15:33, Xianglai Li wrote: +if (unlikely((level == 0) || (level > 4))) { +return base; +} + +if (FIELD_EX64(base, TLBENTRY, HUGE)) { +if (FIELD_EX64(base, TLBENTRY, LEVEL)) { +return base; +} else { +return FIELD_DP64(base, TL

  1   2   >