[PATCH v3 00/20] Add qemu RDP server support

marcandre.lureau--- via Devel posted 20 patches 1 month, 1 week ago
docs/formatdomain.rst                         |  25 +-
meson.build                                   |   7 +-
po/POTFILES                                   |   1 +
src/conf/domain_conf.c                        |  28 +-
src/conf/domain_conf.h                        |   5 +-
src/conf/schemas/domaincommon.rng             |  10 +
src/libvirt_private.syms                      |   2 +-
src/qemu/libvirtd_qemu.aug                    |   7 +
src/qemu/meson.build                          |   1 +
src/qemu/qemu.conf.in                         |  31 ++
src/qemu/qemu_capabilities.c                  |  24 +-
src/qemu/qemu_capabilities.h                  |  12 +-
src/qemu/qemu_command.c                       |   8 +-
src/qemu/qemu_conf.c                          |  56 ++-
src/qemu/qemu_conf.h                          |  13 +
src/qemu/qemu_dbus.c                          |  69 ++-
src/qemu/qemu_dbus.h                          |   3 +
src/qemu/qemu_domain.c                        |   1 +
src/qemu/qemu_domain.h                        |   4 +
src/qemu/qemu_driver.c                        |  20 +
src/qemu/qemu_extdevice.c                     |  46 +-
src/qemu/qemu_hotplug.c                       |  51 ++-
src/qemu/qemu_hotplug.h                       |   1 +
src/qemu/qemu_process.c                       | 169 ++++++-
src/qemu/qemu_rdp.c                           | 424 ++++++++++++++++++
src/qemu/qemu_rdp.h                           |  73 +++
src/qemu/qemu_slirp.c                         |   6 -
src/qemu/qemu_validate.c                      |  48 +-
src/qemu/qemu_virtiofs.c                      |  53 +--
src/qemu/test_libvirtd_qemu.aug.in            |   5 +
src/util/virgdbus.h                           |  13 +-
.../qemu_10.0.0-q35.x86_64+amdsev.xml         |   1 +
.../domaincapsdata/qemu_10.0.0-q35.x86_64.xml |   1 +
.../qemu_10.0.0-tcg.x86_64+amdsev.xml         |   1 +
.../domaincapsdata/qemu_10.0.0-tcg.x86_64.xml |   1 +
tests/domaincapsdata/qemu_10.0.0.s390x.xml    |   1 +
.../qemu_10.0.0.x86_64+amdsev.xml             |   1 +
tests/domaincapsdata/qemu_10.0.0.x86_64.xml   |   1 +
.../domaincapsdata/qemu_7.0.0-q35.x86_64.xml  |   1 +
.../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml  |   1 +
tests/domaincapsdata/qemu_7.0.0.x86_64.xml    |   1 +
.../domaincapsdata/qemu_7.1.0-q35.x86_64.xml  |   1 +
.../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml  |   1 +
tests/domaincapsdata/qemu_7.1.0.x86_64.xml    |   1 +
.../qemu_7.2.0-hvf.x86_64+hvf.xml             |   1 +
.../domaincapsdata/qemu_7.2.0-q35.x86_64.xml  |   1 +
.../qemu_7.2.0-tcg.x86_64+hvf.xml             |   1 +
.../domaincapsdata/qemu_7.2.0-tcg.x86_64.xml  |   1 +
tests/domaincapsdata/qemu_7.2.0.ppc.xml       |   1 +
tests/domaincapsdata/qemu_7.2.0.x86_64.xml    |   1 +
.../domaincapsdata/qemu_8.0.0-q35.x86_64.xml  |   1 +
.../domaincapsdata/qemu_8.0.0-tcg.x86_64.xml  |   1 +
tests/domaincapsdata/qemu_8.0.0.x86_64.xml    |   1 +
.../domaincapsdata/qemu_8.1.0-q35.x86_64.xml  |   1 +
.../domaincapsdata/qemu_8.1.0-tcg.x86_64.xml  |   1 +
tests/domaincapsdata/qemu_8.1.0.s390x.xml     |   1 +
tests/domaincapsdata/qemu_8.1.0.x86_64.xml    |   1 +
.../domaincapsdata/qemu_8.2.0-q35.x86_64.xml  |   1 +
.../qemu_8.2.0-tcg-virt.loongarch64.xml       |   1 +
.../domaincapsdata/qemu_8.2.0-tcg.x86_64.xml  |   1 +
.../qemu_8.2.0-virt.aarch64.xml               |   1 +
.../qemu_8.2.0-virt.loongarch64.xml           |   1 +
tests/domaincapsdata/qemu_8.2.0.aarch64.xml   |   1 +
tests/domaincapsdata/qemu_8.2.0.armv7l.xml    |   1 +
tests/domaincapsdata/qemu_8.2.0.s390x.xml     |   1 +
tests/domaincapsdata/qemu_8.2.0.x86_64.xml    |   1 +
.../domaincapsdata/qemu_9.0.0-q35.x86_64.xml  |   1 +
.../domaincapsdata/qemu_9.0.0-tcg.x86_64.xml  |   1 +
tests/domaincapsdata/qemu_9.0.0.sparc.xml     |   1 +
tests/domaincapsdata/qemu_9.0.0.x86_64.xml    |   1 +
.../domaincapsdata/qemu_9.1.0-q35.x86_64.xml  |   1 +
.../qemu_9.1.0-tcg-virt.riscv64.xml           |   1 +
.../domaincapsdata/qemu_9.1.0-tcg.x86_64.xml  |   1 +
.../qemu_9.1.0-virt.riscv64.xml               |   1 +
tests/domaincapsdata/qemu_9.1.0.s390x.xml     |   1 +
tests/domaincapsdata/qemu_9.1.0.x86_64.xml    |   1 +
.../qemu_9.2.0-hvf.aarch64+hvf.xml            |   1 +
.../qemu_9.2.0-q35.x86_64+amdsev.xml          |   1 +
.../domaincapsdata/qemu_9.2.0-q35.x86_64.xml  |   1 +
.../qemu_9.2.0-tcg.x86_64+amdsev.xml          |   1 +
.../domaincapsdata/qemu_9.2.0-tcg.x86_64.xml  |   1 +
tests/domaincapsdata/qemu_9.2.0.s390x.xml     |   1 +
.../qemu_9.2.0.x86_64+amdsev.xml              |   1 +
tests/domaincapsdata/qemu_9.2.0.x86_64.xml    |   1 +
tests/domaincapstest.c                        |   7 +-
.../graphics-rdp.x86_64-latest.args           |  35 ++
.../graphics-rdp.x86_64-latest.xml            |   1 +
tests/qemuxmlconfdata/graphics-rdp.xml        |  43 ++
tests/qemuxmlconftest.c                       |   2 +
tests/testutilsqemu.c                         |  10 +
tools/nss/libvirt_nss_leases.c                |   2 +-
tools/nss/libvirt_nss_macs.c                  |   2 +-
92 files changed, 1234 insertions(+), 137 deletions(-)
create mode 100644 src/qemu/qemu_rdp.c
create mode 100644 src/qemu/qemu_rdp.h
create mode 100644 tests/qemuxmlconfdata/graphics-rdp.x86_64-latest.args
create mode 120000 tests/qemuxmlconfdata/graphics-rdp.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/graphics-rdp.xml
[PATCH v3 00/20] Add qemu RDP server support
Posted by marcandre.lureau--- via Devel 1 month, 1 week ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

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 Buzatu during the QEMU Summer of Code
2023. The project's goal was to develop an out-of-process RDP server using the
-display dbus interface, implemented in Rust. Given that the IronRDP crate
lacked some server support at the time, investments in IronRDP were required.

I finally released an initial v0.1 version of qemu-rdp on crates.io
(https://crates.io/crates/qemu-rdp). That should allow more people to review and
evaluate the state of this work.

On unix systems, with cargo/rust toolchain installed, it should be as easy as
running "cargo install qemu-rdp", apply this patch series for libvirt, set the
"rdp_tls_x509_cert_dir" location for your TLS certificates, and configure a VM
with both dbus & rdp graphics (run "virsh domdisplay DOMAIN" to get the display
connection details).

Thanks for the reviews & feedback!

v3: thanks to Martin Kletzander review
- drop "[PATCH v2 05/21] qemu: fall-through for unsupported graphics" patch
- drop extra \n when reporting dbus-daemon log
- check password != NULL or VIR_ERR_INTERNAL_ERROR
- remove some needless #include/leftover
- remove some needless g_auto pointer
- rebased
- add r-b tags

v2: thanks to Daniel review
- drop extra error report from "qemu: report an error for unsupported graphics"
- replace g_return pre-conditions with ATTRIBUTE_NONNULL
- improve "qemu/dbus: keep a connection to the VM D-Bus" to also reconnect
- use domainLogContext for logging (for virtiofs as well)
- check for qemu-rdp availabilty for setting 'rdp' capability
- make dbus-addr qemu-rdp capability mandatory
- rebased
- add r-b tags

Marc-André Lureau (20):
  build-sys: drop -Winline when optimization=g
  build: fix -Werror=maybe-uninitialized
  qemu-slirp: drop unneeded check for OOM
  util: annotate non-null arguments for virGDBusCallMethod()
  qemu: add rdp state directory
  qemu: add qemu RDP configuration
  conf: parse optional RDP username & password
  conf: generalize virDomainDefHasSpiceGraphics
  qemu: use virDomainDefHasGraphics
  qemu: add RDP ports range allocator
  qemu: limit to one <graphics type='rdp'>
  qemu/virtiofs: use domainLogContext
  qemu/dbus: keep a connection to the VM D-Bus
  qemu/dbus: log daemon stdout/err, use domainLogContext
  qemu: validate RDP configuration
  qemu: add qemu-rdp helper unit
  qemu: pass virQEMUDriverConfig to capabilities
  qemu: add 'rdp' capability if qemu-rdp is available
  qemu: add RDP support
  tests: add qemu <graphics type='rdp'/> test

 docs/formatdomain.rst                         |  25 +-
 meson.build                                   |   7 +-
 po/POTFILES                                   |   1 +
 src/conf/domain_conf.c                        |  28 +-
 src/conf/domain_conf.h                        |   5 +-
 src/conf/schemas/domaincommon.rng             |  10 +
 src/libvirt_private.syms                      |   2 +-
 src/qemu/libvirtd_qemu.aug                    |   7 +
 src/qemu/meson.build                          |   1 +
 src/qemu/qemu.conf.in                         |  31 ++
 src/qemu/qemu_capabilities.c                  |  24 +-
 src/qemu/qemu_capabilities.h                  |  12 +-
 src/qemu/qemu_command.c                       |   8 +-
 src/qemu/qemu_conf.c                          |  56 ++-
 src/qemu/qemu_conf.h                          |  13 +
 src/qemu/qemu_dbus.c                          |  69 ++-
 src/qemu/qemu_dbus.h                          |   3 +
 src/qemu/qemu_domain.c                        |   1 +
 src/qemu/qemu_domain.h                        |   4 +
 src/qemu/qemu_driver.c                        |  20 +
 src/qemu/qemu_extdevice.c                     |  46 +-
 src/qemu/qemu_hotplug.c                       |  51 ++-
 src/qemu/qemu_hotplug.h                       |   1 +
 src/qemu/qemu_process.c                       | 169 ++++++-
 src/qemu/qemu_rdp.c                           | 424 ++++++++++++++++++
 src/qemu/qemu_rdp.h                           |  73 +++
 src/qemu/qemu_slirp.c                         |   6 -
 src/qemu/qemu_validate.c                      |  48 +-
 src/qemu/qemu_virtiofs.c                      |  53 +--
 src/qemu/test_libvirtd_qemu.aug.in            |   5 +
 src/util/virgdbus.h                           |  13 +-
 .../qemu_10.0.0-q35.x86_64+amdsev.xml         |   1 +
 .../domaincapsdata/qemu_10.0.0-q35.x86_64.xml |   1 +
 .../qemu_10.0.0-tcg.x86_64+amdsev.xml         |   1 +
 .../domaincapsdata/qemu_10.0.0-tcg.x86_64.xml |   1 +
 tests/domaincapsdata/qemu_10.0.0.s390x.xml    |   1 +
 .../qemu_10.0.0.x86_64+amdsev.xml             |   1 +
 tests/domaincapsdata/qemu_10.0.0.x86_64.xml   |   1 +
 .../domaincapsdata/qemu_7.0.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_7.0.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_7.1.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_7.1.0.x86_64.xml    |   1 +
 .../qemu_7.2.0-hvf.x86_64+hvf.xml             |   1 +
 .../domaincapsdata/qemu_7.2.0-q35.x86_64.xml  |   1 +
 .../qemu_7.2.0-tcg.x86_64+hvf.xml             |   1 +
 .../domaincapsdata/qemu_7.2.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_7.2.0.ppc.xml       |   1 +
 tests/domaincapsdata/qemu_7.2.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_8.0.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_8.0.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_8.0.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_8.1.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_8.1.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_8.1.0.s390x.xml     |   1 +
 tests/domaincapsdata/qemu_8.1.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_8.2.0-q35.x86_64.xml  |   1 +
 .../qemu_8.2.0-tcg-virt.loongarch64.xml       |   1 +
 .../domaincapsdata/qemu_8.2.0-tcg.x86_64.xml  |   1 +
 .../qemu_8.2.0-virt.aarch64.xml               |   1 +
 .../qemu_8.2.0-virt.loongarch64.xml           |   1 +
 tests/domaincapsdata/qemu_8.2.0.aarch64.xml   |   1 +
 tests/domaincapsdata/qemu_8.2.0.armv7l.xml    |   1 +
 tests/domaincapsdata/qemu_8.2.0.s390x.xml     |   1 +
 tests/domaincapsdata/qemu_8.2.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_9.0.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_9.0.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_9.0.0.sparc.xml     |   1 +
 tests/domaincapsdata/qemu_9.0.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_9.1.0-q35.x86_64.xml  |   1 +
 .../qemu_9.1.0-tcg-virt.riscv64.xml           |   1 +
 .../domaincapsdata/qemu_9.1.0-tcg.x86_64.xml  |   1 +
 .../qemu_9.1.0-virt.riscv64.xml               |   1 +
 tests/domaincapsdata/qemu_9.1.0.s390x.xml     |   1 +
 tests/domaincapsdata/qemu_9.1.0.x86_64.xml    |   1 +
 .../qemu_9.2.0-hvf.aarch64+hvf.xml            |   1 +
 .../qemu_9.2.0-q35.x86_64+amdsev.xml          |   1 +
 .../domaincapsdata/qemu_9.2.0-q35.x86_64.xml  |   1 +
 .../qemu_9.2.0-tcg.x86_64+amdsev.xml          |   1 +
 .../domaincapsdata/qemu_9.2.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_9.2.0.s390x.xml     |   1 +
 .../qemu_9.2.0.x86_64+amdsev.xml              |   1 +
 tests/domaincapsdata/qemu_9.2.0.x86_64.xml    |   1 +
 tests/domaincapstest.c                        |   7 +-
 .../graphics-rdp.x86_64-latest.args           |  35 ++
 .../graphics-rdp.x86_64-latest.xml            |   1 +
 tests/qemuxmlconfdata/graphics-rdp.xml        |  43 ++
 tests/qemuxmlconftest.c                       |   2 +
 tests/testutilsqemu.c                         |  10 +
 tools/nss/libvirt_nss_leases.c                |   2 +-
 tools/nss/libvirt_nss_macs.c                  |   2 +-
 92 files changed, 1234 insertions(+), 137 deletions(-)
 create mode 100644 src/qemu/qemu_rdp.c
 create mode 100644 src/qemu/qemu_rdp.h
 create mode 100644 tests/qemuxmlconfdata/graphics-rdp.x86_64-latest.args
 create mode 120000 tests/qemuxmlconfdata/graphics-rdp.x86_64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/graphics-rdp.xml

-- 
2.47.0
Re: [PATCH v3 00/20] Add qemu RDP server support
Posted by Martin Kletzander via Devel 1 month, 1 week ago
On Sun, Mar 16, 2025 at 12:18:21PM +0400, marcandre.lureau@redhat.com wrote:
>From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
>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 Buzatu during the QEMU Summer of Code
>2023. The project's goal was to develop an out-of-process RDP server using the
>-display dbus interface, implemented in Rust. Given that the IronRDP crate
>lacked some server support at the time, investments in IronRDP were required.
>
>I finally released an initial v0.1 version of qemu-rdp on crates.io
>(https://crates.io/crates/qemu-rdp). That should allow more people to review and
>evaluate the state of this work.
>

My r-b still stands, I believe this can go in, the issue I faced is
clearly only on my side and I'll get to it later. 

>On unix systems, with cargo/rust toolchain installed, it should be as easy as
>running "cargo install qemu-rdp", apply this patch series for libvirt, set the
>"rdp_tls_x509_cert_dir" location for your TLS certificates, and configure a VM
>with both dbus & rdp graphics (run "virsh domdisplay DOMAIN" to get the display
>connection details).
>

The only other issue I have currently is that "cargo install qemu-rdp"
breaks due to some ironrdp stuff on clean fedora 41 install, but again,
that's orthogonal to this patch being in libvirt.

Do you still have the commit rights or should I push this for you?  I
see that all your patches that are newer than roughly 10 years are
merged by someone else =)
Re: [PATCH v3 00/20] Add qemu RDP server support
Posted by Marc-André Lureau via Devel 1 month, 1 week ago
Hi

On Tue, Mar 18, 2025 at 5:48 PM Martin Kletzander <mkletzan@redhat.com> wrote:
>
> On Sun, Mar 16, 2025 at 12:18:21PM +0400, marcandre.lureau@redhat.com wrote:
> >From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> >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 Buzatu during the QEMU Summer of Code
> >2023. The project's goal was to develop an out-of-process RDP server using the
> >-display dbus interface, implemented in Rust. Given that the IronRDP crate
> >lacked some server support at the time, investments in IronRDP were required.
> >
> >I finally released an initial v0.1 version of qemu-rdp on crates.io
> >(https://crates.io/crates/qemu-rdp). That should allow more people to review and
> >evaluate the state of this work.
> >
>
> My r-b still stands, I believe this can go in, the issue I faced is
> clearly only on my side and I'll get to it later.
>
> >On unix systems, with cargo/rust toolchain installed, it should be as easy as
> >running "cargo install qemu-rdp", apply this patch series for libvirt, set the
> >"rdp_tls_x509_cert_dir" location for your TLS certificates, and configure a VM
> >with both dbus & rdp graphics (run "virsh domdisplay DOMAIN" to get the display
> >connection details).
> >
>
> The only other issue I have currently is that "cargo install qemu-rdp"
> breaks due to some ironrdp stuff on clean fedora 41 install, but again,
> that's orthogonal to this patch being in libvirt.

Fwiw, I am trying to package it for fc43. But I compile it daily on
fc41 fine. Would be interested to know what fails. If you build from
the git repos, it is likely that deps break every now and then though,
there is no CI yet.

>
> Do you still have the commit rights or should I push this for you?  I
> see that all your patches that are newer than roughly 10 years are
> merged by someone else =)

Oh, I don't even remember having commit rights! Thus it's probably
better if someone more familiar with the current process does it. I
agree, it's ok to go too, we can solve additional/remaining issues on
top and avoid some rebase pain that way.

thanks!
Re: [PATCH v3 00/20] Add qemu RDP server support
Posted by Martin Kletzander via Devel 1 month, 1 week ago
On Tue, Mar 18, 2025 at 05:57:18PM +0400, Marc-André Lureau wrote:
>Hi
>
>On Tue, Mar 18, 2025 at 5:48 PM Martin Kletzander <mkletzan@redhat.com> wrote:
>>
>> On Sun, Mar 16, 2025 at 12:18:21PM +0400, marcandre.lureau@redhat.com wrote:
>> >From: Marc-André Lureau <marcandre.lureau@redhat.com>
>> >
>> >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 Buzatu during the QEMU Summer of Code
>> >2023. The project's goal was to develop an out-of-process RDP server using the
>> >-display dbus interface, implemented in Rust. Given that the IronRDP crate
>> >lacked some server support at the time, investments in IronRDP were required.
>> >
>> >I finally released an initial v0.1 version of qemu-rdp on crates.io
>> >(https://crates.io/crates/qemu-rdp). That should allow more people to review and
>> >evaluate the state of this work.
>> >
>>
>> My r-b still stands, I believe this can go in, the issue I faced is
>> clearly only on my side and I'll get to it later.
>>
>> >On unix systems, with cargo/rust toolchain installed, it should be as easy as
>> >running "cargo install qemu-rdp", apply this patch series for libvirt, set the
>> >"rdp_tls_x509_cert_dir" location for your TLS certificates, and configure a VM
>> >with both dbus & rdp graphics (run "virsh domdisplay DOMAIN" to get the display
>> >connection details).
>> >
>>
>> The only other issue I have currently is that "cargo install qemu-rdp"
>> breaks due to some ironrdp stuff on clean fedora 41 install, but again,
>> that's orthogonal to this patch being in libvirt.
>
>Fwiw, I am trying to package it for fc43. But I compile it daily on
>fc41 fine. Would be interested to know what fails. If you build from
>the git repos, it is likely that deps break every now and then though,
>there is no CI yet.
>

I'll let you know off-list.

>>
>> Do you still have the commit rights or should I push this for you?  I
>> see that all your patches that are newer than roughly 10 years are
>> merged by someone else =)
>
>Oh, I don't even remember having commit rights! Thus it's probably
>better if someone more familiar with the current process does it. I
>agree, it's ok to go too, we can solve additional/remaining issues on
>top and avoid some rebase pain that way.
>
>thanks!
>

done, you're welcome
Re: [PATCH v3 00/20] Add qemu RDP server support
Posted by Peter Krempa via Devel 1 month, 1 week ago
On Sun, Mar 16, 2025 at 12:18:21 +0400, marcandre.lureau--- via Devel wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> Marc-André Lureau (20):
>   build-sys: drop -Winline when optimization=g
>   build: fix -Werror=maybe-uninitialized
>   qemu-slirp: drop unneeded check for OOM
>   util: annotate non-null arguments for virGDBusCallMethod()
>   qemu: add rdp state directory
>   qemu: add qemu RDP configuration
>   conf: parse optional RDP username & password
>   conf: generalize virDomainDefHasSpiceGraphics
>   qemu: use virDomainDefHasGraphics
>   qemu: add RDP ports range allocator
>   qemu: limit to one <graphics type='rdp'>
>   qemu/virtiofs: use domainLogContext
>   qemu/dbus: keep a connection to the VM D-Bus
>   qemu/dbus: log daemon stdout/err, use domainLogContext
>   qemu: validate RDP configuration
>   qemu: add qemu-rdp helper unit
>   qemu: pass virQEMUDriverConfig to capabilities
>   qemu: add 'rdp' capability if qemu-rdp is available
>   qemu: add RDP support
>   tests: add qemu <graphics type='rdp'/> test

This most likely broke upstream CI. I noticed the following when
debugging something else locally:

 $ valgrind --trace-children=yes --leak-check=full ./tests/qemuxmlconftest


=1007397== 5 bytes in 1 blocks are definitely lost in loss record 10 of 849
==1007397==    at 0x4841866: malloc (vg_replace_malloc.c:446)
==1007397==    by 0x591EC0F: xmlStrndup (in /usr/lib64/libxml2.so.2.12.9)
==1007397==    by 0x495C4D4: virDomainGraphicsAuthDefParseXML (domain_conf.c:11530)
==1007397==    by 0x4971A8F: virDomainGraphicsDefParseXMLRDP (domain_conf.c:11926)
==1007397==    by 0x4971A8F: virDomainGraphicsDefParseXML (domain_conf.c:12229)
==1007397==    by 0x49903C5: virDomainDefParseXML (domain_conf.c:19665)
==1007397==    by 0x4991FD8: virDomainDefParseNode (domain_conf.c:20260)
==1007397==    by 0x49920E0: virDomainDefParse (domain_conf.c:20230)
==1007397==    by 0x11FB54: testQemuConfXMLCommon.constprop.0 (qemuxmlconftest.c:683)
==1007397==    by 0x1210D5: testXMLParse (qemuxmlconftest.c:981)
==1007397==    by 0x121819: virTestRun (testutils.c:143)
==1007397==    by 0x121AA0: virTestRunLog (testutils.c:198)
==1007397==    by 0x10B371: testRun (qemuxmlconftest.c:1022)
==1007397==
==1007397== 5 bytes in 1 blocks are definitely lost in loss record 11 of 849
==1007397==    at 0x4841866: malloc (vg_replace_malloc.c:446)
==1007397==    by 0x591EC0F: xmlStrndup (in /usr/lib64/libxml2.so.2.12.9)
==1007397==    by 0x495C4F7: virDomainGraphicsAuthDefParseXML (domain_conf.c:11535)
==1007397==    by 0x4971A8F: virDomainGraphicsDefParseXMLRDP (domain_conf.c:11926)
==1007397==    by 0x4971A8F: virDomainGraphicsDefParseXML (domain_conf.c:12229)
==1007397==    by 0x49903C5: virDomainDefParseXML (domain_conf.c:19665)
==1007397==    by 0x4991FD8: virDomainDefParseNode (domain_conf.c:20260)
==1007397==    by 0x49920E0: virDomainDefParse (domain_conf.c:20230)
==1007397==    by 0x11FB54: testQemuConfXMLCommon.constprop.0 (qemuxmlconftest.c:683)
==1007397==    by 0x1210D5: testXMLParse (qemuxmlconftest.c:981)
==1007397==    by 0x121819: virTestRun (testutils.c:143)
==1007397==    by 0x121AA0: virTestRunLog (testutils.c:198)
==1007397==    by 0x10B371: testRun (qemuxmlconftest.c:1022)
==1007397==
==1007397== 5 bytes in 1 blocks are definitely lost in loss record 12 of 849
==1007397==    at 0x4841866: malloc (vg_replace_malloc.c:446)
==1007397==    by 0x591EC0F: xmlStrndup (in /usr/lib64/libxml2.so.2.12.9)
==1007397==    by 0x495C4D4: virDomainGraphicsAuthDefParseXML (domain_conf.c:11530)
==1007397==    by 0x4971A8F: virDomainGraphicsDefParseXMLRDP (domain_conf.c:11926)
==1007397==    by 0x4971A8F: virDomainGraphicsDefParseXML (domain_conf.c:12229)
==1007397==    by 0x49903C5: virDomainDefParseXML (domain_conf.c:19665)
==1007397==    by 0x4991FD8: virDomainDefParseNode (domain_conf.c:20260)
==1007397==    by 0x49920E0: virDomainDefParse (domain_conf.c:20230)
==1007397==    by 0x11FFE7: testCompareOutXML2XML (qemuxmlconftest.c:782)
==1007397==    by 0x121819: virTestRun (testutils.c:143)
==1007397==    by 0x121AA0: virTestRunLog (testutils.c:198)
==1007397==    by 0x10B39D: testRun (qemuxmlconftest.c:1024)
==1007397==    by 0x111C1A: mymain (qemuxmlconftest.c:1756)
==1007397==
==1007397== 5 bytes in 1 blocks are definitely lost in loss record 13 of 849
==1007397==    at 0x4841866: malloc (vg_replace_malloc.c:446)
==1007397==    by 0x591EC0F: xmlStrndup (in /usr/lib64/libxml2.so.2.12.9)
==1007397==    by 0x495C4F7: virDomainGraphicsAuthDefParseXML (domain_conf.c:11535)
==1007397==    by 0x4971A8F: virDomainGraphicsDefParseXMLRDP (domain_conf.c:11926)
==1007397==    by 0x4971A8F: virDomainGraphicsDefParseXML (domain_conf.c:12229)
==1007397==    by 0x49903C5: virDomainDefParseXML (domain_conf.c:19665)
==1007397==    by 0x4991FD8: virDomainDefParseNode (domain_conf.c:20260)
==1007397==    by 0x49920E0: virDomainDefParse (domain_conf.c:20230)
==1007397==    by 0x11FFE7: testCompareOutXML2XML (qemuxmlconftest.c:782)
==1007397==    by 0x121819: virTestRun (testutils.c:143)
==1007397==    by 0x121AA0: virTestRunLog (testutils.c:198)
==1007397==    by 0x10B39D: testRun (qemuxmlconftest.c:1024)
==1007397==    by 0x111C1A: mymain (qemuxmlconftest.c:1756)
Re: [PATCH v3 00/20] Add qemu RDP server support
Posted by Ján Tomko via Devel 1 month, 1 week ago
On a Tuesday in 2025, Peter Krempa via Devel wrote:
>On Sun, Mar 16, 2025 at 12:18:21 +0400, marcandre.lureau--- via Devel wrote:
>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>> Marc-André Lureau (20):
>>   build-sys: drop -Winline when optimization=g
>>   build: fix -Werror=maybe-uninitialized
>>   qemu-slirp: drop unneeded check for OOM
>>   util: annotate non-null arguments for virGDBusCallMethod()
>>   qemu: add rdp state directory
>>   qemu: add qemu RDP configuration
>>   conf: parse optional RDP username & password
>>   conf: generalize virDomainDefHasSpiceGraphics
>>   qemu: use virDomainDefHasGraphics
>>   qemu: add RDP ports range allocator
>>   qemu: limit to one <graphics type='rdp'>
>>   qemu/virtiofs: use domainLogContext
>>   qemu/dbus: keep a connection to the VM D-Bus
>>   qemu/dbus: log daemon stdout/err, use domainLogContext
>>   qemu: validate RDP configuration
>>   qemu: add qemu-rdp helper unit
>>   qemu: pass virQEMUDriverConfig to capabilities
>>   qemu: add 'rdp' capability if qemu-rdp is available
>>   qemu: add RDP support
>>   tests: add qemu <graphics type='rdp'/> test
>
>This most likely broke upstream CI. I noticed the following when
>debugging something else locally:
>
> $ valgrind --trace-children=yes --leak-check=full ./tests/qemuxmlconftest
>

Fixed now:

commit 815c22a3a79a6dac7abefff050bb2d5157001985

     conf: also free auth for rdp in virDomainGraphicsDefFree

Jano