[RFC PATCH v7 0/3] Fix virtio console port assignment issue

Aaron M. Brown posted 3 patches 2 weeks, 1 day ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20250919192620.4852-1-aaronmbr@linux.ibm.com
src/conf/domain_addr.c                        | 51 +++++++++++++-----
...rial-autoassign-address.x86_64-latest.args | 42 +++++++++++++++
...erial-autoassign-address.x86_64-latest.xml | 54 +++++++++++++++++++
...nsole-virtio-serial-autoassign-address.xml | 40 ++++++++++++++
tests/qemuxmlconftest.c                       |  1 +
5 files changed, 175 insertions(+), 13 deletions(-)
create mode 100644 tests/qemuxmlconfdata/console-virtio-serial-autoassign-address.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/console-virtio-serial-autoassign-address.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/console-virtio-serial-autoassign-address.xml
[RFC PATCH v7 0/3] Fix virtio console port assignment issue
Posted by Aaron M. Brown 2 weeks, 1 day ago
Changelog:

---
v7:
 - Removed some unnecessary definitions from test xml
 - Moved edge case reservation logic to virDomainVirtioSerialAddrAssign
---
v6:
 - Fixed issue with console auto port index starting from 1 instead of 0
---
v5:
 - Added xml tests to tests/qemuxmlconfdata
 - Fixed virito -> virtio typo in commit message
---
v4:
 - Update commit messages
---
v3:
 - Added Reviewed-By
 - Included CI Results Link
---
v2:
 - Split patch into two commits
 - Added fixes tag
---

This libvirt patch series does the following:
1. fixes an issue with virtio console device port auto assignment on virtio-serial buses
2. updates console port reservation comment and changes the allowZero variable to allowPortZero for clarity
3. Adds tests for virtio console on the vioserial bus

Currently in libvirt, a virtio console device cannot be auto assigned a port number greater than zero on a virtio-serial bus. This leads to port collision errors when adding more than 1 virtio console device on a single virtio-serial bus.

After applying this patch, one can add multiple console ports under a single virtio-serial bus.

Here is a link to CI results for this series: https://gitlab.com/aaronbmalik/libvirt/-/pipelines/2047914492


Aaron M. Brown (3):
  tests: Add console-virtio-serial-autoassign-address tests
  domain_addr.c: Fix virtio console port autoassign on virtio-serial bus
  domain_addr.c: update virtconsole port reservation comment and
    allowZero var

 src/conf/domain_addr.c                        | 51 +++++++++++++-----
 ...rial-autoassign-address.x86_64-latest.args | 42 +++++++++++++++
 ...erial-autoassign-address.x86_64-latest.xml | 54 +++++++++++++++++++
 ...nsole-virtio-serial-autoassign-address.xml | 40 ++++++++++++++
 tests/qemuxmlconftest.c                       |  1 +
 5 files changed, 175 insertions(+), 13 deletions(-)
 create mode 100644 tests/qemuxmlconfdata/console-virtio-serial-autoassign-address.x86_64-latest.args
 create mode 100644 tests/qemuxmlconfdata/console-virtio-serial-autoassign-address.x86_64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/console-virtio-serial-autoassign-address.xml

--
2.39.5 (Apple Git-154)