Re: [PATCH RFC 00/13] qemu: Add support for iothread to virtqueue mapping for 'virtio-scsi'

2025-02-18 Thread Stefan Hajnoczi
On Tue, Feb 18, 2025 at 12:15:46PM +0100, Peter Krempa wrote: > On Tue, Feb 18, 2025 at 13:53:31 +0800, Stefan Hajnoczi wrote: > > On Fri, Feb 14, 2025 at 05:29:34PM +0100, Peter Krempa wrote: > > > The first part of the series refactors the existing code for reuse and > > > then uses the new helpe

libvirt hook to change domain xml

2025-02-18 Thread Victor Toso
Hi, I'm particularly interested in the PoC of KubeVirt to allow custom changes in libvirt domain xml in a more straightforward manner than they have Today [0]. When I was looking into the libvirt hooks, I was a bit excited when I read: > you can also place several hook scripts in the directory

[PATCH 1/1] nwfilter: Fix deadlock between nwfilter-list and VM startup/migration

2025-02-18 Thread Dion Bosschieter
A deadlock occurs when `nwfilterBindingCreateXML` and `nwfilterConnectListAllNWFilters` acquire locks in an inconsistent order. This patch ensures `nwfilterBindingCreateXML` acquires `driverMutex` before `updateLock`, resolving the issue. Additionally, added `driverMutex` to `nwfilterBindingDele

[PATCH 0/1] nwfilter: Fix deadlock between nwfilter-list and VM startup/migration

2025-02-18 Thread Dion Bosschieter
A deadlock occurs when `nwfilterBindingCreateXML` and `nwfilterConnectListAllNWFilters` acquire locks in an inconsistent order. This affects both incoming migrations and VM startups (`virsh start`), where `nwfilterBindingCreateXML` needs `updateLock`, while `nwfilter-list` first acquires `driver

Re: [PATCH RFC] util: pick a better runtime directory when XDG_RUNTIME_DIR isn't set

2025-02-18 Thread Daniel P . Berrangé
On Tue, Feb 18, 2025 at 02:50:52PM +, Daniel P. Berrangé wrote: > On Tue, Feb 18, 2025 at 09:33:43AM -0500, Laine Stump wrote: > > On 2/18/25 4:26 AM, Daniel P. Berrangé wrote: > > > On Mon, Feb 17, 2025 at 03:11:56PM -0500, Laine Stump wrote: > > > > On 2/17/25 5:28 AM, Daniel P. Berrangé wrot

Re: libvirt hook to change domain xml

2025-02-18 Thread Jiri Denemark
On Tue, Feb 18, 2025 at 18:41:46 +0100, Victor Toso wrote: > Hi, > > I'm particularly interested in the PoC of KubeVirt to allow > custom changes in libvirt domain xml in a more straightforward > manner than they have Today [0]. > > When I was looking into the libvirt hooks, I was a bit excited >

[PATCH 1/4] conf: introduce support for multiple ACPI tables

2025-02-18 Thread Daniel P . Berrangé
Currently we parse ...path... into a flat 'char *slic_table' field which is rather an anti-pattern as it has special cased a single attribute type. This rewrites the internal design to permit multiple table types to be parsed, should we add more in future. Each type is

[PATCH 2/4] src: validate permitted ACPI table types in libxl/qemu drivers

2025-02-18 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/libxl/libxl_domain.c | 14 ++ src/qemu/qemu_validate.c | 15 +++ 2 files changed, 29 insertions(+) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 6805160923..816ed2f349 100644 --- a/src/libxl/libxl_domain.c

[PATCH 0/4] Add support for MSDM ACPI table type

2025-02-18 Thread Daniel P . Berrangé
This was requested by KubeVirt in https://gitlab.com/libvirt/libvirt/-/issues/748 I've not functionally tested this, since I lack any suitable guest windows environment this is looking for MSDM tables, nor does my machine have MSDM ACPI tables to pass to a guest. I'm blindly assuming that the

[PATCH 3/4] conf: support MSDM ACPI table type

2025-02-18 Thread Daniel P . Berrangé
The MSDM ACPI table is a replacement for the SLIC table type, now preferred by Microsoft for Windows Licensing checks: https://learn.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653305(v=vs.85) Signed-off-by: Daniel P. Berrangé --- docs/formatdomain.rst | 4 ++-

[PATCH 4/4] qemu: support MSDM ACPI table type

2025-02-18 Thread Daniel P . Berrangé
The MSDM ACPI table is a replacement for the SLIC table type, now preferred by Microsoft for Windows Licensing checks: https://learn.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653305(v=vs.85) Resolves: https://gitlab.com/libvirt/libvirt/-/issues/748 Signed-off-by: Daniel P

[PATCH] qemu: Avoid crash in qemuDomainCheckCPU with unknown host CPU

2025-02-18 Thread Jiri Denemark
When we don't have any information about host CPU (for example when running on an aarch64 host), the virQEMUCapsGetHostModel would return NULL. Fixes: https://gitlab.com/libvirt/libvirt/-/issues/747 Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c | 1 + 1 file changed, 1 insertion(+) di

[PATCH 5/5] tests: Add test case for NVMe device configuration

2025-02-18 Thread honglei . wang
From: ray This completes the test coverage for the recently added NVMe disk bus support. Signed-off-by: ray --- .../disk-nvme-device.x86_64-latest.args| 38 + .../disk-nvme-device.x86_64-latest.xml | 49 ++ tests/qemuxmlconfdata/disk-

[PATCH 0/5] qemu: Introduce nvme disk emulation support

2025-02-18 Thread honglei . wang
From: hongleiwang QEMU has supported nvme disk emulation for a long time, see: https://qemu-project.gitlab.io/qemu/system/devices/nvme.html. The following patches introduce nvme and nvme-ns disk bus type: A disk with nvme as bus is represented as nvme disk that contains only one nvme namespace.

[PATCH 4/5] docs: Add NVMe and NVMe namespace disk bus types to documentation

2025-02-18 Thread honglei . wang
From: ray Update documentation to include nvme and nvme-ns disk bus types: - Add "nvme" and "nvme-ns" to the list of supported disk bus types - Extend the allowed disk target device patterns to include nvme and nvmens prefixes Signed-off-by: ray --- docs/formatdomain.rst | 5 +++-

Re: libvirt hook to change domain xml

2025-02-18 Thread Victor Toso
Hi, On Tue, Feb 18, 2025 at 07:11:45PM +0100, Jiri Denemark wrote: > On Tue, Feb 18, 2025 at 18:41:46 +0100, Victor Toso wrote: > > Hi, > > > > I'm particularly interested in the PoC of KubeVirt to allow > > custom changes in libvirt domain xml in a more straightforward > > manner than they have

Re: [PATCH 0/4] Add support for MSDM ACPI table type

2025-02-18 Thread Daniel P . Berrangé
On Tue, Feb 18, 2025 at 07:20:01PM +0100, Victor Toso wrote: > Hi, > > On Tue, Feb 18, 2025 at 06:12:49PM +, Daniel P. Berrangé wrote: > > This was requested by KubeVirt in > > > > https://gitlab.com/libvirt/libvirt/-/issues/748 > > > > I've not functionally tested this, since I lack any s

Re: [PATCH 0/4] Add support for MSDM ACPI table type

2025-02-18 Thread Victor Toso
Hi, On Tue, Feb 18, 2025 at 06:12:49PM +, Daniel P. Berrangé wrote: > This was requested by KubeVirt in > > https://gitlab.com/libvirt/libvirt/-/issues/748 > > I've not functionally tested this, since I lack any suitable guest > windows environment this is looking for MSDM tables, nor does

Re: libvirt hook to change domain xml

2025-02-18 Thread Jiri Denemark
On Tue, Feb 18, 2025 at 19:21:56 +0100, Victor Toso wrote: > Hi, > > On Tue, Feb 18, 2025 at 07:11:45PM +0100, Jiri Denemark wrote: > > On Tue, Feb 18, 2025 at 18:41:46 +0100, Victor Toso wrote: > > > Hi, > > > > > > I'm particularly interested in the PoC of KubeVirt to allow > > > custom changes

Re: [PATCH 12/12] docs: document using passt backend with

2025-02-18 Thread Laine Stump
On 2/17/25 10:48 AM, Laine Stump wrote: On 2/17/25 9:13 AM, Andrea Bolognani wrote: On Sat, Feb 15, 2025 at 12:20:17AM -0500, Laine Stump wrote: +vhost-user connection with passt backend + + +:since:`Since 11.1.0 (QEMU and KVM only)` passt can be used as

[PATCH v2 20/21] qemu: add RDP support

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Wire the external server RDP support with QEMU. Check the configuration, allocate a port, start the process and set the credentials. Signed-off-by: Marc-André Lureau --- docs/formatdomain.rst | 25 -- src/conf/domain_conf.h| 1 + src/qemu/qemu_extdevice.

[PATCH v2 01/21] build-sys: drop -Winline when optimization=g

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau The warning is triggered when compiling with various build options, such as -Doptimization=g. >From gcc(1) man page about -Winline: seemingly insignificant changes in the source program can cause the warnings produced by -Winline to appear or disappear. Such flaky behav

[PATCH v2 00/21] Add qemu RDP server support

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Hi, This patch series offers an out-of-process Remote Desktop Protocol (RDP) server solution utilizing QEMU's -display dbus interface, offering improved modularity and potential security benefits compared to built-in server. This initiative was spearheaded by Mihnea Buza

[PATCH v2 02/21] build: fix -Werror=maybe-uninitialized

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau When compiled with -Doptimization=g ../tools/nss/libvirt_nss_macs.c:155:8: error: ‘jerr’ may be used uninitialized [-Werror=maybe-uninitialized] 155 | if (jerr == json_tokener_continue) { |^ Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Be

[PATCH v2 15/21] qemu/dbus: log daemon stdout/err, use domainLogContext

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Currently, if dbus-daemon writes on errfd, it will SIGPIPE. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_dbus.c | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_dbus.c b/src/qemu/qemu_dbus.c ind

[PATCH v2 14/21] qemu/dbus: keep a connection to the VM D-Bus

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau The following changes are going to communicate with the qemu-rdp server through the VM D-Bus bus, keep a connection for that and further usage. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_dbus.c| 35 +++ src/qemu/qemu_dbus.h

[PATCH v2 16/21] qemu: validate RDP configuration

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_validate.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index da3321849c..051f934

[PATCH v2 21/21] tests: add qemu test

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- .../graphics-rdp.x86_64-latest.args | 35 +++ .../graphics-rdp.x86_64-latest.xml| 1 + tests/qemuxmlconfdata/graphics-rdp.xml| 43 +++ tests/qemuxmlconftest.c

Re: [PATCH] qemu: Avoid crash in qemuDomainCheckCPU with unknown host CPU

2025-02-18 Thread Michal Prívozník
On 2/18/25 11:49, Jiri Denemark wrote: > When we don't have any information about host CPU (for example when > running on an aarch64 host), the virQEMUCapsGetHostModel would return > NULL. > > Fixes: https://gitlab.com/libvirt/libvirt/-/issues/747 > Signed-off-by: Jiri Denemark Please also menti

Re: [PATCH] build-aux: squelch trailing blank warnings from binary files

2025-02-18 Thread Michal Prívozník
On 2/17/25 18:03, Daniel P. Berrangé wrote: > These files pollute the stderr output when the sc_trailing_blank > syntax check fails. > > Signed-off-by: Daniel P. Berrangé > --- > build-aux/syntax-check.mk | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Michal Privoznik

[PATCH v2 04/21] util: annotate non-null arguments for virGDBusCallMethod()

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Helps avoid/debug a potential SEGV if conn is NULL, since gio will not set the "gerror" in that case and we will crash later at: virReportError(VIR_ERR_DBUS_SERVICE, "%s", gerror->message); Signed-off-by: Marc-André Lureau --- src/util/virgdbus.h | 13 +++-- 1

[PATCH v2 03/21] qemu-slirp: drop unneeded check for OOM

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau glib anti-pattern, since it aborts on OOM. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_slirp.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/qemu/qemu_slirp.c b/src/qemu/qemu_slirp.c index 66d9d77c6c..eac7e4cc47 100

[PATCH v2 05/21] qemu: fall-through for unsupported graphics

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Without an error message, it can be tedious to figure out failure to start, just fall-through the generic range error. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu

[PATCH v2 19/21] qemu: add 'rdp' capability if qemu-rdp is available

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 15 +++ src/qemu/qemu_capabilities.h | 3 ++- src/qemu/qemu_rdp.c | 11 +++ src/qemu/qemu_rdp.h

[PATCH v2 17/21] qemu: add qemu-rdp helper unit

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Helpers to start the qemu-rdp server and set it up. Signed-off-by: Marc-André Lureau --- po/POTFILES| 1 + src/qemu/meson.build | 1 + src/qemu/qemu_domain.c | 1 + src/qemu/qemu_domain.h | 2 + src/qemu/qemu_rdp.c| 405

[PATCH v2 18/21] qemu: pass virQEMUDriverConfig to capabilities

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau This will help with the following patch, which also requires config access. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 9 + src/qemu/qemu_capabilities.h | 9 + src/qemu/qemu_conf.c | 9 + tests/domaincapstest.c

Re: [PATCH RFC 00/13] qemu: Add support for iothread to virtqueue mapping for 'virtio-scsi'

2025-02-18 Thread Peter Krempa
On Tue, Feb 18, 2025 at 13:53:31 +0800, Stefan Hajnoczi wrote: > On Fri, Feb 14, 2025 at 05:29:34PM +0100, Peter Krempa wrote: > > The first part of the series refactors the existing code for reuse and > > then uses the new helpers to implement the feature. > > > > Note that this series is in RFC

[PATCH 1/5] qemu: Add support for NVMe disk bus type

2025-02-18 Thread honglei . wang
From: ray This patch adds support for the NVMe disk bus type across multiple components: - Extend virDomainDiskBus enum to include VIR_DOMAIN_DISK_BUS_NVME - Update driver-specific functions to handle NVMe disks - Modify disk name parsing to recognize 'nvme' prefix - Ensure NVMe disks require a

Re: [PATCH RFC] util: pick a better runtime directory when XDG_RUNTIME_DIR isn't set

2025-02-18 Thread Laine Stump
On 2/18/25 4:26 AM, Daniel P. Berrangé wrote: On Mon, Feb 17, 2025 at 03:11:56PM -0500, Laine Stump wrote: On 2/17/25 5:28 AM, Daniel P. Berrangé wrote: On Mon, Feb 17, 2025 at 02:14:49AM -0500, Laine Stump wrote: But sometimes XDG_RUNTIME_DIR isn't set in the user's environment. Do you have

Re: [PATCH] qemu: Avoid crash in qemuDomainCheckCPU with unknown host CPU

2025-02-18 Thread Jaroslav Suchanek
On Tue, Feb 18, 2025 at 11:49:53AM +0100, Jiri Denemark wrote: > When we don't have any information about host CPU (for example when > running on an aarch64 host), the virQEMUCapsGetHostModel would return > NULL. Tested-by: Jaroslav Suchanek > > Fixes: https://gitlab.com/libvirt/libvirt/-/issue

[PATCH v2 08/21] conf: parse optional RDP username & password

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Like VNC, allow to set credentials for RDP. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- src/conf/domain_conf.c| 13 + src/conf/domain_conf.h| 2 ++ src/conf/schemas/domaincommon.rng | 10 ++ 3 files

[PATCH v2 09/21] conf: generalize virDomainDefHasSpiceGraphics

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Generalize the function, broaden its potential usage. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 15 --- src/conf/domain_conf.h | 2 +- src/libvirt_private.syms | 2 +- src/qemu/qemu_validate.c | 4 +

[PATCH v2 11/21] qemu: add RDP ports range allocator

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau RDP server uses port 3389 by default. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_conf.c | 6 ++ src/qemu/qemu_conf.h | 6 ++ src/qemu/qemu_driver.c | 8 3 files changed, 20 insertions(+) diff --git a/src/qem

[PATCH v2 10/21] qemu: use virDomainDefHasGraphics

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_validate.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 3dc09ca5e0..da3321849c 100644 --- a/sr

[PATCH v2 12/21] qemu: limit to one

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 772e98fbb4..4e29e841f9 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qem

[PATCH v2 13/21] qemu/virtiofs: use domainLogContext

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_virtiofs.c | 53 +--- 1 file changed, 12 insertions(+), 41 deletions(-) diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c index dd3e0dd9fe..aa282024a4 100644 --- a/src/

[PATCH v2 07/21] qemu: add qemu RDP configuration

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- src/qemu/libvirtd_qemu.aug | 7 ++ src/qemu/qemu.conf.in | 31 src/qemu/qemu_conf.c | 39 ++ src/qemu/qemu_c

[PATCH v2 06/21] qemu: add rdp state directory

2025-02-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_conf.c | 2 ++ src/qemu/qemu_conf.h | 1 + src/qemu/qemu_driver.c | 12 tests/testutilsqemu.c | 2 ++ 4 files changed, 17 insertions(+) diff --git a/src/qemu/qemu_co

[PATCH 2/5] qemu: Add support for NVMe namespace disk bus type

2025-02-18 Thread honglei . wang
From: ray This patch extends the previous NVMe disk bus support by introducing a new nvme-ns bus type. The nvme-ns bus disk needs to be attached to nvme controller. A controller can contain multiple nvme-ns disk devices. Key changes include: - Add VIR_DOMAIN_DISK_BUS_NVME_NS to disk bus - Add

[PATCH 3/5] qemu_capabilities: Add support for NVMe disk capabilities

2025-02-18 Thread honglei . wang
From: ray This patch extends QEMU capabilities support for nvme and nvme-ns disks. Signed-off-by: ray --- src/qemu/qemu_capabilities.c | 10 ++ src/qemu/qemu_capabilities.h | 2 ++ src/qemu/qemu_validate.c

Re: [PATCH RFC] util: pick a better runtime directory when XDG_RUNTIME_DIR isn't set

2025-02-18 Thread Daniel P . Berrangé
On Tue, Feb 18, 2025 at 09:33:43AM -0500, Laine Stump wrote: > On 2/18/25 4:26 AM, Daniel P. Berrangé wrote: > > On Mon, Feb 17, 2025 at 03:11:56PM -0500, Laine Stump wrote: > > > On 2/17/25 5:28 AM, Daniel P. Berrangé wrote: > > > > On Mon, Feb 17, 2025 at 02:14:49AM -0500, Laine Stump wrote: > >

Re: [PATCH RFC] util: pick a better runtime directory when XDG_RUNTIME_DIR isn't set

2025-02-18 Thread Daniel P . Berrangé
On Mon, Feb 17, 2025 at 03:11:56PM -0500, Laine Stump wrote: > On 2/17/25 5:28 AM, Daniel P. Berrangé wrote: > > On Mon, Feb 17, 2025 at 02:14:49AM -0500, Laine Stump wrote: > > > But sometimes XDG_RUNTIME_DIR isn't set in the user's environment. > > > > Do you have examples of scenarios in which

Plans for 11.1.0 release (freeze on Monday 24 Feb)

2025-02-18 Thread Jiri Denemark
We are getting close to 11.1.0 release of libvirt. To aim for the release on Monday 03 Mar I suggest entering the freeze on Monday 24 Feb and tagging RC2 on Thursday 27 Feb. I hope this works for everyone. Jirka