[PATCH] virsh: completer for --type of commands find-storage-pool-sources and find-storage-pool-sources-as

2024-02-14 Thread Adam Julis
Signed-off-by: Adam Julis --- tools/virsh-completer-pool.c | 11 +++ tools/virsh-completer-pool.h | 5 + tools/virsh-pool.c | 2 ++ 3 files changed, 18 insertions(+) diff --git a/tools/virsh-completer-pool.c b/tools/virsh-completer-pool.c index 0600394411..1081e5c10c

[PATCH v2] virsh-completer: modify and fix bug in virshPoolTypeCompleter, now used for more commands

2024-02-20 Thread Adam Julis
Signed-off-by: Adam Julis --- v2: - instead new completer is used already existing virshPoolTypeCompleter - added flag VIRSH_POOL_TYPE_COMPLETER_COMMA for the completer - fixed bug in pool-list --type command v1: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message

Re: [PATCH v2] virsh-completer: modify and fix bug in virshPoolTypeCompleter, now used for more commands

2024-02-20 Thread Adam Julis
On 2/20/24 10:31, Adam Julis wrote: Signed-off-by: Adam Julis --- v2: - instead new completer is used already existing virshPoolTypeCompleter - added flag VIRSH_POOL_TYPE_COMPLETER_COMMA for the completer - fixed bug in pool-list --type command v1: https://lists.libvirt.org/archives/list

[PATCH] virfile: switch to virReportSystemError in VIR_CLOSE() cond.

2024-02-22 Thread Adam Julis
VIR_CLOSE also set errno, so it's not nessesary use virReportError with explicit error code Signed-off-by: Adam Julis --- src/util/virfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 9463833d31..deaf4555fd 100644 ---

[PATCH] virsh: Fix overflow error of freepages command

2024-03-05 Thread Adam Julis
Trying to print pages of a size larger than the UINT_MAX of the given platform, a system error was printed, but this is a legitimate request, fixed Signed-off-by: Adam Julis --- tools/virsh-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-host.c b/tools

[PATCH] virsh: Fix overflow error of freepages command

2024-03-05 Thread Adam Julis
: https://issues.redhat.com/browse/RHEL-23608 Signed-off-by: Adam Julis --- tools/virsh-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-host.c b/tools/virsh-host.c index 6c14be865f..5a934d7a7f 100644 --- a/tools/virsh-host.c +++ b/tools/virsh-host.c @@ -335,7

[PATCH] virt-admin: Fix segfault when libvirtd dies

2024-03-19 Thread Adam Julis
vshAdmCatchDisconnect requires non-NULL structure vshControl for getting connection name (stored at opaque), but virAdmConnectRegisterCloseCallback at vshAdmConnect called it with NULL. Signed-off-by: Adam Julis --- tools/virt-admin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] qemuDomainChangeNet: Error when boot index changes in live XML

2024-03-22 Thread Adam Julis
error. Resolves: https://issues.redhat.com/browse/RHEL-23416 Fixies: Commit hash aa3e07caec6179dfa6479deab14a21a493637d53 Signed-off-by: Adam Julis --- src/qemu/qemu_hotplug.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index b9c502613c

[PATCH] qemu_saveimage: add zstd to supported compression formats

2024-04-26 Thread Adam Julis
Extend the list of supported formats, update and clarify comment in qemu.conf.in (removed misleading sentence about the order of compression format types). Signed-off-by: Adam Julis --- libvirt.spec.in | 1 + src/qemu/qemu.conf.in | 7 +++ src/qemu/qemu_saveimage.c | 2 ++ 3

[PATCH] conf: add validation of potential dependencies

2024-06-17 Thread Adam Julis
virDomainDefValidate is added at the end. Signed-off-by: Adam Julis --- src/qemu/qemu_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e2698c7924..67b9778c67 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6869,6 +6869,9

[PATCH 2/2] qemu: implement iommu coldplug/unplug

2024-06-17 Thread Adam Julis
Resolves: https://issues.redhat.com/browse/RHEL-23833 Signed-off-by: Adam Julis --- src/qemu/qemu_driver.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 67b9778c67..74d5e3bb86 100644 --- a/src/qemu

[PATCH 0/2] qemu: implement iommu coldplug/unplug

2024-06-18 Thread Adam Julis
Adam Julis (2): syms: Properly export virDomainIOMMUDefFree() qemu: implement iommu coldplug/unplug src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 20 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) -- 2.45.0

[PATCH 1/2] syms: Properly export virDomainIOMMUDefFree()

2024-06-18 Thread Adam Julis
While the function is exported via header, the symbol itself was not. Signed-off-by: Adam Julis --- src/libvirt_private.syms | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 653c84a520..8d760aca04 100644 --- a/src/libvirt_private.syms

[PATCH 2/2] qemu: implement iommu coldplug/unplug

2024-06-18 Thread Adam Julis
Resolves: https://issues.redhat.com/browse/RHEL-23833 Signed-off-by: Adam Julis --- src/qemu/qemu_driver.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 67b9778c67..74d5e3bb86 100644 --- a/src/qemu

[PATCH] conf: Drop unused declaration

2024-06-19 Thread Adam Julis
Remove unused declaration of the virDomainDiskFindByBusAndDst(). Signed-off-by: Adam Julis --- src/conf/domain_conf.h | 4 1 file changed, 4 deletions(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index a06f015444..cdab6ef2da 100644 --- a/src/conf/domain_conf.h +++ b/src

[PATCH] qemuDomainDiskChangeSupported: Fill in missing check

2024-06-21 Thread Adam Julis
The attribute 'discard_no_unref' is not allowed to be changed while the virtual machine is running. Resolves: https://issues.redhat.com/browse/RHEL-37542 Signed-off-by: Adam Julis --- src/qemu/qemu_domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_domain.c

[PATCH] qemuDomainDiskChangeSupported: Fill in missing check

2024-06-26 Thread Adam Julis
Any modification of iothreads attribute is prohibit, the original setup must be identical with updated version of xml. Resolves: https://issues.redhat.com/browse/RHEL-23607 Signed-off-by: Adam Julis --- src/qemu/qemu_domain.c | 47 ++ 1 file changed, 47

[PATCH] qemuDomainChangeNet: forbid changing portgroup

2024-06-28 Thread Adam Julis
While changing the portgroup attribute causes incorrect behavior, this option is disabled for hot-plug. Resolves: https://issues.redhat.com/browse/RHEL-7299 Signed-off-by: Adam Julis --- src/qemu/qemu_hotplug.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b

[PATCH] qemuDomainChangeNet: forbid changing portgroup

2024-07-01 Thread Adam Julis
-by: Adam Julis --- src/qemu/qemu_hotplug.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 4a3f4f657e..08ca7ab973 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -3937,6 +3937,13 @@ qemuDomainChangeNet

[PATCH] domain_conf: comment not match the code below

2024-07-04 Thread Adam Julis
The outdated comment refers to a non-existent member in the virDomainObj structure. Signed-off-by: Adam Julis --- src/conf/domain_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 7033b4e9fe..115862bbde 100644

[PATCH] network: allow "modify" option for DNS hostname

2024-07-09 Thread Adam Julis
datetest.c contain replacements of an existing DNS-Host record and failure due to non-existing record. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/639 Signed-off-by: Adam Julis --- src/conf/network_conf.c | 28 ++- .../dns-host-modify-not-ex

[PATCH] network: allow "modify" option for DNS-Srv records

2024-07-09 Thread Adam Julis
rt/libvirt/-/issues/639 Signed-off-by: Adam Julis --- src/conf/network_conf.c | 27 ++- .../srv-not-existing.xml | 1 + .../srv-record-modify-few.xml | 1 + .../nat-network-dns-srv-modify-few.xml| 26 +++

[PATCH] network: allow "modify" option for DNS-Txt records

2024-07-09 Thread Adam Julis
n-existing record. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/639 Signed-off-by: Adam Julis --- src/conf/network_conf.c | 18 - .../dns-txt-record-modify-fail.xml| 1 + .../dns-txt-record-modify-success.xml | 1 + .../nat-network-dns-

[PATCH] conf: virtiofs: add rlimit_nofile element

2024-07-16 Thread Adam Julis
Add an element to configure the rlimit nofile size: ... ... Non-positive values are forbidden in 'domaincommon.rng'. Added separate test file, created by modifying the 'vhost-user-fs-fd-memory.xml'. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/485 Signe

[PATCH] qemu: virtiofs: format --rlimit-nofile

2024-07-16 Thread Adam Julis
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/485 Signed-off-by: Adam Julis --- src/qemu/qemu_virtiofs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c index 0e3c7dbb58..703f1226a2 100644 --- a/src/qemu/qemu_virtiofs.c +++ b/src

[PATCH] vmx: Ensure unique disk targets when parsing

2024-07-19 Thread Adam Julis
. Because assigned addresses of disks are generated from their indexes, for every changed SATA disk is called virDomainDiskDefAssignAddress() with the updated value. The corresponding tests have been modified to match the index changes. Signed-off-by: Adam Julis --- src

[PATCH] virtiofs: rename member to 'openfiles' for clarity

2024-07-23 Thread Adam Julis
New element 'openfiles' had confusing name. Since the patch with this new element wasn't propagate yet, old name ('rlimit_nofile') was changed. ... ... Signed-off-by: Adam Julis --- docs/formatdomain.rst | 6 +++--

[PATCH] qemuDomainDiskChangeSupported: Add missing iothreads check

2024-07-26 Thread Adam Julis
GSList of iothreads is not allowed to be changed while the virtual machine is running. Resolves: https://issues.redhat.com/browse/RHEL-23607 Signed-off-by: Adam Julis --- While the qemuDomainDiskChangeSupported() design primarily uses its macros (CHECK_EQ and CHECK_STREQ_NULLABLE), the logic for

[PATCH v2] vmx: Ensure unique disk targets when parsing

2024-07-26 Thread Adam Julis
is called virDomainDiskDefAssignAddress() with the updated value. The corresponding tests have been modified to match the index changes. Signed-off-by: Adam Julis --- Since previous version in mailing list was complicated for trying to preserve the indexes of SCSI and previous tests, this one going to straightforward

[PATCH] Revert "network: allow "modify" option for DNS-Srv records"

2024-08-05 Thread Adam Julis
This reverts commit cf934c87cca32149675020ea595712aad25978e6. The matching logic is flawed and it would complicate support of this command. Signed-off-by: Adam Julis --- See discussion: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/6VV6ZAFNGUYUIQZGNS3PZ2FN64NPHXBT

[PATCH] network: NULL check for "modify" DNS-txt records

2024-08-06 Thread Adam Julis
The "modify" command allowed to replace an existing record, now checks for the NULL string in the new value and throw error if found. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/655 Signed-off-by: Adam Julis --- src/conf/network_conf.c | 7 +++ 1 file changed, 7

[PATCH] network: fix crashing "modify" option for hostname

2024-08-06 Thread Adam Julis
The original condition caused (after adding modify option) possibly access to not allocated memory. For consistency added new check for multiple same records. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/654 Signed-off-by: Adam Julis --- src/conf/network_conf.c | 9 - 1 file

[PATCH v2] lxc: fix variable storage order before call

2024-10-15 Thread Adam Julis
virDomainConfNWFilterInstantiate() was called without updated net->ifname, it caused in some cases throwing error message. If function failed, change is reverted. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/658 Signed-off-by: Adam Julis --- src/lxc/lxc_process.c |

[PATCH] lxc: fix variable storage order before call

2024-10-10 Thread Adam Julis
virDomainConfNWFilterInstantiate() was called without updated net->ifname, it caused in some cases throwing error message. If function failed, change is reverted. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/658 Signed-off-by: Adam Julis --- src/lxc/lxc_process.c |

[PATCH] qemu: add hook script event "stop"

2024-09-20 Thread Adam Julis
The "stop" hook is called when the process of stopping a guest started and it is known that the process can be completed (e.g. the guest is still active). Resolves: https://gitlab.com/libvirt/libvirt/-/issues/647 Signed-off-by: Adam Julis --- docs/hooks.rst | 14 +

[PATCH] conf: Restrict model type to enum members

2025-01-08 Thread Adam Julis
ated to support them. Resolves: https://issues.redhat.com/browse/RHEL-72082 Signed-off-by: Adam Julis --- I'm not sure if the virtio-net-pci should be in this enum, since its not located in qemu repo in hw/net/ but in hw/virtio/. When I manually tested it, the qemu this option supported. The l

[PATCH v2] Support IDE/SATA disk 'product' parameter

2024-12-30 Thread Adam Julis
s://gitlab.com/libvirt/libvirt/-/issues/697 Signed-off-by: Adam Julis --- Changes to v1: - introduce new variables model and product for being consistent in orders of commands - modified test file docs/formatdomain.rst | 7 ++-- src/qemu/qemu_command.c

[PATCH v2] qemu: introduce load qemu.conf for "virt-qemu-run"

2025-01-31 Thread Adam Julis
properly backed up and restored in case of a permanent folder. The custom qemu.conf is always removed when the program exits. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/723 Signed-off-by: Adam Julis --- Changes to v1: - formatting - g_strdup - deleted redundant variables, cleanup - naming

[PATCH] glibcompat: Updating "backport" 'g_string_replace'

2025-01-29 Thread Adam Julis
Update the vir_g_string_replace with following commits from glib: c9e48947e gstring: Fix a heap buffer overflow in the new g_string_replace() code e8517e777 remove quadratic behavior in g_string_replace Signed-off-by: Adam Julis --- src/util/glibcompat.c | 125

[PATCH] Support IDE/SATA disk 'product' parameter

2024-12-20 Thread Adam Julis
es: https://gitlab.com/libvirt/libvirt/-/issues/697 Signed-off-by: Adam Julis --- docs/formatdomain.rst | 7 ++-- src/qemu/qemu_command.c | 11 +- src/qemu/qemu_validate.c | 14 ++-- ...disk-product-build-error.x86_64-la

[PATCH v3] Support IDE/SATA disk 'product' parameter

2025-01-18 Thread Adam Julis
x27;product' parameter is different in SCSI (16 chars) and ATA/SATA (40 chars). Resolves: https://gitlab.com/libvirt/libvirt/-/issues/697 Signed-off-by: Adam Julis --- Changes to v2: - doc (mainly mentioned the different length of SCSI and SATA/ATA) - modified schemas (for supporting lon

[PATCH] qemu: introduce load qemu.conf for "virt-qemu-run"

2025-01-28 Thread Adam Julis
properly backed up and restored in case of a permanent folder. The custom qemu.conf is always removed when the program exits. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/723 Signed-off-by: Adam Julis --- docs/manpages/virt-qemu-run.rst | 9 +++ src/qemu/qemu_shim.c| 121

[PATCH] secret: Check length of value in secret object

2025-01-14 Thread Adam Julis
Ensure that the value in the secret object is validated not only for NULL but also for its size. An empty value may not always be NULL, if it has been manually deleted from the .base64 file. Signed-off-by: Adam Julis --- src/conf/virsecretobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] virtiofs: allow read only mode

2025-01-03 Thread Adam Julis
Resolves: https://issues.redhat.com/browse/RHEL-72192 Signed-off-by: Adam Julis --- docs/formatdomain.rst | 2 +- src/qemu/qemu_validate.c | 11 - src/qemu/qemu_virtiofs.c | 3 ++ .../vhost-user-fs-readonly.x86_64

[PATCH v2] conf: check size of secret file for secret object

2025-01-15 Thread Adam Julis
ected (NULL). Signed-off-by: Adam Julis --- src/conf/virsecretobj.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c index 455798d414..66270e2751 100644 --- a/src/conf/virsecretobj.c +++ b/src/conf/virsecretobj.c @@ -836,6 +8