Re: [RFC PATCH] docs/system/security: Restrict "virtualization use case" to specific machines

2025-09-11 Thread Daniel P . Berrangé
On Mon, Sep 08, 2025 at 01:50:57PM +0100, Peter Maydell wrote: > Currently our security policy defines a "virtualization use case" > where we consider bugs to be security issues, and a > "non-virtualization use case" where we do not make any security > guarantees and don't consider bugs to be secur

Re: swtpm persistent state snapshots by copying .permall file

2025-09-11 Thread Stefan Hajnoczi
On Wed, Sep 10, 2025 at 7:14 PM Stefan Berger wrote: > On 9/10/25 5:08 PM, Stefan Hajnoczi wrote: > > Hi Stefan, > > I am investigating QEMU devices with persistent state like swtpm for a > > specific snapshot use case. The VM is paused while disk images and other > > persistent state files are sn

Re: [PATCH v2 03/18] python: backport 'kick event queue on legacy event_pull()'

2025-09-11 Thread Daniel P . Berrangé
On Wed, Sep 03, 2025 at 01:11:09AM -0400, John Snow wrote: > This corrects an oversight in qmp-shell operation where new events will > not accumulate in the event queue when pressing "enter" with an empty > command buffer, so no new events show up. > > Reported-by: Jag Raman > Signed-off-by: John

Re: [PATCH 16/24] target/arm/hvf: Factor hvf_handle_exception() out

2025-09-11 Thread Mads Ynddal
> On 3 Sep 2025, at 12.06, Philippe Mathieu-Daudé wrote: > > Factor hvf_handle_exception() out of hvf_vcpu_exec(). > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/arm/hvf/hvf.c | 120 +++ > 1 file changed, 64 insertions(+), 56 deletions(-) Good

Re: [PATCH 15/19] treewide: rename qemu_wait_io_event/qemu_wait_io_event_common

2025-09-11 Thread Richard Henderson
On 9/8/25 10:12, Paolo Bonzini wrote: Do so before extending it to the user-mode emulators, where there is no such thing as an "I/O thread". Signed-off-by: Paolo Bonzini --- include/hw/core/cpu.h | 2 +- include/system/cpus.h | 4 ++-- accel/dummy-cpus.c

[PATCH v4 0/2] dump: enhance win_dump_available to report properly

2025-09-11 Thread Nikolai Barybin
Changes since last revision: - Split in 2 patches Nikolai Barybin (2): dump: enhance dump_state_prepare fd initialization dump: enhance win_dump_available to report properly dump/dump.c | 138 dump/win_dump.c | 23 ++-- dump/win_dump.

Re: [PATCH v2 0/8] io: deal with blocking/non-blocking fds

2025-09-11 Thread Vladimir Sementsov-Ogievskiy
On 11.09.25 12:19, Vladimir Sementsov-Ogievskiy wrote: Hi all! The series aims to unify code which sets fds blocking/non-blocking through the whole source. 01: reworked, only drop the for-loop 02: new 03: - improve commit-message, add a lot of motivation REREAD - convert GError to Error in

Re: [PATCH v9 00/11] hw/arm/virt: Add support for user creatable SMMUv3 device

2025-09-11 Thread Donald Dutile
On 8/29/25 4:25 AM, Shameer Kolothum wrote: Hi, Changes from v8: https://lore.kernel.org/qemu-devel/20250711084749.18300-1-shameerali.kolothum.th...@huawei.com/ 1.Dropped previous patch #1 as that one is now already in. 2.Rebased and updated DSDT in patch #11 to make bios table tests happy.

Re: Some iotests are failing with -luks

2025-09-11 Thread Thomas Huth
On 10/09/2025 18.08, Kevin Wolf wrote: Am 10.09.2025 um 17:16 hat Thomas Huth geschrieben: Hi, when running "./check -luks" in the qemu-iotests directory, some tests are failing for me: 295 296 inactive-node-nbd luks-detached-header Is that a known problem already? Not to me anyway. FW

Re: Abuse of warnings for unhandled errors and programming errors

2025-09-11 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Fri, Aug 08, 2025 at 11:30:32AM +0200, Markus Armbruster wrote: >> In "[PATCH 00/12] Error reporting cleanup, a fix, and &error_warn >> removal", I challenged the use of warnings in a few places. I think the >> topic deserves a wider audience than the one a rather

[PATCH v8 0/3] target/arm: Added support for SME register exposure to GDB

2025-09-11 Thread Vacha Bhavsar
The QEMU GDB stub does not expose the ZA storage SME register to GDB via the remote serial protocol, which can be a useful functionality to debug SME code. To provide this functionality in Aarch64 target, this patch registers the SME register set with the GDB stub. To do so, this patch implements t

Re: [PATCH 11/33] rust: remove unused global qemu "allocator"

2025-09-11 Thread Zhao Liu
On Mon, Sep 08, 2025 at 12:49:43PM +0200, Paolo Bonzini wrote: > Date: Mon, 8 Sep 2025 12:49:43 +0200 > From: Paolo Bonzini > Subject: [PATCH 11/33] rust: remove unused global qemu "allocator" > X-Mailer: git-send-email 2.51.0 > > From: Marc-André Lureau > > The global allocator has always bee

[PATCH] tests/qemu-iotests: Mark the 'inactive-node-nbd' as unsupported with -luks

2025-09-11 Thread Thomas Huth
From: Thomas Huth When running "./check -luks inactive-node-nbd", the test currently fails because QEMU terminates immediately. The reason can be seen with the "-p" parameter of the "check" script: qemu-system-x86_64: -blockdev luks,file=disk-file,node-name=disk-fmt,active=off: Parameter 'ke

Re: [PATCH v5 2/5] spdm: add spdm storage transport virtual header

2025-09-11 Thread Jonathan Cameron via
On Tue, 9 Sep 2025 14:32:57 +1000 Wilfred Mallawa wrote: > From: Wilfred Mallawa > > This header contains the transport encoding for an SPDM message that > uses the SPDM over Storage transport as defined by the DMTF DSP0286. > > Signed-off-by: Wilfred Mallawa > --- > include/system/spdm-soc

Re: [PATCH v2 06/18] python: backport 'qmp-shell: add common_parser()'

2025-09-11 Thread Daniel P . Berrangé
On Mon, Sep 08, 2025 at 01:39:58PM -0400, John Snow wrote: > On Mon, Sep 8, 2025 at 12:47 PM Daniel P. Berrangé > wrote: > > > > On Wed, Sep 03, 2025 at 01:11:12AM -0400, John Snow wrote: > > > Signed-off-by: John Snow > > > cherry picked from commit 20a88c2471f37d10520b2409046d59e1d0f1e905 > >

[PATCH 24/33] rust: split "hwcore" crate

2025-09-11 Thread Paolo Bonzini
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Link: https://lore.kernel.org/r/20250827104147.717203-16-marcandre.lur...@redhat.com Signed-off-by: Paolo Bonzini --- MAINTAINERS | 1 + rust/hw/core/wrapper.h| 32 + rust/qemu-

Re: [PATCH v2 02/18] python: backport 'EventListener: add __repr__ method'

2025-09-11 Thread Daniel P . Berrangé
On Wed, Sep 03, 2025 at 01:11:08AM -0400, John Snow wrote: > When the object is not stateful, this repr method prints what you'd > expect. In cases where there are pending events, the output is augmented > to illustrate that. > > The object itself has no idea if it's "active" or not, so it cannot

[PATCH v5 for v10.0.0 0/2] target/riscv:Fix riscv64 kvm migration

2025-09-11 Thread Xie Bo
This series(v5) replaces the earlier single patch "[PATCH v4 for v10.0.0] target/riscv/kvm/kvm-cpu: Fixed the issue of resume after QEMU+KVM migration". Changes since v4: - Split the patch into 2 patches - Fix formatting issues - Vmstate version bump Patch 1 sets the initial value of the vCPU t

Re: Rust high-level pre/post migration callbacks

2025-09-11 Thread Paolo Bonzini
On Wed, Sep 10, 2025 at 9:58 AM Zhao Liu wrote: > > If a pure snapshot is possible, implementing the new trait > > is also simple: > > > > impl_vmstate_struct!(MyDeviceRegisters, ...); > > > > impl ToMigrationState for MyDeviceRegisters { > > type Migrated = Self; > > fn to_migration_state

[RFC PATCH 2/5] target/riscv: Implement core SMMPT lookup logic

2025-09-11 Thread LIU Zhiwei
This patch introduces the core implementation for the Memory Protection Table (MPT) walk, which is the central mechanism of the SMMPT extension. A new file, `riscv_smmpt.c`, is added to encapsulate the MPT logic. It implements the `smmpt_lookup()` function, which performs a multi-level page table-

Re: [PATCH v2 07/18] python: backport 'feat: allow setting read buffer limit'

2025-09-11 Thread Daniel P . Berrangé
On Wed, Sep 03, 2025 at 01:11:13AM -0400, John Snow wrote: > From: Adam Dorsey > > Expose the limit parameter of the underlying StreamReader and StreamWriter > instances. > > This is helpful for the use case of transferring files in and out of a VM > via the QEMU guest agent's guest-file-open, g

[PATCH v3 4/4] target/riscv: Save stimer and vstimer in CPU vmstate

2025-09-11 Thread TANG Tiancheng
vmstate_riscv_cpu was missing env.stimer and env.vstimer. Without migrating these QEMUTimer fields, active S/VS-mode timer events are lost after snapshot or migration. Add VMSTATE_TIMER_PTR() entries to save and restore them. Reviewed-by: LIU Zhiwei Reviewed-by: Daniel Henrique Barboza Signed-o

[PATCH v4 2/2] dump: enhance win_dump_available to report properly

2025-09-11 Thread Nikolai Barybin
QMP query-dump-guest-memory-capability reports win dump as available for any x86 VM, which is false. This patch implements proper query of vmcoreinfo and calculation of guest note size. Based on that we can surely report whether win dump available or not. To perform this I suggest to split dump_i

Re: [PATCH v3 7/9] tests/functional: exec_command_and_wait_for_pattern: add vm arg

2025-09-11 Thread Thomas Huth
On 05/09/2025 15.50, Vladimir Sementsov-Ogievskiy wrote: Allow to specify non default vm for the command. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- tests/functional/qemu_test/cmd.py | 7 +-- 1 file changed, 5 insertions

Re: [PATCH 04/10] util: drop qemu_socket_set_nonblock()

2025-09-11 Thread Vladimir Sementsov-Ogievskiy
On 10.09.25 13:33, Vladimir Sementsov-Ogievskiy wrote: On 10.09.25 12:44, Daniel P. Berrangé wrote: On Wed, Sep 03, 2025 at 12:44:04PM +0300, Vladimir Sementsov-Ogievskiy wrote: Use common qemu_set_blocking() instead. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   contrib/ivshmem-server/iv

Re: [PATCH v7 for v10.0.0 1/2] Set KVM initial privilege mode and mp_state

2025-09-11 Thread Andrew Jones
On Thu, Sep 11, 2025 at 04:36:15PM +0800, Xie Bo wrote: > For KVM mode, the privilege mode should not include M-mode, and the > initial value should be set to S-mode. Additionally, a following patch > adds the implementation of putting the vCPU privilege mode to KVM. > When the vCPU runs for the

[PATCH v4 3/8] net/tap: net_init_tap_one(): drop extra error propagation

2025-09-11 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Tested-by: Lei Yang --- net/tap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/tap.c b/net/tap.c index 2ffd8c9907..49d4a29beb 100644 --- a/net/tap.c +++ b/net/tap.c @@ -686,7 +686,6 @@ static bool net_init_tap_one(const Ne

Re: [PATCH 0/2] i386/kvm: Cleanups in kvm_arch_init()

2025-09-11 Thread Xiaoyao Li
On 7/29/2025 2:20 PM, Xiaoyao Li wrote: Patch 1 removes the object_dynamic_cast() check in kvm_arch_init(); Patch 2 removes the unncessary kvm_check_extension(s, KVM_CAP_X86_SMM); Gentle ping. Xiaoyao Li (2): i386/kvm: Get X86MachineState in kvm_arch_init() without the cast check

Re: [PATCH] i386/tdx: Use .has_gpa field to check if the gpa is valid

2025-09-11 Thread Xiaoyao Li
Gentle ping. On 7/10/2025 10:15 PM, Xiaoyao Li wrote: There is actually the .has_gpa field when translating the QAPI data type GuestPanicInformationTdx to C structure. Stop using the magic number -1 as the indicator for no valid gpa. Instead just use .has_gpa field. Signed-off-by: Xiaoyao Li

Re: [PATCH] x86/loader: Rectify the address of setup_data

2025-09-11 Thread Xiaoyao Li
On 8/14/2025 10:14 PM, Xiaoyao Li wrote: Commit 214191f6b574 ("x86/loader: read complete kernel") changed the semantics of kernel_size from the piggyback kernel to the whole kernel file, which leads to the setup_data_offset contains setup_size and leads to wrong address of setup_data being writte

Re: [PATCH 0/5] qemu-optios: Fix, cleanup and add description of tdx-guest

2025-09-11 Thread Xiaoyao Li
On 7/14/2025 5:19 PM, Xiaoyao Li wrote: Patch 1 is the fix to generated doc html. Patch 2-4 are the cleanup of memory-encryption Patch 5 add description of tdx-guest. Gentle ping. Appreciated if anyone could help cc the folks who are responsible for the qemu-option but I missed to cc. Xi

Re: [PATCH v2 0/3] kvm: guest_memfd enhancement and fix for KVM_SET_USER_MEMORY_REGION2

2025-09-11 Thread Xiaoyao Li
On 7/28/2025 7:57 PM, Xiaoyao Li wrote: Patch 1 changes to check guest memfd CAP on VM instance. Patch 2 is a fix for KVM_SET_USER_MEMORY_REGION2. Patch 3 is an enhancement for guest_memfd_offset. Gentle ping. --- Changes in v2: - Collect R-B tags; - Use {} to zero out the struct instead of

Re: [PATCH v2 0/2] i386/kvm: Enable SMM address space for i386 cpu

2025-09-11 Thread Xiaoyao Li
On 7/30/2025 5:52 PM, Xiaoyao Li wrote: Patch 1 enables the SMM address space i386 cpu under KVM. Patch 2 gives name for each address space index. Gentle ping. --- changes in v2: - collect Reviewed-by and Tested-by; - fix typos and refine changelog; Xiaoyao Li (2): i386/cpu: Enable SMM c

Re: [PATCH] multiboot: Fix the split lock

2025-09-11 Thread Xiaoyao Li
On 8/8/2025 6:54 PM, Philippe Mathieu-Daudé wrote: On 8/8/25 05:50, Xiaoyao Li wrote: While running the kvm-unit-tests on Intel platforms with "split lock disable" feature, every test triggers a kernel warning of    x86/split lock detection: #AC: qemu-system-x86_64/373232 took a split_lock tra

Re: [PATCH] hostmem/shm: Allow shm memory backend serve as shared memory for coco-VMs

2025-09-11 Thread Xiaoyao Li
On 8/14/2025 5:45 PM, Xiaoyao Li wrote: On 7/21/2025 2:52 PM, Xiaoyao Li wrote: shm can surely serve as the shared memory for coco-VMs. But currently it doesn't check the backend->guest_memfd to pass down the RAM_GUEST_MEMFD flag. It leads to failure when creating coco-VMs (e.g., TDX guest) whic

Re: [PATCH v2] i386/cpu: Remove FEAT_24_0_EBX for AVX10

2025-09-11 Thread Xiaoyao Li
Gentle Ping. On 7/7/2025 10:11 PM, Xiaoyao Li wrote: It turns out that all the Intel processors enumerating the support of Intel AVX10 support all vector widths. It's documented in the latest SDM, vol 1, Chapter 16 "programming with Intel AVX10". (Note that AVX10.1 spec stops update since AVX10

[PATCH v2 3/3] migration: Make migration_has_failed() work even for CANCELLING

2025-09-11 Thread Peter Xu
No issue I hit, the change is only from code observation when I am looking at a TLS premature termination issue. We set CANCELLED very late, it means migration_has_failed() may not work correctly if it's invoked before updating CANCELLING to CANCELLED. Allow that state will make migration_has_fai

[PATCH v7 4/5] spdm: define SPDM transport enum types

2025-09-11 Thread Wilfred Mallawa
From: Wilfred Mallawa SPDM maybe used over different transports. This patch specifies the trasnport types as an enum with a qdev property definition such that a user input transport type (string) can be mapped directly into the respective SPDM transportenum for internal use. Signed-off-by: Wilfr

[PATCH v4 06/10] char-stdio: add support for the terminal size

2025-09-11 Thread Filip Hejsek
From: Szymon Lukasz Update the terminal size upon SIGWINCH delivery. Signed-off-by: Szymon Lukasz Signed-off-by: Filip Hejsek --- chardev/char-stdio.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/chardev/char-stdio.c b/chardev/char-stdio.c index 48db8d2

Re: Some iotests are failing with -luks

2025-09-11 Thread Kevin Wolf
Am 10.09.2025 um 18:08 hat Kevin Wolf geschrieben: > Am 10.09.2025 um 17:16 hat Thomas Huth geschrieben: > > luks-detached-header fail [17:15:26] [17:15:38] 12.2s > >failed, exit status 1 > > --- /home/thuth/devel/qemu/tests/qemu-iotests/tests/luks-detached-header.out > >

Re: [PATCH 00/10] io: deal with blocking/non-blocking fds

2025-09-11 Thread Stefan Hajnoczi
On Tue, Sep 09, 2025 at 11:12:25AM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 03.09.25 12:44, Vladimir Sementsov-Ogievskiy wrote: > Marc-André, Stefan could you take a look at my series? Please discuss with Daniel Berrangé and Marc-André. Thanks! Stefan signature.asc Description: PGP signa

Re: [PATCH 14/19] cpus: properly kick CPUs out of inner execution loop

2025-09-11 Thread Richard Henderson
On 9/8/25 10:12, Paolo Bonzini wrote: Now that cpu_exit() actually kicks all accelerators, use it whenever the message to another thread is processed in qemu_wait_io_event(). Signed-off-by: Paolo Bonzini --- cpu-common.c| 3 ++- hw/ppc/ppc.c| 2 ++ hw/ppc/spap

Re: [PATCH v2] tree-wide: replace tabs with sapce and align code This patch updates by replacing the tabs with spaces and fixing alignment issues Signed-off-by: Harshini

2025-09-11 Thread Peter Maydell
On Wed, 10 Sept 2025 at 11:48, Harshini wrote: > > Signed-off-by: Harshini > --- > target/alpha/cpu.h | 6 +- > target/i386/cpu.h| 330 +-- > target/i386/svm.h| 334 +-- > target/microblaze/cpu.h | 20 +- >

[PULL 12/23] tests/functional/arm: Update test ASPEED SDK v09.07 for AST2600

2025-09-11 Thread Thomas Huth
From: Kane-Chen-AS Signed-off-by: Kane-Chen-AS Reviewed-by: Cédric Le Goater Message-ID: <20250904100556.1729604-4-kane_c...@aspeedtech.com> Signed-off-by: Thomas Huth --- tests/functional/arm/test_aspeed_ast2600.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t

[PATCH 02/19] target/sparc: limit cpu_check_irqs to system emulation

2025-09-11 Thread Paolo Bonzini
It is not used by user-mode emulation and is the only caller of cpu_interrupt() in qemu-sparc* binaries. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/sparc/int32_helper.c | 2 ++ target/sparc/int64_helper.c | 2 ++ 2 files changed,

[PULL 23/31] vfio-user/pci.c: rename VFIOUserPCIDevice device field to parent_obj

2025-09-11 Thread Cédric Le Goater
From: Mark Cave-Ayland Now that nothing accesses the device field directly, rename device to parent_obj as per our current coding guidelines. Signed-off-by: Mark Cave-Ayland Reviewed-by: Cédric Le Goater Reviewed-by: John Levon Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.o

Re: [PATCH v3 5/9] net/tap: implement interfaces for local migration

2025-09-11 Thread Peter Xu
On Fri, Sep 05, 2025 at 04:50:35PM +0300, Vladimir Sementsov-Ogievskiy wrote: > +static const VMStateDescription vmstate_tap = { > +.name = "virtio-net-device", > +.post_load = tap_post_load, > +.fields = (const VMStateField[]) { > +VMSTATE_FD(fd, TAPState), > +VMSTATE_B

[PATCH v2 02/14] hw/pci-host/aspeed: Add AST2600 PCIe PHY model

2025-09-11 Thread Jamin Lin via
This patch introduces an initial ASPEED PCIe PHY/host controller model to support the AST2600 SoC. It provides a simple register block with MMIO read/write callbacks, integration into the build system, and trace events for debugging. Key changes: 1. PCIe PHY MMIO read/write callbacks Implement

Re: Some iotests are failing with -luks

2025-09-11 Thread Daniel P . Berrangé
On Wed, Sep 10, 2025 at 08:38:36PM +0200, Kevin Wolf wrote: > Am 10.09.2025 um 18:08 hat Kevin Wolf geschrieben: > > Am 10.09.2025 um 17:16 hat Thomas Huth geschrieben: > > > luks-detached-header fail [17:15:26] [17:15:38] 12.2s > > > failed, exit status 1 > > > --- > > >

[RFC 0/3] Mitigation of migration failures accross different host kernels

2025-09-11 Thread Eric Auger
When migrating ARM guests accross same machines with different host kernels we are likely to encounter failures such as: "failed to load cpu:cpreg_vmstate_array_len" This is due to the fact KVM exposes a different number of registers to qemu on source and destination. When trying to migrate a big

[PATCH 07/33] rust: vmstate: convert to use builder pattern

2025-09-11 Thread Paolo Bonzini
From: Zhao Liu Similar to MemoryRegionOps, the builder pattern has two advantages: 1) it makes it possible to build a VMStateDescription that knows which types it will be invoked on; 2) it provides a way to wrap the callbacks and let devices avoid "unsafe". Unfortunately, building a static VMSta

Re: [PATCH 0/2] arm: add kvm-psci-version vcpu property

2025-09-11 Thread Sebastian Ott
On Thu, 11 Sep 2025, Peter Maydell wrote: On Thu, 11 Sept 2025 at 15:49, Sebastian Ott wrote: This series adds a vcpu knob to request a specific PSCI version from KVM via the KVM_REG_ARM_PSCI_VERSION FW register. Note: in order to support PSCI v0.1 we need to drop vcpu initialization with KVM

[PATCH v4 08/10] virtio-serial-bus: add terminal resize messages

2025-09-11 Thread Filip Hejsek
From: Szymon Lukasz Implement the part of the virtio spec that allows to notify the virtio driver about terminal resizes. The virtio spec contains two methods to achieve that: For legacy drivers, we have only one port and we put the terminal size in the config space and inject the config changed

[PATCH v4 03/10] chardev: add qemu_chr_resize()

2025-09-11 Thread Filip Hejsek
From: Szymon Lukasz This function should be called whenever we learn about a new size of the terminal connected to a chardev. Signed-off-by: Szymon Lukasz Signed-off-by: Filip Hejsek --- chardev/char.c | 11 +++ include/chardev/char.h | 2 ++ 2 files changed, 13 insertions(+)

Re: [PATCH v3] migration/qemu-file: don't make incoming fds blocking again

2025-09-11 Thread Peter Xu
On Wed, Sep 10, 2025 at 05:31:56PM +0300, Vladimir Sementsov-Ogievskiy wrote: > In migration we want to pass fd "as is", not changing its > blocking status. > > The only current user of these fds is CPR state (through VMSTATE_FD), > which of-course doesn't want to modify fds on target when source

[RFC 3/3] hw/arm/virt: [DO NOT UPSTREAM] Enforce compatibility with older kernels

2025-09-11 Thread Eric Auger
This is an example on how to use the new CPU options. This catters to distributions who want machines to be migratable (forward and backward) accross different host kernel versions in case KVM registers exposed to qemu vary accross kernels. This patch is not meant to be upstreamed as it is really k

Re: [PATCH v3 15/20] util: introduce common helper for error-report & log code

2025-09-11 Thread Richard Henderson
On 9/10/25 18:03, Daniel P. Berrangé wrote: +void qmessage_context_print(FILE *fp) +{ + +if (message_format & QMESSAGE_FORMAT_TIMESTAMP) { Extra vertical whitespace. Otherwise, Reviewed-by: Richard Henderson r~

Re: [PATCH v2] arm/kvm: report registers we failed to set

2025-09-11 Thread Peter Maydell
On Tue, 2 Sept 2025 at 10:27, Cornelia Huck wrote: > > If we fail migration because of a mismatch of some registers between > source and destination, the error message is not very informative: > > qemu-system-aarch64: error while loading state for instance 0x0 ofdevice 'cpu' > qemu-system-aarch64:

[PATCH v4 01/10] chardev: add cols, rows fields

2025-09-11 Thread Filip Hejsek
From: Szymon Lukasz These fields should be interpreted as the size of the terminal connected to a given chardev. Signed-off-by: Szymon Lukasz Signed-off-by: Filip Hejsek --- chardev/char-fe.c | 13 + include/chardev/char-fe.h | 10 ++ include/chardev/char.h| 1

[PATCH v4 09/10] virtio-console: notify the guest about terminal resizes

2025-09-11 Thread Filip Hejsek
From: Szymon Lukasz If a virtio serial port is a console port forward terminal resize messages from the chardev backend to the guest. Signed-off-by: Szymon Lukasz Signed-off-by: Filip Hejsek --- hw/char/virtio-console.c | 62 1 file changed, 58

[PATCH v4 04/10] char-mux: add support for the terminal size

2025-09-11 Thread Filip Hejsek
From: Szymon Lukasz The terminal size of a mux chardev should be the same as the real chardev, so listen for CHR_EVENT_RESIZE to be up to date. We forward CHR_EVENT_RESIZE only to the focused frontend. This means frontends should probably update their view of the terminal size on receiving CHR_E

[PATCH v4 10/10] char-win-stdio: add support for terminal size

2025-09-11 Thread Filip Hejsek
Use GetConsoleScreenBufferInfo to obtain terminal size and set ENABLE_WINDOW_INPUT to receive resize notifications. Signed-off-by: Filip Hejsek --- chardev/char-win-stdio.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/chardev/char-win-stdio.c b/chardev/char-win-stdio.

[PATCH v4 05/10] main-loop: change the handling of SIGWINCH

2025-09-11 Thread Filip Hejsek
From: Szymon Lukasz Block SIGWINCH, so it is delivered only via signalfd. Install a handler that uses NotifierList to tell interested parties about SIGWINCH delivery. Signed-off-by: Szymon Lukasz Signed-off-by: Filip Hejsek --- include/qemu/main-loop.h | 4 ui/curses.c | 11

[PATCH v4 07/10] qmp: add chardev-resize command

2025-09-11 Thread Filip Hejsek
From: Szymon Lukasz The managment software can use this command to notify QEMU about the size of the terminal connected to a chardev, QEMU can then forward this information to the guest if the chardev is connected to a virtio console device. Signed-off-by: Szymon Lukasz Suggested-by: Daniel P.

[PATCH v4 02/10] chardev: add CHR_EVENT_RESIZE

2025-09-11 Thread Filip Hejsek
From: Szymon Lukasz Add a new chardev event, CHR_EVENT_RESIZE, which a backend should trigger if detects the size of the connected terminal changed. Signed-off-by: Szymon Lukasz Signed-off-by: Filip Hejsek --- backends/cryptodev-vhost-user.c | 1 + chardev/char.c | 1 + hw/bl

[PATCH v4 00/10] virtio-console: notify about the terminal size

2025-09-11 Thread Filip Hejsek
The goal of this series is to have a resizable terminal into a guest without having to set up networking and using, e.g. ssh. The virtio spec allows a virtio-console device to notify the guest about terminal resizes in the host. Linux Kernel implements the driver part of the spec. This series impl

Re: [PATCH] hpet: guard IRQ handling with BQL

2025-09-11 Thread Paolo Bonzini
On 9/10/25 16:25, Igor Mammedov wrote: Commit [1] made qemu fail with abort: xen_evtchn_set_gsi: Assertion `bql_locked()' failed. when running ./tests/functional/x86_64/test_kvm_xen.py tests. To fix it make sure that BQL is held when manipulating IRQs. Queued, but I think it's time to allow

[PATCH v2 0/4] Fix RISC-V timer migration issues

2025-09-11 Thread TANG Tiancheng
This patch set fixes several timer-related migration issues in QEMU's RISC-V implementation that cause timer events to be lost or behave incorrectly after snapshot save/restore or live migration. The problems addressed are: 1. ACLINT mtimer time_delta not migrated: The time_delta field in RISC

Re: [RFC PATCH] docs/system/security: Restrict "virtualization use case" to specific machines

2025-09-11 Thread Peter Maydell
On Mon, 8 Sept 2025 at 16:09, Daniel P. Berrangé wrote: > > On Mon, Sep 08, 2025 at 01:50:57PM +0100, Peter Maydell wrote: > > Currently our security policy defines a "virtualization use case" > > where we consider bugs to be security issues, and a > > "non-virtualization use case" where we do not

Re: [PATCH RFC] tests/functional: add tests for SCLP event CPI

2025-09-11 Thread Thomas Huth
On 11/09/2025 11.05, Nina Schoetterl-Glausch wrote: On Tue, 2025-08-12 at 14:31 +0200, Shalini Chellathurai Saroja wrote: Add tests for SCLP event type Control-Program Identification (CPI) to s390x CCW virtio tests. Please note that these tests are skipped as the guest OS does not trigger the S

[PATCH 01/15] qom: replace 'abstract' with 'flags'

2025-09-11 Thread Daniel P . Berrangé
This will allow extra boolean flags without expending the memory usage of the Type struct. Signed-off-by: Daniel P. Berrangé --- qom/object.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/qom/object.c b/qom/object.c index 1856bb36c7..a654765e0a 100644

[PATCH 2/4] hw/char: sifive_uart: Avoid pushing Tx FIFO when size is zero

2025-09-11 Thread frank . chang
From: Frank Chang There's no need to call fifo8_push_all() when size is zero. Signed-off-by: Frank Chang --- hw/char/sifive_uart.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/char/sifive_uart.c b/hw/char/sifive_uart.c index 138c31fcabf..401f869680d 100644 --- a/hw

Re: [PATCH 4/4] iotests: add tests for FUSE-over-io_uring

2025-09-11 Thread Brian Song
On 9/10/25 9:14 AM, Stefan Hajnoczi wrote: On Tue, Sep 09, 2025 at 04:51:12PM -0400, Brian Song wrote: On 9/9/25 3:38 PM, Stefan Hajnoczi wrote: On Fri, Aug 29, 2025 at 10:50:25PM -0400, Brian Song wrote: To test FUSE-over-io_uring, set the environment variable FUSE_OVER_IO_URING=1. This

[PATCH v7 3/5] hw/nvme: add NVMe Admin Security SPDM support

2025-09-11 Thread Wilfred Mallawa
From: Wilfred Mallawa Adds the NVMe Admin Security Send/Receive command support with support for DMTFs SPDM. The transport binding for SPDM is defined in the DMTF DSP0286. Signed-off-by: Wilfred Mallawa Reviewed-by: Stefan Hajnoczi Reviewed-by: Jonathan Cameron Reviewed-by: Klaus Jensen ---

[PATCH v7 1/5] spdm-socket: add seperate send/recv functions

2025-09-11 Thread Wilfred Mallawa
From: Wilfred Mallawa This is to support uni-directional transports such as SPDM over Storage. As specified by the DMTF DSP0286. Also update spdm_socket_rsp() to use the new send()/receive() functions. For the case of spdm_socket_receive(), this allows us to do error checking in one place with t

[PATCH v7 5/5] hw/nvme: connect SPDM over NVMe Security Send/Recv

2025-09-11 Thread Wilfred Mallawa
From: Wilfred Mallawa This patch extends the existing support we have for NVMe with only DoE to also add support to SPDM over the NVMe Security Send/Recv commands. With the new definition of the `spdm-trans` argument, users can specify `spdm_trans=nvme` or `spdm_trans=doe`. This allows us to sel

Re: [PATCH v6 5/5] hw/nvme: connect SPDM over NVMe Security Send/Recv

2025-09-11 Thread Wilfred Mallawa
On Thu, 2025-09-11 at 08:30 +0200, Klaus Jensen wrote: > On Sep 11 16:00, Wilfred Mallawa wrote: > > From: Wilfred Mallawa > > > > This patch extends the existing support we have for NVMe with only > > DoE > > to also add support to SPDM over the NVMe Security Send/Recv > > commands. > > > > Wit

[PATCH v7 2/5] spdm: add spdm storage transport virtual header

2025-09-11 Thread Wilfred Mallawa
From: Wilfred Mallawa This header contains the transport encoding for an SPDM message that uses the SPDM over Storage transport as defined by the DMTF DSP0286. Signed-off-by: Wilfred Mallawa --- include/system/spdm-socket.h | 12 1 file changed, 12 insertions(+) diff --git a/incl

[PATCH v7 0/5] NVMe: Add SPDM over the storage transport support

2025-09-11 Thread Wilfred Mallawa
From: Wilfred Mallawa This series extends the existing SPDM support in QEMU to support the DSP0286 SPDM Storage Transport [1] for NVMe. SPDM Storage Transport uses the NVMe Admin Security Send/Receive commands, as such, support for these commands have also been added. With the addition of a new

Re: [PATCH 02/22] vfio/pci: Do not unparent in instance_finalize()

2025-09-11 Thread Akihiko Odaki
On 2025/09/12 6:37, Peter Xu wrote: On Thu, Sep 11, 2025 at 12:47:24PM +0900, Akihiko Odaki wrote: On 2025/09/11 5:41, Peter Xu wrote: On Sat, Sep 06, 2025 at 04:11:11AM +0200, Akihiko Odaki wrote: Children are automatically unparented so manually unparenting is unnecessary. Worse, automatic

Re: [PATCH v2 0/5] tests/functional: Adapt reverse_debugging to run w/o Avocado

2025-09-11 Thread Gustavo Romero
Hi Daniel, Thanks a lot for review and the suggestions. On 9/8/25 08:49, Daniel P. Berrangé wrote: On Thu, Sep 04, 2025 at 03:46:35PM +, Gustavo Romero wrote: In this series, we leveraged the run-test.py script used in the check-tcg tests, making it a GDB runner capable of calling a test s

Re: [PATCH v2 5/5] tests/functional: Adapt reverse_debugging to run w/o Avocado

2025-09-11 Thread Gustavo Romero
Hi Daniel! On 9/8/25 06:16, Daniel P. Berrangé wrote: On Thu, Sep 04, 2025 at 03:46:40PM +, Gustavo Romero wrote: This commit removes Avocado as a dependency for running the reverse_debugging test. The main benefit, beyond eliminating an extra dependency, is that there is no longer any nee

[PATCH] plugins: Add PC diversion API function

2025-09-11 Thread Florian Hofhammer
This patch adds a plugin API function that allows diverting the program counter during execution. A potential use case for this functionality is to skip over parts of the code, e.g., by hooking into a specific instruction and setting the PC to the next instruction in the callback. Link: https://li

Re: [PATCH v3 0/9] virtio-console: notify about the terminal size

2025-09-11 Thread Filip Hejsek
On Thu, 2025-09-11 at 18:43 +0200, Filip Hejsek wrote: > > I will try to merge it with the current master again, which should be > > ready in a short time. > > Done. You can find an updated version of the patches at > . > I haven't tes

Re: [PATCH v2 3/3] memory: Stop piggybacking on memory region owners

2025-09-11 Thread Peter Xu
On Thu, Sep 11, 2025 at 12:40:43PM +0900, Akihiko Odaki wrote: > On 2025/09/11 6:45, Peter Xu wrote: > > On Sat, Sep 06, 2025 at 04:39:06AM +0200, Akihiko Odaki wrote: > > > MemoryRegions used to "piggyback" on their owners instead of using their > > > own reference counters due to the circular dep

Re: [PATCH v3 0/9] virtio-console: notify about the terminal size

2025-09-11 Thread Dominique Martinet
Filip Hejsek wrote on Thu, Sep 11, 2025 at 11:19:15PM +0200: > > Done. You can find an updated version of the patches at > > . > > I haven't tested the updated version though. I will maybe do some > > testing and then submit it to the m

Re: [PATCH 02/22] vfio/pci: Do not unparent in instance_finalize()

2025-09-11 Thread Peter Xu
On Thu, Sep 11, 2025 at 12:47:24PM +0900, Akihiko Odaki wrote: > On 2025/09/11 5:41, Peter Xu wrote: > > On Sat, Sep 06, 2025 at 04:11:11AM +0200, Akihiko Odaki wrote: > > > Children are automatically unparented so manually unparenting is > > > unnecessary. > > > > > > Worse, automatic unparenting

[PATCH v2 1/3] io/crypto: Move tls premature termination handling into QIO layer

2025-09-11 Thread Peter Xu
QCryptoTLSSession allows TLS premature termination in two cases, one of the case is when the channel shutdown() is invoked on READ side. It's possible the shutdown() happened after the read thread blocked at gnutls_record_recv(). In this case, we should allow the premature termination to happen.

[PATCH v2 2/3] io/tls: Make qio_channel_tls_bye() always synchronous

2025-09-11 Thread Peter Xu
No issue I hit, the change is only from code observation when I am looking at a TLS premature termination issue. qio_channel_tls_bye() API needs to be synchronous. When it's not, the previous impl will attach an asynchronous task retrying but only until when the channel gets the relevant GIO even

[PATCH v6] tests/functional: add a vfio-user smoke test

2025-09-11 Thread John Levon
From: Mark Cave-Ayland Add a basic test of the vfio-user PCI client implementation. Co-authored-by: John Levon Signed-off-by: Mark Cave-Ayland Signed-off-by: John Levon --- MAINTAINERS | 1 + tests/functional/x86_64/meson.build | 1 + .../x86_6

Re: [PULL 0/8] Tracing patches

2025-09-11 Thread Stefan Hajnoczi
On Thu, Sep 11, 2025 at 7:40 AM Peter Maydell wrote: > > On Mon, 8 Sept 2025 at 15:10, Stefan Hajnoczi wrote: > > > > The following changes since commit 6a9fa5ef3230a7d51e0d953a59ee9ef10af705b8: > > > > Merge tag 'pull-tcg-20250905' of https://gitlab.com/rth7680/qemu into > > staging (2025-09-

[PATCH 0/2] arm: add kvm-psci-version vcpu property

2025-09-11 Thread Sebastian Ott
This series adds a vcpu knob to request a specific PSCI version from KVM via the KVM_REG_ARM_PSCI_VERSION FW register. Note: in order to support PSCI v0.1 we need to drop vcpu initialization with KVM_CAP_ARM_PSCI_0_2 in that case. Alternatively we could limit support to versions >=0.2 . Sebastian

Re: [PATCH v3 17/20] util: add support for formatting a workload name in messages

2025-09-11 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > The error_report function can include the guest name in any > messages it prints. The qemu_log function has no equivalent > behaviour. > > This introduces support for a "workload name" in the new > messages API, which in the case of system emulat

Re: [PATCH 0/2] arm: add kvm-psci-version vcpu property

2025-09-11 Thread Sebastian Ott
On Thu, 11 Sep 2025, Peter Maydell wrote: On Thu, 11 Sept 2025 at 16:59, Sebastian Ott wrote: On Thu, 11 Sep 2025, Peter Maydell wrote: On Thu, 11 Sept 2025 at 15:49, Sebastian Ott wrote: This series adds a vcpu knob to request a specific PSCI version from KVM via the KVM_REG_ARM_PSCI_VERS

Re: [PATCH v2] hw/ppc/spapr_hcall: Return host mitigation characteristics in KVM mode

2025-09-11 Thread Vaibhav Jain
Gautam, Thanks for this patch Gautam Menghani writes: > Currently, on a P10 KVM guest, the mitigations seen in the output of > "lscpu" command are different from the host. The reason for this > behaviour is that when the KVM guest makes the "h_get_cpu_characteristics" > hcall, QEMU does not con

Re: [PATCH] ppc/spapr: init lrdr-capapcity phys with ram size if maxmem not provided

2025-09-11 Thread Shivaprasad G Bhat
On 5/6/25 9:59 AM, Harsh Prateek Bora wrote: lrdr-capacity contains phys field which communicates the maximum address in bytes and therefore, the most memory that can be allocated to this partition. This is usually populated when maxmem is provided alongwith memory size on qemu command line. Howe

[PATCH v4 6/8] net/tap: net_init_tap(): refactor parameter checking

2025-09-11 Thread Vladimir Sementsov-Ogievskiy
Unite duplicated checks of different code paths. Signed-off-by: Vladimir Sementsov-Ogievskiy Tested-by: Lei Yang --- net/tap.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/net/tap.c b/net/tap.c index 257290f06b..9b0ff70cf2 100644 --- a/net/

Re: [PULL 1/2] target/loongarch: Guard 64-bit-only insn translation with TRANS64 macro

2025-09-11 Thread gaosong
在 2025/9/11 下午6:30, Michael Tokarev 写道: On 11.09.2025 13:04, Michael Tokarev wrote: ... The same applies to the second patch in this series, btw, -- the second patch also does not apply to 10.0.x directly because 10.0 lacks commit ab9bbee3c7da3 "hw/intc/loongarch_pch: Modify name of some registe

Re: The different ways QEMU logs stuff

2025-09-11 Thread Richard Henderson
On 9/11/25 14:49, Paolo Bonzini wrote:    -d tid further splits per thread.    Splitting per thread feels fairly redundant once the prefix includes    the thread name.  Thread names is easier to make sense of than numeric    thread IDs in the split filenames. https://lore.kernel.org/all/202204

Re: [PATCH v3 20/20] util: add brackets around guest name in message context

2025-09-11 Thread Richard Henderson
On 9/10/25 18:03, Daniel P. Berrangé wrote: The message context can optionally include the guest name if the argument '-msg guest-name=on' is given. The formatting, however, does not look good if the guest name contains whitespace. Change the output to include square brackets to demarcate the nam

  1   2   >