Re: [PATCH 29/42] qapi: Add "Details:" disambiguation marker

2025-02-18 Thread John Snow
On Wed, Feb 12, 2025 at 4:37 AM Markus Armbruster wrote: > John Snow writes: > > > This clarifies sections that are mistaken by the parser as "intro" > > sections to be "details" sections instead. > > Impact on output? See notes inline. > It's very possible that there is none; in cases where t

Re: [PATCH] hw/timer/hpet: Detect invalid access to TN registers

2025-02-18 Thread Zhao Liu
On Tue, Feb 18, 2025 at 10:07:18AM +0100, Philippe Mathieu-Daudé wrote: > Date: Tue, 18 Feb 2025 10:07:18 +0100 > From: Philippe Mathieu-Daudé > Subject: Re: [PATCH] hw/timer/hpet: Detect invalid access to TN registers > > On 18/2/25 09:53, Paolo Bonzini wrote: > > On 2/18/25 08:37, Zhao Liu wrot

Re: [PATCH 29/42] qapi: Add "Details:" disambiguation marker

2025-02-18 Thread John Snow
On Mon, Feb 17, 2025 at 5:51 AM Markus Armbruster wrote: > John Snow writes: > > > This clarifies sections that are mistaken by the parser as "intro" > > sections to be "details" sections instead. > > > > Signed-off-by: John Snow > > Is this missing announce-self in net.json? > > diff --git a/q

Re: [PATCH v4 0/3] Enable clang build on Windows

2025-02-18 Thread Pierrick Bouvier
On 2/18/25 22:39, Stefan Weil wrote: Am 19.02.25 um 00:17 schrieb Pierrick Bouvier: On 2/18/25 12:59, Stefan Weil wrote: I could run a QEMU cross compile on Debian with the llvm toolchain and msys2 clangarm64 packages installed with pacman. The resulting installer is here: Have you install

[PATCH] target/loongarch: Correct maximum physical address in KVM mode

2025-02-18 Thread Bibo Mao
On 3A5000 system, the physical address space width for host is 48, however 47 bit for KVM VM. For KVM VM, size of physical address space is the same with that of virtual user space address. Here modify physical address space width with 47 bit in KVM mode. Signed-off-by: Bibo Mao --- target/loon

[PATCH v4 09/24] hw/uefi: add var-service-policy.c

2025-02-18 Thread Gerd Hoffmann
Implement variable policies (Edk2VariablePolicyProtocol). This EFI protocol allows to define restrictions for variables. It also allows to lock down variables (disallow write access). Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-policy.c | 370 +++ 1 file

[PATCH v4 08/24] hw/uefi: add var-service-auth.c

2025-02-18 Thread Gerd Hoffmann
This implements authenticated variable handling (see AuthVariableLib in edk2). The by far most common use case for auth variables is secure boot. The secure boot certificate databases ('PK', 'KEK', 'db' and 'dbx') are authenticated variables, with update rules being specified in the UEFI specific

[PATCH v4 23/24] hw/uefi: add MAINTAINERS entry

2025-02-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3848d37a38d2..56a3ca1afd0c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2801,6 +2801,12 @@ F: hw/misc/ivshmem-flat.c F: include/hw/misc/ivshmem-flat.h F: docs

[PATCH v4 10/24] hw/uefi: add var-service-core.c

2025-02-18 Thread Gerd Hoffmann
This is the core code for guest <-> host communication. This accepts request messages from the guest, dispatches them to the service called, and sends back the response message. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-core.c | 321 + 1 file chang

[PATCH v4 17/24] hw/uefi: add to meson

2025-02-18 Thread Gerd Hoffmann
Wire up uefi-vars in the build system. Signed-off-by: Gerd Hoffmann --- hw/meson.build | 1 + hw/uefi/meson.build | 19 +++ meson.build | 1 + 3 files changed, 21 insertions(+) diff --git a/hw/meson.build b/hw/meson.build index b827c82c5d7b..138f5d59e178 100644 --

[PATCH v4 12/24] hw/uefi: add var-service-pkcs7-stub.c

2025-02-18 Thread Gerd Hoffmann
pkcs7 stub which is used in case gnutls is not available. It throws EFI_WRITE_PROTECTED errors unconditionally, so all authenticated variables are readonly for the guest. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-pkcs7-stub.c | 16 1 file changed, 16 insertions(+) c

[PATCH v4 00/24] hw/uefi: add uefi variable service

2025-02-18 Thread Gerd Hoffmann
This patch adds a virtual device to qemu which the uefi firmware can use to store variables. This moves the UEFI variable management from privileged guest code (managing vars in pflash) to the host. Main advantage is that the need to have privilege separation in the guest goes away. On x86 privi

[PATCH v4 04/24] hw/uefi: add include/hw/uefi/var-service.h

2025-02-18 Thread Gerd Hoffmann
Add state structs and function declarations for the uefi-vars device. Signed-off-by: Gerd Hoffmann --- include/hw/uefi/var-service.h | 191 ++ 1 file changed, 191 insertions(+) create mode 100644 include/hw/uefi/var-service.h diff --git a/include/hw/uefi/var-ser

[PATCH v4 06/24] hw/uefi: add var-service-utils.c

2025-02-18 Thread Gerd Hoffmann
Add utility functions. Helpers for UEFI (ucs2) string handling. Helpers for readable trace messages. Compare UEFI time stamps. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-utils.c | 241 1 file changed, 241 insertions(+) create mode 100644 hw/uefi/

[PATCH v4 20/24] hw/uefi-vars-sysbus: add x64 variant

2025-02-18 Thread Gerd Hoffmann
The x86 variant of the device is mapped on the fixed address 0xfef1 and uses etc/hardware-info instead of FDT to pass the mapping location to the edk2 firmware. The latter allows to move the device to a different location should that turn out to be necessary in the future. Signed-off-by: Gerd

[PATCH v4 15/24] hw/uefi: add trace-events

2025-02-18 Thread Gerd Hoffmann
Add trace events for debugging and trouble shooting. Signed-off-by: Gerd Hoffmann --- hw/uefi/trace-events | 17 + 1 file changed, 17 insertions(+) create mode 100644 hw/uefi/trace-events diff --git a/hw/uefi/trace-events b/hw/uefi/trace-events new file mode 100644 index 00

[PATCH v4 03/24] hw/uefi: add include/hw/uefi/var-service-edk2.h

2025-02-18 Thread Gerd Hoffmann
A bunch of #defines and structs copied over from edk2, mostly needed to decode and encode the messages in the communication buffer. Signed-off-by: Gerd Hoffmann --- include/hw/uefi/var-service-edk2.h | 227 + 1 file changed, 227 insertions(+) create mode 100644 inclu

[PATCH v4 07/24] hw/uefi: add var-service-vars.c

2025-02-18 Thread Gerd Hoffmann
This is the uefi variable service (EfiSmmVariableProtocol), providing functions for listing, reading and updating variables. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-vars.c | 725 + 1 file changed, 725 insertions(+) create mode 100644 hw/uefi/var-

[PATCH v4 18/24] hw/uefi: add uefi-vars-sysbus device

2025-02-18 Thread Gerd Hoffmann
This adds sysbus bindings for the variable service. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-sysbus.c | 91 hw/uefi/meson.build | 3 +- 2 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 hw/uefi/var-service-sysbus.c di

[PATCH v4 24/24] docs: add uefi variable service documentation

2025-02-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- docs/devel/index-internals.rst | 1 + docs/devel/uefi-vars.rst | 68 ++ hw/uefi/LIMITATIONS.md | 7 3 files changed, 76 insertions(+) create mode 100644 docs/devel/uefi-vars.rst create mode 100644 hw/uefi/LIMI

Re: [PATCH 2/2] [NOT-FOR-MERGE] Add qtest for migration over RDMA

2025-02-18 Thread Zhijian Li (Fujitsu)
On 19/02/2025 06:40, Peter Xu wrote: > On Tue, Feb 18, 2025 at 06:03:48PM -0300, Fabiano Rosas wrote: >> Li Zhijian via writes: >> >>> This qtest requirs there is RXE link in the host. >>> >>> Here is an example to show how to add this RXE link: >>> $ ./new-rdma-link.sh >>> 192.168.22.93 >>> >>>

Re: [PATCH] hw/timer/hpet: Detect invalid access to TN registers

2025-02-18 Thread Zhao Liu
On Tue, Feb 18, 2025 at 09:53:00AM +0100, Paolo Bonzini wrote: > Date: Tue, 18 Feb 2025 09:53:00 +0100 > From: Paolo Bonzini > Subject: Re: [PATCH] hw/timer/hpet: Detect invalid access to TN registers > > On 2/18/25 08:37, Zhao Liu wrote: > > "addr & 0x18" ignores invalid address, so that the tra

Re: [PATCH v2 00/19] intel_iommu: Add ATS support

2025-02-18 Thread CLEMENT MATHIEU--DRIF
Kindly ping Thanks everyone >cmd On 20/01/2025 18:41, CLEMENT MATHIEU--DRIF wrote: > From: Clement Mathieu--Drif > > This patch set belongs to a list of series that add SVM support for VT-d. > > Here we focus on implementing ATS support in the IOMMU and adding a > PCI-level API to be used by v

Re: [PATCH v2 05/11] rust/block: Add empty crate

2025-02-18 Thread Zhao Liu
> diff --git a/rust/block/Cargo.toml b/rust/block/Cargo.toml > new file mode 100644 > index 00..fbc2f2d6ef > --- /dev/null > +++ b/rust/block/Cargo.toml > @@ -0,0 +1,16 @@ > +[package] > +name = "block" > +version = "0.1.0" > +edition = "2021" > +authors = ["Kevin Wolf "] > +license = "GPL-

Re: [PATCH v2 09/11] rust/block: Add read support for block drivers

2025-02-18 Thread Paolo Bonzini
On 2/18/25 19:20, Kevin Wolf wrote: +/// The described blocks are stored in a child node. +Data { +/// Child node in which the data is stored +node: Arc, Having Arc<> here shouldn't be necessary, since the BdrvChild is already reference counted. Since the code is calle

Re: [PATCH v2 3/6] memory-attribute-manager: Introduce MemoryAttributeManager to manage RAMBLock with guest_memfd

2025-02-18 Thread Chenyi Qiang
On 2/19/2025 11:49 AM, Alexey Kardashevskiy wrote: > > > On 19/2/25 12:20, Chenyi Qiang wrote: >> >> >> On 2/18/2025 5:19 PM, Alexey Kardashevskiy wrote: >>> >>> >> >> [..] >> diff --git a/include/system/memory-attribute-manager.h b/include/ system/memory-attribute-manager.h new

Re: [PATCH] physmem: replace assertion with error

2025-02-18 Thread Gupta, Pankaj
On 2/17/2025 1:08 PM, Paolo Bonzini wrote: It is possible to start QEMU with a confidential-guest-support object even in TCG mode. While there is already a check in qemu_machine_creation_done: if (machine->cgs && !machine->cgs->ready) { error_setg(errp, "accelerator does not suppo

Re: [PATCH v4 0/3] Enable clang build on Windows

2025-02-18 Thread Stefan Weil via
Am 19.02.25 um 00:17 schrieb Pierrick Bouvier: On 2/18/25 12:59, Stefan Weil wrote: I could run a QEMU cross compile on Debian with the llvm toolchain and msys2 clangarm64 packages installed with pacman. The resulting installer is here: Have you installed the msys2 clangarm64 packages on a

Trying to boot VM from powershell Windows 11

2025-02-18 Thread Trace Oliver
Hi guys! My name is Trace Oliver and I just downloaded qemu using the 64-bit Stefan Weil link on the qemu.org website but, when I try to do the command "qemu-system-x86_64.exe -boot d -cdrom .\ubuntu-24.04.1-desktop-amd64.iso -m 2048", qemu pops up but, it gives me this error message "Guest has not

Re: [PATCH 29/42] qapi: Add "Details:" disambiguation marker

2025-02-18 Thread John Snow
On Mon, Feb 17, 2025 at 7:13 AM Markus Armbruster wrote: > John Snow writes: > > > This clarifies sections that are mistaken by the parser as "intro" > > sections to be "details" sections instead. > > > > Signed-off-by: John Snow > > This is rather terse. > Mea culpa. I can write more at lengt

Re: [PATCH v4 0/3] Enable clang build on Windows

2025-02-18 Thread Pierrick Bouvier
On 2/18/25 12:59, Stefan Weil wrote: Am 18.02.25 um 17:22 schrieb Pierrick Bouvier: On 2/17/25 20:11, Brian Cain wrote: Is this toolchain available publicly or did you build it yourself?  It would be handy if there were a linux x86_64 hosted cross-toolchain that can target Windows-aarch64.  Or

Re: [PATCH v2 3/6] memory-attribute-manager: Introduce MemoryAttributeManager to manage RAMBLock with guest_memfd

2025-02-18 Thread Chenyi Qiang
On 2/18/2025 5:19 PM, Alexey Kardashevskiy wrote: > > [..] >> diff --git a/include/system/memory-attribute-manager.h b/include/ >> system/memory-attribute-manager.h >> new file mode 100644 >> index 00..72adc0028e >> --- /dev/null >> +++ b/include/system/memory-attribute-manager.h >>

Re: [RFC] migration: Introduce migration throttle event

2025-02-18 Thread Yong Huang
On Wed, Feb 19, 2025 at 4:24 AM Markus Armbruster wrote: > Peter Xu writes: > > > On Tue, Feb 18, 2025 at 10:39:55AM +0800, yong.hu...@smartx.com wrote: > >> From: Hyman Huang > >> > >> When the developer is examining the time distribution of > >> the migration, it is useful to record the migra

Re: [PULL v2 00/14] Mem next patches

2025-02-18 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL v3 00/28] tcg patch queue

2025-02-18 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

[PATCH] hw/elf_ops: Use physical address about kernel entry

2025-02-18 Thread Bibo Mao
With load_elf() API, if input parameter translate_fn is set, loading address is converted to physical address. It should be the same for entry address, since MMU is disabled when system power on, the first instruction of PC should be physical address. Signed-off-by: Bibo Mao --- include/hw/elf_o

Re: [PATCH] aspeed: Remove duplicate typename in AspeedSoCClass

2025-02-18 Thread Andrew Jeffery
On Tue, 2025-02-18 at 08:35 +0100, Cédric Le Goater wrote: > The SoC type name is stored under AspeedSoCClass which is > redundant. Use object_get_typename() instead where needed. > > Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery

Re: [PATCH v2 4/6] memory-attribute-manager: Introduce a callback to notify the shared/private state change

2025-02-18 Thread Chenyi Qiang
On 2/18/2025 5:19 PM, Alexey Kardashevskiy wrote: > > > On 17/2/25 19:18, Chenyi Qiang wrote: >> Introduce a new state_change() callback in MemoryAttributeManagerClass to >> efficiently notify all registered RamDiscardListeners, including VFIO >> listeners about the memory conversion events in

[PATCH] target/arm: Fix signed integer overflow undefined behavior.

2025-02-18 Thread Stephen Longfield
The problem is internal to t32_expandimm_imm, the imm intermediate immediate value. This value is sourced from x, which always comes from the return of a deposit32 call, which returns uint32_t already. It's extracted via: int imm = extract32(x, 0, 8);, so the value will be between 0-255 It is the

Re: [PATCH 2/2] [NOT-FOR-MERGE] Add qtest for migration over RDMA

2025-02-18 Thread Peter Xu
On Tue, Feb 18, 2025 at 06:03:48PM -0300, Fabiano Rosas wrote: > Li Zhijian via writes: > > > This qtest requirs there is RXE link in the host. > > > > Here is an example to show how to add this RXE link: > > $ ./new-rdma-link.sh > > 192.168.22.93 > > > > Signed-off-by: Li Zhijian > > --- > > Th

Re: [PATCH] vdpa: Allow vDPA to work on big-endian machine

2025-02-18 Thread Jason Wang
On Tue, Feb 18, 2025 at 10:03 PM Philippe Mathieu-Daudé wrote: > > Hi Konstantin, > > (Cc'ing more developers) > > On 18/2/25 14:27, Konstantin Shkolnyy wrote: > > On 2/12/2025 14:01, Konstantin Shkolnyy wrote: > >> On 2/12/2025 12:07, Philippe Mathieu-Daudé wrote: > >>> On 12/2/25 18:24, Konstant

[PATCH v2] vhost: Don't set vring call if guest notifier is disabled

2025-02-18 Thread oenhan
From: Huaitong Han The vring call fd is set even when the guest does not use MSIX (e.g., virtio PMD). This results in unnecessary CPU overhead for handling virtio interrupts. The previous patch only optimized the condition when query_queue_notifier was enabled and the vector was unset. However, i

Re: [PATCH 29/42] qapi: Add "Details:" disambiguation marker

2025-02-18 Thread John Snow
On Mon, Feb 17, 2025 at 6:55 AM Markus Armbruster wrote: > John Snow writes: > > > This clarifies sections that are mistaken by the parser as "intro" > > sections to be "details" sections instead. > > > > Signed-off-by: John Snow > > --- > > qapi/machine.json | 2 ++ > > qapi/migration.js

Re: [PATCH v3 0/5] Fix vIOMMU reset order

2025-02-18 Thread Peter Xu
On Tue, Feb 18, 2025 at 07:25:30PM +0100, Eric Auger wrote: > With current reset scheme, DMA capable devices are reset after > the vIOMMU which translate them. This holds for the different > IOMMUs and various DMA capable devices such as virtio devices > and VFIO ones. With virtio devices, spurious

Re: [PATCH v2 3/6] memory-attribute-manager: Introduce MemoryAttributeManager to manage RAMBLock with guest_memfd

2025-02-18 Thread Alexey Kardashevskiy
On 19/2/25 12:20, Chenyi Qiang wrote: On 2/18/2025 5:19 PM, Alexey Kardashevskiy wrote: [..] diff --git a/include/system/memory-attribute-manager.h b/include/ system/memory-attribute-manager.h new file mode 100644 index 00..72adc0028e --- /dev/null +++ b/include/system/memory-

Re: [PATCH v6 2/4] migration: enable multifd and postcopy together

2025-02-18 Thread Prasad Pandit
On Tue, 18 Feb 2025 at 16:47, Juraj Marcin wrote: > > +error_report("%s: unknown channel magic: %u", > > +__func__, channel_magic); > > Here, the number reported in the error will have incorrect endianness on > a non-BE system. I think it would be be

[PATCH v4 02/24] hw/uefi: add include/hw/uefi/var-service-api.h

2025-02-18 Thread Gerd Hoffmann
This file defines the register interface of the uefi-vars device. It's only a handful of registers: magic value, command and status registers, location and size of the communication buffer. Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek --- include/hw/uefi/var-service-api.h | 48 +++

[PATCH v4 01/24] Add support for etc/hardware-info fw_cfg file

2025-02-18 Thread Gerd Hoffmann
edk2 looks for the etc/hardware-info fw_cfg file to discover hardware which can not easily be found in other ways. Entries consist of a header with hardware type and entry size (HARDWARE_INFO_HEADER), followed by the actual hardware description (which is type specific). The file can have multiple

[PATCH v4 05/24] hw/uefi: add var-service-guid.c

2025-02-18 Thread Gerd Hoffmann
Add variables for a bunch of UEFI GUIDs we will need. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-guid.c | 99 ++ 1 file changed, 99 insertions(+) create mode 100644 hw/uefi/var-service-guid.c diff --git a/hw/uefi/var-service-guid.c b/hw/uefi/var-se

[PATCH v4 11/24] hw/uefi: add var-service-pkcs7.c

2025-02-18 Thread Gerd Hoffmann
This implements pkcs7 signature verification using gnutls. Needed to check authenticated variable updates. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-pkcs7.c | 436 1 file changed, 436 insertions(+) create mode 100644 hw/uefi/var-service-pkcs7.c d

[PATCH v4 21/24] hw/uefi-vars-sysbus: allow for arm virt

2025-02-18 Thread Gerd Hoffmann
Allow the device being added to aarch64 virt VMs. Signed-off-by: Gerd Hoffmann --- hw/arm/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 4a5a9666e916..046835836fc5 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -81,6 +81,7 @@ #include "hw/mem

[PATCH v4 13/24] hw/uefi: add var-service-siglist.c

2025-02-18 Thread Gerd Hoffmann
Functions to serialize and de-serialize EFI signature databases. This is needed to merge signature databases (happens in practice when appending dbx updates) and also to extract the certificates for pkcs7 signature verification. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-siglist.c | 2

[PATCH v4 14/24] hw/uefi: add var-service-json.c + qapi for NV vars.

2025-02-18 Thread Gerd Hoffmann
Define qapi schema for the uefi variable store state. Use it and the generated visitor helper functions to store persistent (EFI_VARIABLE_NON_VOLATILE) variables in JSON format on disk. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-json.c | 243 + qapi

[PATCH v4 16/24] hw/uefi: add UEFI_VARS to Kconfig

2025-02-18 Thread Gerd Hoffmann
Add UEFI_VARS config option, enable by default for x86_64 and aarch64. Signed-off-by: Gerd Hoffmann --- hw/Kconfig | 1 + hw/uefi/Kconfig | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 hw/uefi/Kconfig diff --git a/hw/Kconfig b/hw/Kconfig index 1b4e9bb07f7d..c4dfe2e7af7c 1006

[PATCH v4 22/24] hw/uefi-vars-sysbus: allow for pc and q35

2025-02-18 Thread Gerd Hoffmann
Allow the device being added to x86_64 pc and q35 VMs. Signed-off-by: Gerd Hoffmann --- hw/i386/pc_piix.c | 2 ++ hw/i386/pc_q35.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 04d2957adcd7..6c91e2d29298 100644 --- a/hw/i386/pc_piix.c +++ b/h

[PATCH v4 19/24] hw/uefi-vars-sysbus: qemu platform bus support

2025-02-18 Thread Gerd Hoffmann
Add and register function to create an device tree entry when the device is added to the qemu platform bus. Signed-off-by: Gerd Hoffmann --- hw/core/sysbus-fdt.c | 24 hw/uefi/var-service-sysbus.c | 1 + 2 files changed, 25 insertions(+) diff --git a/hw/core/sy

Re: [PATCH v4 0/3] Enable clang build on Windows

2025-02-18 Thread Stefan Weil via
Am 19.02.25 um 08:01 schrieb Pierrick Bouvier: On 2/18/25 22:39, Stefan Weil wrote: Am 19.02.25 um 00:17 schrieb Pierrick Bouvier: On 2/18/25 12:59, Stefan Weil wrote: I could run a QEMU cross compile on Debian with the llvm toolchain and msys2 clangarm64 packages installed with pacman. The

Re: [RFC PATCH] elfload: Fix alignment when unmapping excess reservation

2025-02-18 Thread Michael Tokarev
13.02.2025 17:35, Fabiano Rosas wrote: When complying with the alignment requested in the ELF and unmapping the excess reservation, having align_end not aligned to the guest page causes the unmap to be rejected by the alignment check at target_munmap and later brk adjustments hit an EEXIST. Fix

Re: [PATCH v4 7/9] vhost-user-devive: Add shmem BAR

2025-02-18 Thread Albert Esteve
On Tue, Feb 18, 2025 at 2:29 PM Stefan Hajnoczi wrote: > > On Tue, Feb 18, 2025 at 11:55:33AM +0100, Albert Esteve wrote: > > On Tue, Feb 18, 2025 at 11:41 AM Stefan Hajnoczi > > wrote: > > > > > > On Mon, Feb 17, 2025 at 05:40:10PM +0100, Albert Esteve wrote: > > > > Add a shmem BAR block in th

[PATCH 09/14] tests/functional: Convert the arm replay avocado tests

2025-02-18 Thread Thomas Huth
Put the tests into a separate file now (since in the functional framework, each file is run with one specific qemu-system-* binary). Signed-off-by: Thomas Huth --- tests/avocado/replay_kernel.py | 74 - tests/functional/meson.build| 1 + tests/functional

[PATCH 08/14] tests/functional: Convert the m68k replay avocado tests

2025-02-18 Thread Thomas Huth
Put the tests into a separate file now (since in the functional framework, each file is run with one specific qemu-system-* binary). Signed-off-by: Thomas Huth --- tests/avocado/replay_kernel.py | 29 --- tests/functional/meson.build | 1 + tests/functional/test_m6

[PATCH 07/14] tests/functional: Convert the microblaze replay avocado tests

2025-02-18 Thread Thomas Huth
Put the tests into a separate file now (since in the functional framework, each file is run with one specific qemu-system-* binary). Signed-off-by: Thomas Huth --- tests/avocado/replay_kernel.py | 11 - tests/functional/meson.build | 1 + tests/functional/test_

[PATCH 14/14] tests/functional: Convert the i386 replay avocado test

2025-02-18 Thread Thomas Huth
Since this was the last test in tests/avocado/replay_kernel.py, we can remove that Avocado file now. Signed-off-by: Thomas Huth -# -# This work is licensed under the terms of the GNU GPL, version 2 or -# later. See the COPYING file in the top-level directory. - -import os -import lzma -import sh

[PATCH 11/14] tests/functional: Convert the s390x replay avocado tests

2025-02-18 Thread Thomas Huth
Put the tests into a separate file now (in the functional framework, each file is run with one specific qemu-system-* binary). Signed-off-by: Thomas Huth --- tests/avocado/replay_kernel.py| 15 -- tests/functional/meson.build | 1 + tests/functional/test_s390x_repla

Re: [PATCH 13/15] arm/cpu: Add infra to handle generated ID register definitions

2025-02-18 Thread Eric Auger
Hi Connie, On 2/7/25 12:02 PM, Cornelia Huck wrote: > From: Eric Auger > > The known ID regs are described in a new initialization function > dubbed initialize_cpu_sysreg_properties(). That code will be > automatically generated from linux arch/arm64/tools/sysreg. For the > time being let's just

Re: [PATCH] migration: ram block cpr blockers

2025-02-18 Thread Peter Xu
On Fri, Feb 14, 2025 at 03:12:22PM -0500, Steven Sistare wrote: > On 1/30/2025 12:01 PM, Peter Xu wrote: > > On Wed, Jan 29, 2025 at 01:20:13PM -0500, Steven Sistare wrote: > > > On 1/17/2025 6:57 PM, Peter Xu wrote: > > > > On Fri, Jan 17, 2025 at 02:10:14PM -0500, Steven Sistare wrote: > > > > >

[PATCH 00/14] tests/functional: Convert the replay_kernel tests

2025-02-18 Thread Thomas Huth
Convert the remaining Avocado tests from replay_kernel to the functional framework. It's all pretty straight forward, we just have to use the new ASSET_* framework now and make sure to put all tests related to one CPU target into a separate file, since the functional framework uses one qemu-system-

[PATCH 06/14] tests/functional: Convert the ppc64 replay avocado tests

2025-02-18 Thread Thomas Huth
Put the tests into a separate file now (since in the functional framework, each file is run with one specific qemu-system-* binary). Signed-off-by: Thomas Huth --- tests/avocado/replay_kernel.py| 45 tests/functional/meson.build | 1 + tests/functional/

[PATCH 05/14] tests/functional: Convert the or1k replay avocado tests

2025-02-18 Thread Thomas Huth
Put the tests into a separate file now (since in the functional framework, each file is run with one specific qemu-system-* binary). Signed-off-by: Thomas Huth --- tests/avocado/replay_kernel.py | 11 --- tests/functional/meson.build | 1 + tests/functional/test_or1k_repla

[PATCH 04/14] tests/functional: Convert the 32-bit ppc replay avocado tests

2025-02-18 Thread Thomas Huth
Put the tests into a separate file now (since in the functional framework, each file is run with one specific qemu-system-* binary). Signed-off-by: Thomas Huth --- tests/avocado/replay_kernel.py | 24 tests/functional/meson.build| 1 + tests/functional/test_ppc

[PATCH 02/14] tests/functional: Convert the xtensa replay test to the functional framework

2025-02-18 Thread Thomas Huth
Put the tests into a separate file now (since in the functional framework, each file is run with one specific qemu-system-* binary). Signed-off-by: Thomas Huth --- tests/avocado/replay_kernel.py | 11 -- tests/functional/meson.build | 1 + tests/functional/test_xtensa_

Re: [PATCH v4] vfio: Add property documentation

2025-02-18 Thread Cédric Le Goater
On 2/18/25 16:19, Alex Williamson wrote: On Mon, 17 Feb 2025 18:34:55 +0100 Cédric Le Goater wrote: Investigate the git history to uncover when and why the VFIO properties were introduced and update the models. This is mostly targeting vfio-pci device, since vfio-platform, vfio-ap and vfio-ccw

Re: [PATCH 02/15] arm/kvm: add accessors for storing host features into idregs

2025-02-18 Thread Eric Auger
Hi Connie On 2/7/25 12:02 PM, Cornelia Huck wrote: > Signed-off-by: Cornelia Huck > --- > target/arm/cpu-sysregs.h | 3 +++ > target/arm/cpu64.c | 25 + > target/arm/kvm.c | 30 ++ > 3 files changed, 58 insertions(+) > > diff -

[PATCH 7/8] hw/xen/xen-legacy-backend: Remove unused 'net/net.h' header

2025-02-18 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/xen/xen-legacy-backend.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/xen/xen-legacy-backend.h b/include/hw/xen/xen-legacy-backend.h index e198b120c5d..2d0cbfecade 100644 --- a/include/hw/xen/xen-legacy-backend.h +++ b/include

[PATCH 2/7] target/riscv: env->misa_mxl is a constant

2025-02-18 Thread Paolo Bonzini
There is nothing that overwrites env->misa_mxl, so it is a constant. Do not let a corrupted migration stream change the value; changing misa_mxl would have a snowball effect on, for example, the valid VM modes. Signed-off-by: Paolo Bonzini --- target/riscv/machine.c | 13 + 1 file c

[PATCH 4/7] target/riscv: cpu: store max SATP mode as a single integer

2025-02-18 Thread Paolo Bonzini
The maximum available SATP mode implies all the shorter virtual address sizes. Store it in RISCVCPUConfig and avoid recomputing it via satp_mode_max_from_map. Signed-off-by: Paolo Bonzini --- target/riscv/cpu_cfg.h | 1 + target/riscv/cpu.c | 11 +-- target/riscv/tcg/tcg-cpu

[PATCH 5/7] target/riscv: update max_satp_mode based on QOM properties

2025-02-18 Thread Paolo Bonzini
Almost all users of cpu->cfg.satp_mode care only about the "max" value satp_mode_max_from_map(cpu->cfg.satp_mode.map); convert the QOM properties back into it. For TCG, consult valid_vm[] instead of the bitmap of accepted modes. Signed-off-by: Paolo Bonzini --- target/riscv/cpu.h | 1 -

[PATCH 7/7] target/riscv: move satp_mode.{map,init} out of CPUConfig

2025-02-18 Thread Paolo Bonzini
They are used to provide the nice QOM properties for svNN, but the canonical source of the CPU configuration is now cpu->cfg.max_satp_mode. Store them in the ArchCPU struct. Signed-off-by: Paolo Bonzini --- target/riscv/cpu.h | 14 ++ target/riscv/cpu_cfg.h | 14 --

[PATCH 3/7] target/riscv: assert argument to set_satp_mode_max_supported is valid

2025-02-18 Thread Paolo Bonzini
Check that the argument to set_satp_mode_max_supported is valid for the MXL value of the CPU. It would be a bug in the CPU definition if it weren't. In fact, there is such a bug in riscv_bare_cpu_init(): not just SV32 is not a valid VM mode for 64-bit CPUs, SV64 is not a valid VM mode at all, not

[PATCH 6/7] target/riscv: remove supported from RISCVSATPMap

2025-02-18 Thread Paolo Bonzini
"supported" can be computed on the fly based on the max_satp_mode. Signed-off-by: Paolo Bonzini --- target/riscv/cpu_cfg.h | 4 +--- target/riscv/cpu.c | 34 -- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/target/riscv/cpu_cfg.h b/target/r

[PATCH 0/7] target/riscv: store max SATP mode as a single integer in RISCVCPUConfig

2025-02-18 Thread Paolo Bonzini
The maximum available SATP mode implies all the shorter virtual address sizes. Simplify the handling of the satp_mode field in RISCVCPUConfig: - store a single byte in RISCVCPUConfig for the maximum supported size, and adjust it to the maximum requested size based on QOM properties - move satp_

Re: [PULL v1 10/12] hw/xen: pvh-common: Add support for creating PCIe/GPEX

2025-02-18 Thread Edgar E. Iglesias
On Tue, Feb 18, 2025 at 6:02 AM Philippe Mathieu-Daudé wrote: > Hi Edgar, > > On 4/9/24 18:15, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Add support for optionally creating a PCIe/GPEX controller. > > > > Signed-off-by: Edgar E. Iglesias > > Reviewed-by: Stefano Stabellini

[PATCH v3 13/28] target/mips: Use VADDR_PRIx for logging pc_next

2025-02-18 Thread Richard Henderson
DisasContextBase.pc_next has type vaddr; use the correct log format. Fixes: 85c19af63e7 ("include/exec: Use vaddr in DisasContextBase for virtual addresses") Signed-off-by: Richard Henderson --- target/mips/tcg/octeon_translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -

Re: [PATCH v3 2/2] KVM: SEV: Configure "ALLOWED_SEV_FEATURES" VMCB Field

2025-02-18 Thread Sean Christopherson
On Fri, Feb 14, 2025, Kim Phillips wrote: > On 2/13/25 6:55 PM, Sean Christopherson wrote: > > On Thu, Feb 13, 2025, Kim Phillips wrote: > > > > > Not sure if the cpu_feature_enabled() check is necessary, as init > > > > > should > > > > > have failed if SVM_SEV_FEAT_ALLOWED_SEV_FEATURES wasn't se

[PATCH v3 00/28] tcg patch queue

2025-02-18 Thread Richard Henderson
v3: One more try to fix macos issues. r~ The following changes since commit e0209297cddd5e10a07e15fac5cca7aa1a8e0e59: Merge tag 'pull-ufs-20250217' of https://gitlab.com/jeuk20.kim/qemu into staging (2025-02-18 10:58:48 +0800) are available in the Git repository at: https://gitlab.com/

Re: [PATCH 00/42] docs: add sphinx-domain rST generator to qapidoc

2025-02-18 Thread John Snow
"The text handler you add looks just like the existing latex handler. Does LaTeX output lack "little headings", too?" Yes, almost certainly. Can you let me know which output formats we actually "care about"? I'll have to test them all. In the meantime, I upgraded my patch so that the text translat

Re: [PATCH v4 0/3] Enable clang build on Windows

2025-02-18 Thread Pierrick Bouvier
Hi Brian, On 2/17/25 20:11, Brian Cain wrote: On 1/11/2025 4:08 PM, Stefan Weil via wrote: Am 10.01.25 um 21:33 schrieb Pierrick Bouvier: For now, it was only possible to build plugins using GCC on Windows. However, windows-aarch64 only supports Clang. This biggest roadblock was to get rid of

Re: [PATCH V2 02/45] migration: cpr helpers

2025-02-18 Thread Peter Xu
On Fri, Feb 14, 2025 at 03:31:29PM -0500, Steven Sistare wrote: > On 2/14/2025 11:37 AM, Peter Xu wrote: > > On Fri, Feb 14, 2025 at 06:13:44AM -0800, Steve Sistare wrote: > > > Add cpr_needed_for_reuse, cpr_resave_fd helpers, cpr_is_incoming, and > > > cpr_open_fd, for use when adding cpr support

Re: [PATCH 1/8] accel/Kconfig: Link XenPVH with GPEX PCIe bridge

2025-02-18 Thread Edgar E. Iglesias
On Tue, Feb 18, 2025 at 10:26 AM Philippe Mathieu-Daudé wrote: > XenPVH requires the PCIe/GPEX device. Add it to Kconfig > to avoid when configuring using --without-default-devices: > > /usr/bin/ld: libqemu-aarch64-softmmu.a.p/hw_xen_xen-pvh-common.c.o: in > function `xenpvh_gpex_init': > hw/

Re: [PULL v2 11/14] os: add an ability to lock memory on_fault

2025-02-18 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 04:33:51PM -0500, Peter Xu wrote: > On Wed, Feb 12, 2025 at 06:03:30PM +, Daniel P. Berrangé wrote: > > On Wed, Feb 12, 2025 at 12:56:46PM -0500, Peter Xu wrote: > > > On Wed, Feb 12, 2025 at 05:48:46PM +, Daniel P. Berrangé wrote: > > > > On Wed, Feb 12, 2025 at 12:

[PULL v3 00/28] tcg patch queue

2025-02-18 Thread Richard Henderson
v3: One more try to fix macos issues. r~ The following changes since commit e0209297cddd5e10a07e15fac5cca7aa1a8e0e59: Merge tag 'pull-ufs-20250217' of https://gitlab.com/jeuk20.kim/qemu into staging (2025-02-18 10:58:48 +0800) are available in the Git repository at: https://gitlab.com/

[PULL v3 13/28] target/mips: Use VADDR_PRIx for logging pc_next

2025-02-18 Thread Richard Henderson
DisasContextBase.pc_next has type vaddr; use the correct log format. Fixes: 85c19af63e7 ("include/exec: Use vaddr in DisasContextBase for virtual addresses") Signed-off-by: Richard Henderson --- target/mips/tcg/octeon_translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -

Re: [PATCH 04/11] rust/qemu-api: Add wrappers to run futures in QEMU

2025-02-18 Thread Kevin Wolf
Am 12.02.2025 um 14:22 hat Paolo Bonzini geschrieben: > > > Also, would qemu_co_run_future() and qemu_run_future() become methods on > > > an > > > Executor later? Maybe it make sense to have already something like > > > > > > pub trait QemuExecutor { > > > fn run_until(future: F) -> F::Outpu

Re: [PATCH V2] migration: ram block cpr blockers

2025-02-18 Thread Peter Xu
On Fri, Feb 14, 2025 at 04:44:40PM -0500, Steven Sistare wrote: > On 2/14/2025 4:21 PM, David Hildenbrand wrote: > > On 14.02.25 21:12, Steve Sistare wrote: > > > Unlike cpr-reboot mode, cpr-transfer mode cannot save volatile ram blocks > > > in the migration stream file and recreate them later, be

Re: [PATCH] rust: Prefer link_with over link_whole

2025-02-18 Thread Zhao Liu
On Tue, Feb 18, 2025 at 09:58:44AM +0100, Paolo Bonzini wrote: > Date: Tue, 18 Feb 2025 09:58:44 +0100 > From: Paolo Bonzini > Subject: Re: [PATCH] rust: Prefer link_with over link_whole > > On 2/18/25 09:37, Zhao Liu wrote: > > The commit fccb744f41c6 ("gdbstub: Try unlinking the unix socket bef

[PATCH 13/14] tests/functional: Convert the x86_64 replay avocado tests

2025-02-18 Thread Thomas Huth
Put the tests into a separate file now (in the functional framework, each file is run with one specific qemu-system-* binary). Signed-off-by: Thomas Huth https://gitlab.com/qemu-project/qemu/-/issues/2094 -@skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'pc machine is unstable with replay') -

[PATCH 10/14] tests/functional: Convert the alpha replay avocado tests

2025-02-18 Thread Thomas Huth
Put the tests into a separate file now (since in the functional framework, each file is run with one specific qemu-system-* binary). Signed-off-by: Thomas Huth --- tests/avocado/replay_kernel.py| 17 tests/functional/meson.build | 1 + tests/functional/test_alp

Re: [PULL 3/9] meson: Disallow 64-bit on 32-bit Xen emulation

2025-02-18 Thread Philippe Mathieu-Daudé
+Vikram On 18/2/25 15:10, Andrew Cooper wrote: On 18/02/2025 11:20 am, Philippe Mathieu-Daudé wrote: Hi, Adding Xen community. On 8/2/25 21:57, Richard Henderson wrote: Require a 64-bit host binary to spawn a 64-bit guest. Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signe

[PATCH 03/14] tests/functional: Convert the sparc replay avocado test

2025-02-18 Thread Thomas Huth
While we're at it, change the machine from SS-20 to SS-10 to increase the test coverage a little bit (SS-20 is already tested in the test_sparc_sun4m.py file). Signed-off-by: Thomas Huth --- tests/avocado/replay_kernel.py| 12 tests/functional/meson.build | 1 + te

[PATCH 12/14] tests/functional: Convert the aarch64 replay avocado tests

2025-02-18 Thread Thomas Huth
Put the tests into a separate file now (in the functional framework, each file is run with one specific qemu-system-* binary). Signed-off-by: Thomas Huth --- tests/avocado/replay_kernel.py | 18 --- tests/functional/meson.build| 1 + tests/functional/test_aarch6

  1   2   3   >