[PATCH 0/3] Add TPM emulator

2024-08-28 Thread marcandre . lureau
From: Marc-André Lureau Hi, When swtpm capabilities reports "nvram-backend-dir", it can accepts a single file or block device where TPM state will be stored. --tpmstate must be backend-uri=file://. Let me know what you think of this approach of exposing this. Related: https://issues.redhat.co

[PATCH 1/3] util: check swtpm nvram-backend-dir capability

2024-08-28 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/util/virtpm.c | 1 + src/util/virtpm.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/util/virtpm.c b/src/util/virtpm.c index 81fd6166cf..84ed2f0edd 100644 --- a/src/util/virtpm.c +++ b/src/util/virtpm.c @@ -40,6 +40,7

[PATCH 2/3] schema: add TPM emulator

2024-08-28 Thread marcandre . lureau
From: Marc-André Lureau Learn to parse a file path for the TPM state. Signed-off-by: Marc-André Lureau --- docs/formatdomain.rst | 15 +++ src/conf/domain_conf.c | 21 + src/conf/domain_conf.h | 6

[PATCH 3/3] qemu_tpm: handle file/block storage

2024-08-28 Thread marcandre . lureau
From: Marc-André Lureau When swtpm reports "nvram-backend-dir", it can accepts a single file or block device where TPM state will be stored. --tpmstate must be backend-uri=file://. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_tpm.c | 74 + 1 fi

[PATCH v2 0/4] Add TPM emulator

2024-09-10 Thread marcandre . lureau
From: Marc-André Lureau Hi, When swtpm capabilities reports "nvram-backend-dir", it can accepts a single file or block device where TPM state will be stored. --tpmstate must be backend-uri=file://. v2: - add support as well (Daniel) Related: https://issues.redhat.com/browse/CNV-35250 Marc-A

[PATCH v2 1/4] util: check swtpm nvram-backend-dir capability

2024-09-10 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/util/virtpm.c | 1 + src/util/virtpm.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/util/virtpm.c b/src/util/virtpm.c index 81fd6166cf..84ed2f0edd 100644 --- a/src/util/virtpm.c +++ b/src/util/virtpm.c @@ -40,6 +40,7

[PATCH v2 2/4] schema: add TPM emulator

2024-09-10 Thread marcandre . lureau
From: Marc-André Lureau Learn to parse a file path for the TPM state. Signed-off-by: Marc-André Lureau --- docs/formatdomain.rst | 15 +++ src/conf/domain_conf.c | 21 + src/conf/domain_conf.h | 6

[PATCH v2 3/4] schema: add TPM emulator

2024-09-10 Thread marcandre . lureau
From: Marc-André Lureau Learn to parse a directory for the TPM state. Signed-off-by: Marc-André Lureau --- docs/formatdomain.rst | 3 +++ src/conf/domain_conf.c | 13 ++--- src/conf/domain_conf.h | 1 + src/c

[PATCH v2 4/4] qemu_tpm: handle file/block storage source

2024-09-10 Thread marcandre . lureau
From: Marc-André Lureau When swtpm reports "nvram-backend-dir", it can accepts a single file or block device where TPM state will be stored. --tpmstate must be backend-uri=file://. Teach the storage to use custom directory or file source location. Signed-off-by: Marc-André Lureau --- src/qemu

[PULL 0/2] chardev patches

2024-10-09 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 2af37e791906cfda42cb9604a16d218e56994bb1: Merge tag 'pull-request-2024-10-07' of https://gitlab.com/thuth/qemu into staging (2024-10-07 12:55:02 +0100) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qe

[PULL 1/2] chardev: introduce 'reconnect-ms' and deprecate 'reconnect'

2024-10-09 Thread marcandre . lureau
From: Daniil Tatianin The 'reconnect' option only allows to specify the time in seconds, which is way too long for certain workflows. We have a lightweight disk backend server, which takes about 20ms to live update, but due to this limitation in QEMU, previously the guest disk controller would h

[PULL 2/2] chardev: add path option for pty backend

2024-10-09 Thread marcandre . lureau
From: Octavian Purdila Add path option to the pty char backend which will create a symbolic link to the given path that points to the allocated PTY. This avoids having to make QMP or HMP monitor queries to find out what the new PTY device path is. Based on patch from Paulo Neves: https://patch

[PATCH v3 2/5] tpm: rename 'storagepath' to 'source_path'

2024-10-04 Thread marcandre . lureau
From: Marc-André Lureau Mechanically replace existing 'storagepath' with 'source_path', as the following patches introduce configuration. Signed-off-by: Marc-André Lureau --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 2 +- src/qemu/qemu_tpm.c | 48

[PATCH v3 3/5] schema: add TPM emulator

2024-10-04 Thread marcandre . lureau
From: Marc-André Lureau Learn to parse a file path for the TPM state. Signed-off-by: Marc-André Lureau --- docs/formatdomain.rst | 19 ++ src/conf/domain_conf.c | 28 + src/conf/domain_conf.h | 9 +

[PATCH v3 0/5] Add TPM emulator

2024-10-04 Thread marcandre . lureau
From: Marc-André Lureau Hi, When swtpm capabilities reports "nvram-backend-dir", it can accepts a single file or block device where TPM state will be stored. --tpmstate must be backend-uri=file://. v3: - changed to v2: - add support as well (Daniel) Related: https://issues.redhat.com/brows

[PATCH v3 1/5] util: check swtpm nvram-backend-{dir,file} capabilities

2024-10-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/util/virtpm.c | 2 ++ src/util/virtpm.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/util/virtpm.c b/src/util/virtpm.c index 81fd6166cf..298caaad80 100644 --- a/src/util/virtpm.c +++ b/src/util/virtpm.c @@ -40,6 +40,

[PATCH v3 5/5] qemu_tpm: handle file/block storage source

2024-10-04 Thread marcandre . lureau
From: Marc-André Lureau When swtpm reports "nvram-backend-dir", it can accepts a single file or block device where TPM state will be stored. --tpmstate must be backend-uri=file://. Teach the storage to use custom directory or file source location. Signed-off-by: Marc-André Lureau --- src/qemu

[PATCH v3 4/5] schema: add TPM emulator

2024-10-04 Thread marcandre . lureau
From: Marc-André Lureau Learn to parse a directory for the TPM state. Signed-off-by: Marc-André Lureau --- docs/formatdomain.rst | 3 ++- src/conf/domain_conf.c| 1 + src/conf/domain_conf.h| 1 + src/conf/schemas/domain

[PATCH v4 1/6] util: check swtpm nvram-backend-{dir,file} capabilities

2024-10-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- src/util/virtpm.c | 2 ++ src/util/virtpm.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/util/virtpm.c b/src/util/virtpm.c index 81fd6166cf..298caaad80 100644 --- a/src/util/virtpm.c +++ b/src

[PATCH v4 2/6] tpm: rename 'storagepath' to 'source_path'

2024-10-21 Thread marcandre . lureau
From: Marc-André Lureau Mechanically replace existing 'storagepath' with 'source_path', as the following patches introduce configuration. Signed-off-by: Marc-André Lureau --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 2 +- src/qemu/qemu_tpm.c | 46

[PATCH v4 3/6] schema: add TPM emulator

2024-10-21 Thread marcandre . lureau
From: Marc-André Lureau Learn to parse a file path for the TPM state. Signed-off-by: Marc-André Lureau --- docs/formatdomain.rst | 19 ++ src/conf/domain_conf.c | 28 + src/conf/domain_conf.h | 9 +

[PATCH v4 4/6] schema: add TPM emulator

2024-10-21 Thread marcandre . lureau
From: Marc-André Lureau Learn to parse a directory for the TPM state. Signed-off-by: Marc-André Lureau --- docs/formatdomain.rst | 3 ++- src/conf/domain_conf.c| 1 + src/conf/domain_conf.h| 1 + src/conf/schemas/domain

[PATCH v4 0/6] Add TPM emulator

2024-10-21 Thread marcandre . lureau
From: Marc-André Lureau Hi, When swtpm capabilities reports "nvram-backend-dir", it can accepts a single file or block device where TPM state will be stored. --tpmstate must be backend-uri=file://. v4: - add "qemu: explicit swtpm state locking" - add r-b from Stefan, first patch only atm v3:

[PATCH v4 6/6] qemu: explicit swtpm state locking

2024-10-21 Thread marcandre . lureau
From: Marc-André Lureau With upcoming v0.10 swtpm (commit https://github.com/stefanberger/swtpm/commit/aa483aeb6df87ed56ccf3d5778d6fd8019089bda), file locking with "lock" option is now supported and reflected in "tpmstate-opt-lock" capability. Signed-off-by: Marc-André Lureau --- src/qemu/qemu

[PATCH v4 5/6] qemu_tpm: handle file/block storage source

2024-10-21 Thread marcandre . lureau
From: Marc-André Lureau When swtpm reports "nvram-backend-dir", it can accepts a single file or block device where TPM state will be stored. --tpmstate must be backend-uri=file://. Teach the storage to use custom directory or file source location. Signed-off-by: Marc-André Lureau --- src/qemu

[PATCH v5 2/6] tpm: rename 'storagepath' to 'source_path'

2024-10-22 Thread marcandre . lureau
From: Marc-André Lureau Mechanically replace existing 'storagepath' with 'source_path', as the following patches introduce configuration. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 2 +- src/qemu

[PATCH v5 3/6] schema: add TPM emulator

2024-10-22 Thread marcandre . lureau
From: Marc-André Lureau Learn to parse a file path for the TPM state. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- docs/formatdomain.rst | 21 src/conf/domain_conf.c | 28 + src/conf/domain_conf

[PATCH v5 4/6] schema: add TPM emulator

2024-10-22 Thread marcandre . lureau
From: Marc-André Lureau Learn to parse a directory for the TPM state. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- docs/formatdomain.rst | 3 ++- src/conf/domain_conf.c| 1 + src/conf/domain_conf.h|

[PATCH v5 5/6] qemu_tpm: handle file/block storage source

2024-10-22 Thread marcandre . lureau
From: Marc-André Lureau When swtpm reports "nvram-backend-dir", it can accepts a single file or block device where TPM state will be stored. --tpmstate must be backend-uri=file://. Teach the storage to use custom directory or file source location. Signed-off-by: Marc-André Lureau Reviewed-by:

[PATCH v5 6/6] qemu: explicit swtpm state locking

2024-10-22 Thread marcandre . lureau
From: Marc-André Lureau With upcoming v0.10 swtpm (commit https://github.com/stefanberger/swtpm/commit/aa483aeb6df87ed56ccf3d5778d6fd8019089bda), file locking with "lock" option is now supported and reflected in "tpmstate-opt-lock" capability. Signed-off-by: Marc-André Lureau Reviewed-by: Stefa

[PATCH v5 0/6] Add TPM emulator

2024-10-22 Thread marcandre . lureau
From: Marc-André Lureau Hi, When swtpm capabilities reports "nvram-backend-dir", it can accepts a single file or block device where TPM state will be stored. --tpmstate must be backend-uri=file://. v5: - fix indentation - update doc about state sharing/locking - add r-b from Stefan v4: - add

[PATCH v5 1/6] util: check swtpm nvram-backend-{dir,file} capabilities

2024-10-22 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- src/util/virtpm.c | 2 ++ src/util/virtpm.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/util/virtpm.c b/src/util/virtpm.c index 81fd6166cf..298caaad80 100644 --- a/src/util/virtpm.c +++ b/src

[PATCH 00/19] Add qemu RDP server support

2025-01-29 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 02/19] build: fix -Werror=maybe-uninitialized

2025-01-29 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 --- tools/nss/libvirt_ns

[PATCH 05/19] qemu: report an error for unsupported graphics

2025-01-29 Thread marcandre . lureau
From: Marc-André Lureau Without an error message, it can be tedious to figure out failure to start. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1f20189e89..f08dba7988

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

2025-01-29 Thread marcandre . lureau
From: Marc-André Lureau glib anti-pattern, since it aborts on OOM. Signed-off-by: Marc-André Lureau --- 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 100644 --- a/src/qemu/qemu_slirp.c +

[PATCH 04/19] util: add conn != NULL precondition in virGDBusCallMethod()

2025-01-29 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.c | 4 1 file chan

[PATCH 07/19] qemu: add qemu RDP configuration

2025-01-29 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/libvirtd_qemu.aug | 7 ++ src/qemu/qemu.conf.in | 31 src/qemu/qemu_conf.c | 39 ++ src/qemu/qemu_conf.h | 6 + s

[PATCH 06/19] qemu: add rdp state directory

2025-01-29 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- 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_conf.c b/src/qemu/qemu_conf.c index

[PATCH 09/19] conf: generalize virDomainDefHasSpiceGraphics

2025-01-29 Thread marcandre . lureau
From: Marc-André Lureau Generalize the function, broaden its potential usage. Signed-off-by: Marc-André Lureau --- src/conf/domain_conf.c | 15 --- src/conf/domain_conf.h | 2 +- src/libvirt_private.syms | 2 +- src/qemu/qemu_validate.c | 4 ++-- 4 files changed, 16 insertio

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

2025-01-29 Thread marcandre . lureau
From: Marc-André Lureau Like VNC, allow to set credentials for RDP. Signed-off-by: Marc-André Lureau --- src/conf/domain_conf.c| 13 + src/conf/domain_conf.h| 2 ++ src/conf/schemas/domaincommon.rng | 10 ++ 3 files changed, 25 insertions(+) diff -

[PATCH 10/19] qemu: use virDomainDefHasGraphics

2025-01-29 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- 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 54226b8c62..c5b66c4966 100644 --- a/src/qemu/qemu_validate.c +++ b/src/

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

2025-01-29 Thread marcandre . lureau
From: Marc-André Lureau RDP server use port 3389 by default. Signed-off-by: Marc-André Lureau --- 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/qemu/qemu_conf.c b/src/qemu/qemu_conf

[PATCH 13/19] qemu/dbus: keep a connection to the VM D-Bus

2025-01-29 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 | 22 +++--- src/qemu/qemu_domain.h | 2 ++ 2 fil

[PATCH 12/19] qemu: limit to one

2025-01-29 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 f08dba7988..dc142b366a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qem

[PATCH 14/19] qemu/dbus: log daemon stdout/err

2025-01-29 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 | 61 +++- 1 file changed, 49 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_dbus.c b/src/qemu/qemu_

[PATCH 15/19] qemu: validate RDP configuration

2025-01-29 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- 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 c5b66c4966..86fc5ac0fe 100644 --- a/src/qemu/qemu_va

[PATCH 16/19] qemu: if -display dbus capability is supported, accept rdp

2025-01-29 Thread marcandre . lureau
From: Marc-André Lureau We may want to check qemu-rdp presence, instead of failing later? Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 7 +-- tests/domaincapsdata/qemu_10.0.0.s390x.xml | 1 + tests/domaincapsdata/qemu_7.0.0-q

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

2025-01-29 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| 427

[PATCH 18/19] qemu: add RDP support

2025-01-29 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 19/19] tests: add qemu test

2025-01-29 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

[PATCH 01/19] build-sys: drop -Winline

2025-01-29 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 1/3] Revert "qemu: explicit swtpm state locking"

2024-12-11 Thread marcandre . lureau
From: Marc-André Lureau This reverts commit bb5e26749fe5b5856a3541be2cbe147701e6e121. swtpm-setup doesn't have "tpmstate-lock", only swtpm. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_tpm.c | 11 ++- src/util/virtpm.c | 1 - src/util/virtpm.h | 1 - tests/testutilsq

[PATCH v2 2/3] qemu_tpm: lock the state explicitly when running swtpm

2024-12-11 Thread marcandre . lureau
From: Marc-André Lureau Commit bb5e26749fe5b ("qemu: explicit swtpm state locking") attempted to lock the state, but only for swtpm-setup. The capability "tpmstate-opt-lock" is actually only exposed by swtpm. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- src/qemu/qemu_tpm.c

[PATCH v2 3/3] qemu_tpm: do not delete parent directory for custom source

2024-12-11 Thread marcandre . lureau
From: Marc-André Lureau When the vTPM source path is specified, such as: Do not delete the parent directory, but only the given file/dir. Fixes: commit f1304cc566 ("qemu_tpm: handle file/block storage source") Signed-off-by: Marc-André Lureau --- src/qemu/qemu_tpm.c | 26

[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

[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

[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