[PATCH] MAINTAINERS: Add entry for QEMU Guest Agent Windows components

2022-01-05 Thread Kostiantyn Kostiuk
Signed-off-by: Kostiantyn Kostiuk --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f871d759fd..1f255ec874 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2729,6 +2729,14 @@ F: scripts/qemu-guest-agent/ F: tests/unit/test-qga.c T: git

[PATCH 3/5] gqa-win: get_pci_info: Free parent_dev_info properly

2021-12-13 Thread Kostiantyn Kostiuk
In case when the function fails to get parent device data, the parent_dev_info variable will be initialized, but not freed. Signed-off-by: Kostiantyn Kostiuk Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a

[PATCH 1/5] gqa-win: get_pci_info: Clean dev_info if handle is valid

2021-12-13 Thread Kostiantyn Kostiuk
Signed-off-by: Kostiantyn Kostiuk Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 4e84afd83b..3dd74fe225 100644 --- a/qga/commands-win32.c +++ b/qga/commands

[PATCH 2/5] gqa-win: get_pci_info: Use common 'cleanup' label

2021-12-13 Thread Kostiantyn Kostiuk
To prevent memory leaks, always try to free initialized variables. Signed-off-by: Kostiantyn Kostiuk Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands

[PATCH 5/5] gqa-win: get_pci_info: Add g_autofree for few variables

2021-12-13 Thread Kostiantyn Kostiuk
Signed-off-by: Kostiantyn Kostiuk Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 6bde5260e8..96737f33e1 100644 --- a/qga/commands-win32.c +++ b/qga/commands

[PATCH 0/5] gqa-win: get_pci_info: Fix memory leak

2021-12-13 Thread Kostiantyn Kostiuk
This set of patches fixes memory leaks in the get_pci_info function when it fails to get parent device data. In this case the parent_dev_info and the parent_dev_id variables will be initialized, but not freed. Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1958825 Kostiantyn Kostiuk (5

[PATCH 4/5] gqa-win: get_pci_info: Replace 'while' with 2 calls of the function

2021-12-13 Thread Kostiantyn Kostiuk
Microsoft suggests this solution in the documentation: https://docs.microsoft.com/en-us/windows/win32/api/setupapi/nf-setupapi-setupdigetdeviceinterfacedetaila Signed-off-by: Kostiantyn Kostiuk Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 30 -- 1

[PATCH v2 0/6] gqa-win: get_pci_info: Fix memory leak

2021-12-14 Thread Kostiantyn Kostiuk
v2 * Rename label "cleanup" -> "end" * Reorder some patches * Perform small refactoring: split logic to separate functions Kostiantyn Kostiuk (6): gqa-win: get_pci_info: Clean dev_info if handle is valid gqa-win: get_pci_info: Use common 'end' label gqa-win

[PATCH v2 3/6] gqa-win: get_pci_info: Free parent_dev_info properly

2021-12-14 Thread Kostiantyn Kostiuk
In case when the function fails to get parent device data, the parent_dev_info variable will be initialized, but not freed. Signed-off-by: Kostiantyn Kostiuk Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a

[PATCH v2 2/6] gqa-win: get_pci_info: Use common 'end' label

2021-12-14 Thread Kostiantyn Kostiuk
To prevent memory leaks, always try to free initialized variables. Signed-off-by: Kostiantyn Kostiuk Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands

[PATCH v2 4/6] gqa-win: get_pci_info: Split logic to separate functions

2021-12-14 Thread Kostiantyn Kostiuk
Signed-off-by: Kostiantyn Kostiuk Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 161 +++ 1 file changed, 87 insertions(+), 74 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index f6de9e2676..8588fa8633 100644 --- a

[PATCH v2 5/6] gqa-win: get_pci_info: Add g_autofree for few variables

2021-12-14 Thread Kostiantyn Kostiuk
Signed-off-by: Kostiantyn Kostiuk Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 8588fa8633..3092566313 100644 --- a/qga/commands-win32.c +++ b/qga/commands

[PATCH v2 6/6] gqa-win: get_pci_info: Replace 'while' with 2 calls of the function

2021-12-14 Thread Kostiantyn Kostiuk
Microsoft suggests this solution in the documentation: https://docs.microsoft.com/en-us/windows/win32/api/setupapi/nf-setupapi-setupdigetdeviceinterfacedetaila Signed-off-by: Kostiantyn Kostiuk Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 30 -- 1

[PATCH v2 1/6] gqa-win: get_pci_info: Clean dev_info if handle is valid

2021-12-14 Thread Kostiantyn Kostiuk
Signed-off-by: Kostiantyn Kostiuk Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 4e84afd83b..3dd74fe225 100644 --- a/qga/commands-win32.c +++ b/qga/commands

[PATCH 1/1] qga-vss: Use dynamic linking for GLib

2021-02-09 Thread Kostiantyn Kostiuk
details https://gitlab.gnome.org/GNOME/glib/-/issues/692 Signed-off-by: Kostiantyn Kostiuk --- qga/vss-win32/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build index 780c461432..90825edef3 100644 --- a/qga/vss

[PATCH] qga-win: Free GMatchInfo properly

2021-06-10 Thread Kostiantyn Kostiuk
The g_regex_match function creates match_info even if it returns FALSE. So we should always call g_match_info_free. Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 300b87c859

[PATCH v2] qga-win: Free GMatchInfo properly

2021-06-10 Thread Kostiantyn Kostiuk
The g_regex_match function creates match_info even if it returns FALSE. So we should always call g_match_info_free. A better solution is using g_autoptr for match_info variable. Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[RFC 3/4] gqa-win: get_pci_info: Add g_autofree for few variables

2021-08-09 Thread Kostiantyn Kostiuk
Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 724ce76a0e..a8a601776d 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -539,9 +539,9 @@ static

[RFC 1/4] gqa-win: get_pci_info: Clean dev_info if handle is valid

2021-08-09 Thread Kostiantyn Kostiuk
Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 27baf17d6c..2ad8593b82 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -514,7 +514,7

[RFC 4/4] gqa-win: get_pci_info: Free parent_dev_info properly

2021-08-09 Thread Kostiantyn Kostiuk
In case when the function fails to get parent device data, the parent_dev_info variable will be initialized, but not freed. Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qga/commands-win32.c b/qga/commands

[RFC 2/4] gqa-win: get_pci_info: Use common 'cleanup' label

2021-08-09 Thread Kostiantyn Kostiuk
To prevent memory leaks, always try to free initialized variables. Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 2ad8593b82..724ce76a0e

[PATCH] qga-win: Add support of Windows Server 2022 in get-osinfo command

2021-06-21 Thread Kostiantyn Kostiuk
Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 300b87c859..93b08fd4b5 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -2209,9 +2209,10 @@ typedef

[PATCH 2/2] qga-win: Detect Windows 11 by build number

2021-09-14 Thread Kostiantyn Kostiuk
from the registry and will be incorrect until the MS updates the registry. We only can create some workaround and replace 10 to 11. Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/qga/commands-

[PATCH 1/2] qga-win: Detect OS based on Windows 10 by first build number

2021-09-14 Thread Kostiantyn Kostiuk
will work until the new OS release. Signed-off-by: Kostiantyn Kostiuk --- qga/commands-win32.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 4e84afd83b..a8e9d40b31 100644 --- a/qga/commands-win32.c +++

Re: [PATCH v2] qga/vss-win32: Add VSS provider unregistration retry

2025-06-18 Thread Kostiantyn Kostiuk
Reviewed-by: Kostiantyn Kostiuk On Wed, Jun 18, 2025 at 12:18 PM Elizabeth Ashurov wrote: > This commit improves the QGA VSS provider installation flow by attempting > to unregister the VSS provider if it's already > found during installation. This allows for a retry of instal

Re: [PATCH] qga/vss-win32: Add VSS provider unregistration retry

2025-06-18 Thread Kostiantyn Kostiuk
Best Regards, Konstantin Kostiuk. On Tue, Jun 17, 2025 at 8:47 PM Elizabeth Ashurov wrote: > This commit improves the QGA VSS provider installation flow > by attempting to unregister the VSS provider if it's already > found during installation. This allows for a retry of installation > even if

[PATCH] qga-vss: Exit with non-zero code when register fail

2025-06-20 Thread Kostiantyn Kostiuk
registration. This commit forces to change exit code when the VSS provider registration fails. https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/rundll32 Signed-off-by: Kostiantyn Kostiuk --- qga/vss-win32/install.cpp | 5 - 1 file changed, 4 insertions(+), 1

[PATCH] MAINTAINERS: Update Kostiantyn Kostiuk transliteration

2025-06-20 Thread Kostiantyn Kostiuk
Signed-off-by: Kostiantyn Kostiuk --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 94c4076127..3e7ca85c55 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3370,7 +3370,7 @@ T: git https://repo.or.cz/qemu/armbru.git qapi-next

[PULL 1/3] MAINTAINERS: Update Kostiantyn Kostiuk transliteration

2025-07-01 Thread Kostiantyn Kostiuk
Reviewed-by: Yan Vugenfirer Message-ID: <20250620102140.38556-1-kkost...@redhat.com> Signed-off-by: Kostiantyn Kostiuk --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index d1672fda8d..4cfb587a0d 100644 --- a/MAINTAINERS

[PULL 0/3] Misc QGA fixes for 2025-07-01

2025-07-01 Thread Kostiantyn Kostiuk
2025-07-01 Elizabeth Ashurov (1): qga/vss-win32: Add VSS provider unregistration retry Kostiantyn Kostiuk (2): MAINTAINERS: Update Kostiantyn Kostiuk transliteration qga-vss: Exit with non-zero code when register fail MAINTAINERS | 4 ++-- qga/vss-win32/i

[PULL 2/3] qga-vss: Exit with non-zero code when register fail

2025-07-01 Thread Kostiantyn Kostiuk
Signed-off-by: Kostiantyn Kostiuk --- qga/vss-win32/install.cpp | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp index 5cea5bcf74..6ee2f44a10 100644 --- a/qga/vss-win32/install.cpp +++ b/qga/vss-win32/install.cpp @@

[PULL 3/3] qga/vss-win32: Add VSS provider unregistration retry

2025-07-01 Thread Kostiantyn Kostiuk
event inconsistencies between QGA and QGA-VSS versions. Before this commit, QGA can use QGA-VSS from the previous installation. Signed-off-by: Elizabeth Ashurov Reviewed-by: Kostiantyn Kostiuk Message-ID: <20250618091806.170110-1-eashu...@redhat.com> Signed-off-by: Kostiantyn Kostiuk --- qg

[PATCH] util: win32: Write hex value when can't get error message

2025-07-17 Thread Kostiantyn Kostiuk
er changes: {"error": {"class": "GenericError", "desc": "failed to add D:\\ to snapshot set: unknown Windows error 0x8004230e"}} Signed-off-by: Kostiantyn Kostiuk --- util/error.c | 5 + 1 file changed, 5 insertions(+) diff --git a/util/e

Re: [PATCH] util: win32: Write hex value when can't get error message

2025-07-21 Thread Kostiantyn Kostiuk
On Mon, Jul 21, 2025 at 12:22 PM Markus Armbruster wrote: > Kostiantyn Kostiuk writes: > > > On Sat, Jul 19, 2025 at 9:27 AM Markus Armbruster > wrote: > > > >> Kostiantyn Kostiuk writes: > >> > >> > g_win32_error_message - translate a W

Re: [PATCH] util: win32: Write hex value when can't get error message

2025-07-21 Thread Kostiantyn Kostiuk
On Sat, Jul 19, 2025 at 9:27 AM Markus Armbruster wrote: > Kostiantyn Kostiuk writes: > > > g_win32_error_message - translate a Win32 error code > > (as returned by GetLastError()) into the corresponding message. > > > > In the same time, we call error_setg_win32

Re: [PATCH] util: win32: Write hex value when can't get error message

2025-07-28 Thread Kostiantyn Kostiuk
5/7/25 11:59, Kostiantyn Kostiuk wrote: > > Issue reported to GLib https://gitlab.gnome.org/GNOME/glib/-/issues/3740 > > <https://gitlab.gnome.org/GNOME/glib/-/issues/3740> > > PR with fix https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4716 > > <

Re: [PATCH v2 0/4] qga: Doc fixes and improvements

2025-07-28 Thread Kostiantyn Kostiuk
Markus, feel free to do PR with this Reviewed-by: Kostiantyn Kostiuk Best Regards, Konstantin Kostiuk. On Mon, Jul 28, 2025 at 2:19 PM Markus Armbruster wrote: > Markus Armbruster writes: > > > This series touches only doc comments. I'd like to get it into 10.1. > &

Re: [PATCH] util: win32: Write hex value when can't get error message

2025-07-25 Thread Kostiantyn Kostiuk
, Jul 21, 2025 at 2:53 PM Philippe Mathieu-Daudé wrote: > On 21/7/25 12:12, Kostiantyn Kostiuk wrote: > > > > > > On Mon, Jul 21, 2025 at 12:22 PM Markus Armbruster > <mailto:arm...@redhat.com>> wrote: > > > > Kostiantyn Kostiuk > <mailto:

Re: [PATCH] qga: Fix ubsan warning

2025-07-28 Thread Kostiantyn Kostiuk
LGTM On Tue, Jul 29, 2025 at 9:02 AM Thomas Huth wrote: > On 28/07/2025 19.53, Daniel P. Berrangé wrote: > > On Mon, Jul 28, 2025 at 07:30:16PM +0200, Thomas Huth wrote: > >> From: Thomas Huth > >> > >> When compiling QEMU with --enable-ubsan there is a undefined behavior > >> warning when runn

Re: [PATCH v2] qga: Fix ubsan warning

2025-07-30 Thread Kostiantyn Kostiuk
Reviewed-by: Kostiantyn Kostiuk @Thomas Huth Is this fix critical to merge during code freeze? On Wed, Jul 30, 2025 at 10:27 AM Thomas Huth wrote: > From: Thomas Huth > > When compiling QEMU with --enable-ubsan there is a undefined behavior > warning when running "make che

QGA installation issue on Windows

2025-08-04 Thread Kostiantyn Kostiuk
find a proper solution for both Linux and Windows? Best Regards, Kostiantyn Kostiuk.

Re: [PATCH] qga: Fix error handling in system suspend mode causing libvirt to hold lock indefinitely

2025-08-04 Thread Kostiantyn Kostiuk
we should fix systemd_supports_mode instead. Also, setting mode_supported = false does not change anything. In the next step, we will check pmutils_supports_mode and linux_sys_state_supports_mode, and I think this check will pass, so we set mode_supported = true again. Best Regards, Kostiantyn Kostiuk. > } > > -- > 2.43.7 > >