All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/9] qemu-ga-win patches
@ 2022-01-10 13:46 Konstantin Kostiuk
  2022-01-10 13:46 ` [PULL 1/9] MAINTAINERS: Add entry for QEMU Guest Agent Windows components Konstantin Kostiuk
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: Konstantin Kostiuk @ 2022-01-10 13:46 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

The following changes since commit df722e33d5da26ea8604500ca8f509245a0ea524:

  Merge tag 'bsd-user-arm-pull-request' of gitlab.com:bsdimp/qemu into staging (2022-01-08 09:37:59 -0800)

are available in the Git repository at:

  https://github.com/kostyanf14/qemu.git tags/qga-win32-pull-2022-01-10

for you to fetch changes up to 206ce9699fae1f631ac74b7e1115db2affc759fd:

  qga-win: Detect Windows 11 by build number (2022-01-10 13:05:25 +0000)

----------------------------------------------------------------
qemu-ga-win patches

* Fix memory leak in get_pci_info function
* Add support for Windows 11 in guest-get-osinfo command


Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>

----------------------------------------------------------------
Kostiantyn Kostiuk (9):
      MAINTAINERS: Add entry for QEMU Guest Agent Windows components
      gqa-win: get_pci_info: Clean dev_info if handle is valid
      gqa-win: get_pci_info: Use common 'end' label
      gqa-win: get_pci_info: Free parent_dev_info properly
      gqa-win: get_pci_info: Split logic to separate functions
      gqa-win: get_pci_info: Add g_autofree for few variables
      gqa-win: get_pci_info: Replace 'while' with 2 calls of the function
      qga-win: Detect OS based on Windows 10 by first build number
      qga-win: Detect Windows 11 by build number

 MAINTAINERS          |   8 ++
 qga/commands-win32.c | 274 +++++++++++++++++++++++++++++----------------------
 2 files changed, 166 insertions(+), 116 deletions(-)

--
2.25.1



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PULL 1/9] MAINTAINERS: Add entry for QEMU Guest Agent Windows components
  2022-01-10 13:46 [PULL 0/9] qemu-ga-win patches Konstantin Kostiuk
@ 2022-01-10 13:46 ` Konstantin Kostiuk
  2022-01-10 13:46 ` [PULL 2/9] gqa-win: get_pci_info: Clean dev_info if handle is valid Konstantin Kostiuk
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Konstantin Kostiuk @ 2022-01-10 13:46 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Michael Roth <michael.roth@amd.com>
---
 MAINTAINERS | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index c98a61caee..391904bc60 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2737,6 +2737,14 @@ F: scripts/qemu-guest-agent/
 F: tests/unit/test-qga.c
 T: git https://github.com/mdroth/qemu.git qga

+QEMU Guest Agent Win32
+M: Kostiantyn Kostiuk <kkostiuk@redhat.com>
+S: Maintained
+F: qga/*win32*
+F: qga/vss-win32/
+F: qga/installer/
+T: git https://github.com/kostyanf14/qemu.git qga-win32
+
 QOM
 M: Paolo Bonzini <pbonzini@redhat.com>
 R: Daniel P. Berrange <berrange@redhat.com>
--
2.25.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PULL 2/9] gqa-win: get_pci_info: Clean dev_info if handle is valid
  2022-01-10 13:46 [PULL 0/9] qemu-ga-win patches Konstantin Kostiuk
  2022-01-10 13:46 ` [PULL 1/9] MAINTAINERS: Add entry for QEMU Guest Agent Windows components Konstantin Kostiuk
@ 2022-01-10 13:46 ` Konstantin Kostiuk
  2022-01-10 13:46 ` [PULL 3/9] gqa-win: get_pci_info: Use common 'end' label Konstantin Kostiuk
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Konstantin Kostiuk @ 2022-01-10 13:46 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Kostiantyn Kostiuk <konstantin@daynix.com>

Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
---
 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-win32.c
@@ -514,7 +514,7 @@ DEFINE_GUID(GUID_DEVINTERFACE_STORAGEPORT,

 static GuestPCIAddress *get_pci_info(int number, Error **errp)
 {
-    HDEVINFO dev_info;
+    HDEVINFO dev_info = INVALID_HANDLE_VALUE;
     SP_DEVINFO_DATA dev_info_data;
     SP_DEVICE_INTERFACE_DATA dev_iface_data;
     HANDLE dev_file;
@@ -749,7 +749,9 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
     }

 free_dev_info:
-    SetupDiDestroyDeviceInfoList(dev_info);
+    if (dev_info != INVALID_HANDLE_VALUE) {
+        SetupDiDestroyDeviceInfoList(dev_info);
+    }
 out:
     return pci;
 }
--
2.25.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PULL 3/9] gqa-win: get_pci_info: Use common 'end' label
  2022-01-10 13:46 [PULL 0/9] qemu-ga-win patches Konstantin Kostiuk
  2022-01-10 13:46 ` [PULL 1/9] MAINTAINERS: Add entry for QEMU Guest Agent Windows components Konstantin Kostiuk
  2022-01-10 13:46 ` [PULL 2/9] gqa-win: get_pci_info: Clean dev_info if handle is valid Konstantin Kostiuk
@ 2022-01-10 13:46 ` Konstantin Kostiuk
  2022-01-10 13:46 ` [PULL 4/9] gqa-win: get_pci_info: Free parent_dev_info properly Konstantin Kostiuk
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Konstantin Kostiuk @ 2022-01-10 13:46 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Kostiantyn Kostiuk <konstantin@daynix.com>

To prevent memory leaks, always try to free initialized variables.

Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
---
 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 3dd74fe225..93c5375132 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -532,7 +532,7 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
                                    DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
     if (dev_info == INVALID_HANDLE_VALUE) {
         error_setg_win32(errp, GetLastError(), "failed to get devices tree");
-        goto out;
+        goto end;
     }

     g_debug("enumerating devices");
@@ -562,7 +562,7 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
                 } else {
                     error_setg_win32(errp, GetLastError(),
                                      "failed to get device interfaces");
-                    goto free_dev_info;
+                    goto end;
                 }
             }

@@ -576,7 +576,7 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
                 CloseHandle(dev_file);
                 error_setg_win32(errp, GetLastError(),
                                  "failed to get device slot number");
-                goto free_dev_info;
+                goto end;
             }

             CloseHandle(dev_file);
@@ -586,7 +586,7 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
         } else {
             error_setg_win32(errp, GetLastError(),
                              "failed to get device interfaces");
-            goto free_dev_info;
+            goto end;
         }

         g_debug("found device slot %d. Getting storage controller", number);
@@ -603,7 +603,7 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
                 } else {
                     error_setg_win32(errp, GetLastError(),
                                      "failed to get device instance ID");
-                    goto out;
+                    goto end;
                 }
             }

@@ -617,14 +617,14 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
                 g_error("CM_Locate_DevInst failed with code %lx", cr);
                 error_setg_win32(errp, GetLastError(),
                                  "failed to get device instance");
-                goto out;
+                goto end;
             }
             cr = CM_Get_Parent(&parent_dev_inst, dev_inst, 0);
             if (cr != CR_SUCCESS) {
                 g_error("CM_Get_Parent failed with code %lx", cr);
                 error_setg_win32(errp, GetLastError(),
                                  "failed to get parent device instance");
-                goto out;
+                goto end;
             }

             cr = CM_Get_Device_ID_Size(&dev_id_size, parent_dev_inst, 0);
@@ -632,7 +632,7 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
                 g_error("CM_Get_Device_ID_Size failed with code %lx", cr);
                 error_setg_win32(errp, GetLastError(),
                                  "failed to get parent device ID length");
-                goto out;
+                goto end;
             }

             ++dev_id_size;
@@ -647,7 +647,7 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
                 g_error("CM_Get_Device_ID failed with code %lx", cr);
                 error_setg_win32(errp, GetLastError(),
                                  "failed to get parent device ID");
-                goto out;
+                goto end;
             }
         }

@@ -661,14 +661,14 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
         if (parent_dev_info == INVALID_HANDLE_VALUE) {
             error_setg_win32(errp, GetLastError(),
                              "failed to get parent device");
-            goto out;
+            goto end;
         }

         parent_dev_info_data.cbSize = sizeof(SP_DEVINFO_DATA);
         if (!SetupDiEnumDeviceInfo(parent_dev_info, 0, &parent_dev_info_data)) {
             error_setg_win32(errp, GetLastError(),
                            "failed to get parent device data");
-            goto out;
+            goto end;
         }

         for (j = 0;
@@ -748,11 +748,10 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
         break;
     }

-free_dev_info:
+end:
     if (dev_info != INVALID_HANDLE_VALUE) {
         SetupDiDestroyDeviceInfoList(dev_info);
     }
-out:
     return pci;
 }

--
2.25.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PULL 4/9] gqa-win: get_pci_info: Free parent_dev_info properly
  2022-01-10 13:46 [PULL 0/9] qemu-ga-win patches Konstantin Kostiuk
                   ` (2 preceding siblings ...)
  2022-01-10 13:46 ` [PULL 3/9] gqa-win: get_pci_info: Use common 'end' label Konstantin Kostiuk
@ 2022-01-10 13:46 ` Konstantin Kostiuk
  2022-01-10 13:46 ` [PULL 5/9] gqa-win: get_pci_info: Split logic to separate functions Konstantin Kostiuk
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Konstantin Kostiuk @ 2022-01-10 13:46 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Kostiantyn Kostiuk <konstantin@daynix.com>

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 <konstantin@daynix.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
---
 qga/commands-win32.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 93c5375132..f6de9e2676 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -515,6 +515,8 @@ DEFINE_GUID(GUID_DEVINTERFACE_STORAGEPORT,
 static GuestPCIAddress *get_pci_info(int number, Error **errp)
 {
     HDEVINFO dev_info = INVALID_HANDLE_VALUE;
+    HDEVINFO parent_dev_info = INVALID_HANDLE_VALUE;
+
     SP_DEVINFO_DATA dev_info_data;
     SP_DEVICE_INTERFACE_DATA dev_iface_data;
     HANDLE dev_file;
@@ -542,7 +544,6 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
         PSP_DEVICE_INTERFACE_DETAIL_DATA pdev_iface_detail_data = NULL;
         STORAGE_DEVICE_NUMBER sdn;
         char *parent_dev_id = NULL;
-        HDEVINFO parent_dev_info;
         SP_DEVINFO_DATA parent_dev_info_data;
         DWORD j;
         DWORD size = 0;
@@ -744,11 +745,13 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
                 break;
             }
         }
-        SetupDiDestroyDeviceInfoList(parent_dev_info);
         break;
     }
 
 end:
+    if (parent_dev_info != INVALID_HANDLE_VALUE) {
+        SetupDiDestroyDeviceInfoList(parent_dev_info);
+    }
     if (dev_info != INVALID_HANDLE_VALUE) {
         SetupDiDestroyDeviceInfoList(dev_info);
     }
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PULL 5/9] gqa-win: get_pci_info: Split logic to separate functions
  2022-01-10 13:46 [PULL 0/9] qemu-ga-win patches Konstantin Kostiuk
                   ` (3 preceding siblings ...)
  2022-01-10 13:46 ` [PULL 4/9] gqa-win: get_pci_info: Free parent_dev_info properly Konstantin Kostiuk
@ 2022-01-10 13:46 ` Konstantin Kostiuk
  2022-01-10 13:46 ` [PULL 6/9] gqa-win: get_pci_info: Add g_autofree for few variables Konstantin Kostiuk
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Konstantin Kostiuk @ 2022-01-10 13:46 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Kostiantyn Kostiuk <konstantin@daynix.com>

Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
---
 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/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -512,6 +512,92 @@ DEFINE_GUID(GUID_DEVINTERFACE_STORAGEPORT,
         0x2accfe60L, 0xc130, 0x11d2, 0xb0, 0x82,
         0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
 
+static void get_pci_address_for_device(GuestPCIAddress *pci,
+                                       HDEVINFO dev_info)
+{
+    SP_DEVINFO_DATA dev_info_data;
+    DWORD j;
+    DWORD size;
+    bool partial_pci = false;
+
+    dev_info_data.cbSize = sizeof(SP_DEVINFO_DATA);
+
+    for (j = 0;
+         SetupDiEnumDeviceInfo(dev_info, j, &dev_info_data);
+         j++) {
+        DWORD addr, bus, ui_slot, type;
+        int func, slot;
+        size = sizeof(DWORD);
+
+        /*
+        * There is no need to allocate buffer in the next functions. The
+        * size is known and ULONG according to
+        * https://msdn.microsoft.com/en-us/library/windows/hardware/ff543095(v=vs.85).aspx
+        */
+        if (!SetupDiGetDeviceRegistryProperty(
+                dev_info, &dev_info_data, SPDRP_BUSNUMBER,
+                &type, (PBYTE)&bus, size, NULL)) {
+            debug_error("failed to get PCI bus");
+            bus = -1;
+            partial_pci = true;
+        }
+
+        /*
+        * The function retrieves the device's address. This value will be
+        * transformed into device function and number
+        */
+        if (!SetupDiGetDeviceRegistryProperty(
+                dev_info, &dev_info_data, SPDRP_ADDRESS,
+                &type, (PBYTE)&addr, size, NULL)) {
+            debug_error("failed to get PCI address");
+            addr = -1;
+            partial_pci = true;
+        }
+
+        /*
+        * This call returns UINumber of DEVICE_CAPABILITIES structure.
+        * This number is typically a user-perceived slot number.
+        */
+        if (!SetupDiGetDeviceRegistryProperty(
+                dev_info, &dev_info_data, SPDRP_UI_NUMBER,
+                &type, (PBYTE)&ui_slot, size, NULL)) {
+            debug_error("failed to get PCI slot");
+            ui_slot = -1;
+            partial_pci = true;
+        }
+
+        /*
+        * SetupApi gives us the same information as driver with
+        * IoGetDeviceProperty. According to Microsoft:
+        *
+        *   FunctionNumber = (USHORT)((propertyAddress) & 0x0000FFFF)
+        *   DeviceNumber = (USHORT)(((propertyAddress) >> 16) & 0x0000FFFF)
+        *   SPDRP_ADDRESS is propertyAddress, so we do the same.
+        *
+        * https://docs.microsoft.com/en-us/windows/desktop/api/setupapi/nf-setupapi-setupdigetdeviceregistrypropertya
+        */
+        if (partial_pci) {
+            pci->domain = -1;
+            pci->slot = -1;
+            pci->function = -1;
+            pci->bus = -1;
+            continue;
+        } else {
+            func = ((int)addr == -1) ? -1 : addr & 0x0000FFFF;
+            slot = ((int)addr == -1) ? -1 : (addr >> 16) & 0x0000FFFF;
+            if ((int)ui_slot != slot) {
+                g_debug("mismatch with reported slot values: %d vs %d",
+                        (int)ui_slot, slot);
+            }
+            pci->domain = 0;
+            pci->slot = (int)ui_slot;
+            pci->function = func;
+            pci->bus = (int)bus;
+            return;
+        }
+    }
+}
+
 static GuestPCIAddress *get_pci_info(int number, Error **errp)
 {
     HDEVINFO dev_info = INVALID_HANDLE_VALUE;
@@ -522,7 +608,6 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
     HANDLE dev_file;
     int i;
     GuestPCIAddress *pci = NULL;
-    bool partial_pci = false;
 
     pci = g_malloc0(sizeof(*pci));
     pci->domain = -1;
@@ -545,7 +630,6 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
         STORAGE_DEVICE_NUMBER sdn;
         char *parent_dev_id = NULL;
         SP_DEVINFO_DATA parent_dev_info_data;
-        DWORD j;
         DWORD size = 0;
 
         g_debug("getting device path");
@@ -672,79 +756,8 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
             goto end;
         }
 
-        for (j = 0;
-             SetupDiEnumDeviceInfo(parent_dev_info, j, &parent_dev_info_data);
-             j++) {
-            DWORD addr, bus, ui_slot, type;
-            int func, slot;
+        get_pci_address_for_device(pci, parent_dev_info);
 
-            /*
-             * There is no need to allocate buffer in the next functions. The
-             * size is known and ULONG according to
-             * https://msdn.microsoft.com/en-us/library/windows/hardware/ff543095(v=vs.85).aspx
-             */
-            if (!SetupDiGetDeviceRegistryProperty(
-                  parent_dev_info, &parent_dev_info_data, SPDRP_BUSNUMBER,
-                  &type, (PBYTE)&bus, size, NULL)) {
-                debug_error("failed to get PCI bus");
-                bus = -1;
-                partial_pci = true;
-            }
-
-            /*
-             * The function retrieves the device's address. This value will be
-             * transformed into device function and number
-             */
-            if (!SetupDiGetDeviceRegistryProperty(
-                    parent_dev_info, &parent_dev_info_data, SPDRP_ADDRESS,
-                    &type, (PBYTE)&addr, size, NULL)) {
-                debug_error("failed to get PCI address");
-                addr = -1;
-                partial_pci = true;
-            }
-
-            /*
-             * This call returns UINumber of DEVICE_CAPABILITIES structure.
-             * This number is typically a user-perceived slot number.
-             */
-            if (!SetupDiGetDeviceRegistryProperty(
-                    parent_dev_info, &parent_dev_info_data, SPDRP_UI_NUMBER,
-                    &type, (PBYTE)&ui_slot, size, NULL)) {
-                debug_error("failed to get PCI slot");
-                ui_slot = -1;
-                partial_pci = true;
-            }
-
-            /*
-             * SetupApi gives us the same information as driver with
-             * IoGetDeviceProperty. According to Microsoft:
-             *
-             *   FunctionNumber = (USHORT)((propertyAddress) & 0x0000FFFF)
-             *   DeviceNumber = (USHORT)(((propertyAddress) >> 16) & 0x0000FFFF)
-             *   SPDRP_ADDRESS is propertyAddress, so we do the same.
-             *
-             * https://docs.microsoft.com/en-us/windows/desktop/api/setupapi/nf-setupapi-setupdigetdeviceregistrypropertya
-             */
-            if (partial_pci) {
-                pci->domain = -1;
-                pci->slot = -1;
-                pci->function = -1;
-                pci->bus = -1;
-                continue;
-            } else {
-                func = ((int)addr == -1) ? -1 : addr & 0x0000FFFF;
-                slot = ((int)addr == -1) ? -1 : (addr >> 16) & 0x0000FFFF;
-                if ((int)ui_slot != slot) {
-                    g_debug("mismatch with reported slot values: %d vs %d",
-                            (int)ui_slot, slot);
-                }
-                pci->domain = 0;
-                pci->slot = (int)ui_slot;
-                pci->function = func;
-                pci->bus = (int)bus;
-                break;
-            }
-        }
         break;
     }
 
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PULL 6/9] gqa-win: get_pci_info: Add g_autofree for few variables
  2022-01-10 13:46 [PULL 0/9] qemu-ga-win patches Konstantin Kostiuk
                   ` (4 preceding siblings ...)
  2022-01-10 13:46 ` [PULL 5/9] gqa-win: get_pci_info: Split logic to separate functions Konstantin Kostiuk
@ 2022-01-10 13:46 ` Konstantin Kostiuk
  2022-01-10 13:46 ` [PULL 7/9] gqa-win: get_pci_info: Replace 'while' with 2 calls of the function Konstantin Kostiuk
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Konstantin Kostiuk @ 2022-01-10 13:46 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Kostiantyn Kostiuk <konstantin@daynix.com>

Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
---
 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-win32.c
@@ -626,9 +626,9 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
     dev_info_data.cbSize = sizeof(SP_DEVINFO_DATA);
     dev_iface_data.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
     for (i = 0; SetupDiEnumDeviceInfo(dev_info, i, &dev_info_data); i++) {
-        PSP_DEVICE_INTERFACE_DETAIL_DATA pdev_iface_detail_data = NULL;
+        g_autofree PSP_DEVICE_INTERFACE_DETAIL_DATA pdev_iface_detail_data = NULL;
         STORAGE_DEVICE_NUMBER sdn;
-        char *parent_dev_id = NULL;
+        g_autofree char *parent_dev_id = NULL;
         SP_DEVINFO_DATA parent_dev_info_data;
         DWORD size = 0;
 
@@ -654,7 +654,6 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
             dev_file = CreateFile(pdev_iface_detail_data->DevicePath, 0,
                                   FILE_SHARE_READ, NULL, OPEN_EXISTING, 0,
                                   NULL);
-            g_free(pdev_iface_detail_data);
 
             if (!DeviceIoControl(dev_file, IOCTL_STORAGE_GET_DEVICE_NUMBER,
                                  NULL, 0, &sdn, sizeof(sdn), &size, NULL)) {
@@ -741,7 +740,6 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
         parent_dev_info =
             SetupDiGetClassDevs(&GUID_DEVINTERFACE_STORAGEPORT, parent_dev_id,
                                 NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
-        g_free(parent_dev_id);
 
         if (parent_dev_info == INVALID_HANDLE_VALUE) {
             error_setg_win32(errp, GetLastError(),
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PULL 7/9] gqa-win: get_pci_info: Replace 'while' with 2 calls of the function
  2022-01-10 13:46 [PULL 0/9] qemu-ga-win patches Konstantin Kostiuk
                   ` (5 preceding siblings ...)
  2022-01-10 13:46 ` [PULL 6/9] gqa-win: get_pci_info: Add g_autofree for few variables Konstantin Kostiuk
@ 2022-01-10 13:46 ` Konstantin Kostiuk
  2022-01-10 13:46 ` [PULL 8/9] qga-win: Detect OS based on Windows 10 by first build number Konstantin Kostiuk
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Konstantin Kostiuk @ 2022-01-10 13:46 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Kostiantyn Kostiuk <konstantin@daynix.com>

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 <konstantin@daynix.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
---
 qga/commands-win32.c | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 3092566313..892082504f 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -636,10 +636,10 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
         if (SetupDiEnumDeviceInterfaces(dev_info, &dev_info_data,
                                         &GUID_DEVINTERFACE_DISK, 0,
                                         &dev_iface_data)) {
-            while (!SetupDiGetDeviceInterfaceDetail(dev_info, &dev_iface_data,
-                                                    pdev_iface_detail_data,
-                                                    size, &size,
-                                                    &dev_info_data)) {
+            if (!SetupDiGetDeviceInterfaceDetail(dev_info, &dev_iface_data,
+                                                 pdev_iface_detail_data,
+                                                 size, &size,
+                                                 &dev_info_data)) {
                 if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
                     pdev_iface_detail_data = g_malloc(size);
                     pdev_iface_detail_data->cbSize =
@@ -651,6 +651,16 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
                 }
             }
 
+            if (!SetupDiGetDeviceInterfaceDetail(dev_info, &dev_iface_data,
+                                                 pdev_iface_detail_data,
+                                                 size, &size,
+                                                 &dev_info_data)) {
+                // pdev_iface_detail_data already is allocated
+                error_setg_win32(errp, GetLastError(),
+                                    "failed to get device interfaces");
+                goto end;
+            }
+
             dev_file = CreateFile(pdev_iface_detail_data->DevicePath, 0,
                                   FILE_SHARE_READ, NULL, OPEN_EXISTING, 0,
                                   NULL);
@@ -680,8 +690,8 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
             ULONG dev_id_size = 0;
 
             size = 0;
-            while (!SetupDiGetDeviceInstanceId(dev_info, &dev_info_data,
-                                               parent_dev_id, size, &size)) {
+            if (!SetupDiGetDeviceInstanceId(dev_info, &dev_info_data,
+                                            parent_dev_id, size, &size)) {
                 if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
                     parent_dev_id = g_malloc(size);
                 } else {
@@ -691,6 +701,14 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
                 }
             }
 
+            if (!SetupDiGetDeviceInstanceId(dev_info, &dev_info_data,
+                                            parent_dev_id, size, &size)) {
+                // parent_dev_id already is allocated
+                error_setg_win32(errp, GetLastError(),
+                                    "failed to get device instance ID");
+                goto end;
+            }
+
             /*
              * CM API used here as opposed to
              * SetupDiGetDeviceProperty(..., DEVPKEY_Device_Parent, ...)
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PULL 8/9] qga-win: Detect OS based on Windows 10 by first build number
  2022-01-10 13:46 [PULL 0/9] qemu-ga-win patches Konstantin Kostiuk
                   ` (6 preceding siblings ...)
  2022-01-10 13:46 ` [PULL 7/9] gqa-win: get_pci_info: Replace 'while' with 2 calls of the function Konstantin Kostiuk
@ 2022-01-10 13:46 ` Konstantin Kostiuk
  2022-01-10 13:46 ` [PULL 9/9] qga-win: Detect Windows 11 by " Konstantin Kostiuk
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Konstantin Kostiuk @ 2022-01-10 13:46 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Kostiantyn Kostiuk <konstantin@daynix.com>

Windows Server 2016, 2019, 2022 are based on Windows 10 and
have the same major and minor versions. So, the only way to
detect the proper version is to use the build number.

Before this commit, the guest agent use the last build number
for each OS, but it causes problems when new OS releases.
There are few preview versions before release, and we
can't update this list.

After this commit, the guest agent will use the first build
number. For each new preview version or release version,
Microsoft increases the build number, so we can add the number
of the first preview build and this will work until the new
OS release.

Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
---
 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 892082504f..3f60419419 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -2195,7 +2195,7 @@ static ga_matrix_lookup_t const WIN_VERSION_MATRIX[2][8] = {
 };
 
 typedef struct _ga_win_10_0_server_t {
-    int final_build;
+    int first_build;
     char const *version;
     char const *version_id;
 } ga_win_10_0_server_t;
@@ -2235,18 +2235,22 @@ static char *ga_get_win_name(OSVERSIONINFOEXW const *os_version, bool id)
     int tbl_idx = (os_version->wProductType != VER_NT_WORKSTATION);
     ga_matrix_lookup_t const *table = WIN_VERSION_MATRIX[tbl_idx];
     ga_win_10_0_server_t const *win_10_0_table = WIN_10_0_SERVER_VERSION_MATRIX;
+    ga_win_10_0_server_t const *win_10_0_version = NULL;
     while (table->version != NULL) {
         if (major == 10 && minor == 0 && tbl_idx) {
             while (win_10_0_table->version != NULL) {
-                if (build <= win_10_0_table->final_build) {
-                    if (id) {
-                        return g_strdup(win_10_0_table->version_id);
-                    } else {
-                        return g_strdup(win_10_0_table->version);
-                    }
+                if (build >= win_10_0_table->first_build) {
+                    win_10_0_version = win_10_0_table;
                 }
                 win_10_0_table++;
             }
+            if (win_10_0_table) {
+                if (id) {
+                    return g_strdup(win_10_0_version->version_id);
+                } else {
+                    return g_strdup(win_10_0_version->version);
+                }
+            }
         } else if (major == table->major && minor == table->minor) {
             if (id) {
                 return g_strdup(table->version_id);
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PULL 9/9] qga-win: Detect Windows 11 by build number
  2022-01-10 13:46 [PULL 0/9] qemu-ga-win patches Konstantin Kostiuk
                   ` (7 preceding siblings ...)
  2022-01-10 13:46 ` [PULL 8/9] qga-win: Detect OS based on Windows 10 by first build number Konstantin Kostiuk
@ 2022-01-10 13:46 ` Konstantin Kostiuk
  2022-01-10 14:14 ` [PULL 0/9] qemu-ga-win patches Philippe Mathieu-Daudé
  2022-01-15 12:40 ` Peter Maydell
  10 siblings, 0 replies; 16+ messages in thread
From: Konstantin Kostiuk @ 2022-01-10 13:46 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Kostiantyn Kostiuk <konstantin@daynix.com>

Windows 10 and 11 have the same major and minor versions.
So, the only way to determine the correct version is to
use the build number.

After this commit, the guest agent will return the proper
"version" and "version-id" for Windows 11. The "pretty-name"
is read 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 <konstantin@daynix.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
---
 qga/commands-win32.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 3f60419419..484cb1c6bd 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -2170,7 +2170,7 @@ typedef struct _ga_matrix_lookup_t {
     char const *version_id;
 } ga_matrix_lookup_t;
 
-static ga_matrix_lookup_t const WIN_VERSION_MATRIX[2][8] = {
+static ga_matrix_lookup_t const WIN_VERSION_MATRIX[2][7] = {
     {
         /* Desktop editions */
         { 5, 0, "Microsoft Windows 2000",   "2000"},
@@ -2179,7 +2179,6 @@ static ga_matrix_lookup_t const WIN_VERSION_MATRIX[2][8] = {
         { 6, 1, "Microsoft Windows 7"       "7"},
         { 6, 2, "Microsoft Windows 8",      "8"},
         { 6, 3, "Microsoft Windows 8.1",    "8.1"},
-        {10, 0, "Microsoft Windows 10",     "10"},
         { 0, 0, 0}
     },{
         /* Server editions */
@@ -2189,24 +2188,29 @@ static ga_matrix_lookup_t const WIN_VERSION_MATRIX[2][8] = {
         { 6, 2, "Microsoft Windows Server 2012",        "2012"},
         { 6, 3, "Microsoft Windows Server 2012 R2",     "2012r2"},
         { 0, 0, 0},
-        { 0, 0, 0},
         { 0, 0, 0}
     }
 };
 
-typedef struct _ga_win_10_0_server_t {
+typedef struct _ga_win_10_0_t {
     int first_build;
     char const *version;
     char const *version_id;
-} ga_win_10_0_server_t;
+} ga_win_10_0_t;
 
-static ga_win_10_0_server_t const WIN_10_0_SERVER_VERSION_MATRIX[4] = {
+static ga_win_10_0_t const WIN_10_0_SERVER_VERSION_MATRIX[4] = {
     {14393, "Microsoft Windows Server 2016",    "2016"},
     {17763, "Microsoft Windows Server 2019",    "2019"},
     {20344, "Microsoft Windows Server 2022",    "2022"},
     {0, 0}
 };
 
+static ga_win_10_0_t const WIN_10_0_CLIENT_VERSION_MATRIX[3] = {
+    {10240, "Microsoft Windows 10",    "10"},
+    {22000, "Microsoft Windows 11",    "11"},
+    {0, 0}
+};
+
 static void ga_get_win_version(RTL_OSVERSIONINFOEXW *info, Error **errp)
 {
     typedef NTSTATUS(WINAPI *rtl_get_version_t)(
@@ -2234,10 +2238,11 @@ static char *ga_get_win_name(OSVERSIONINFOEXW const *os_version, bool id)
     DWORD build = os_version->dwBuildNumber;
     int tbl_idx = (os_version->wProductType != VER_NT_WORKSTATION);
     ga_matrix_lookup_t const *table = WIN_VERSION_MATRIX[tbl_idx];
-    ga_win_10_0_server_t const *win_10_0_table = WIN_10_0_SERVER_VERSION_MATRIX;
-    ga_win_10_0_server_t const *win_10_0_version = NULL;
+    ga_win_10_0_t const *win_10_0_table = tbl_idx ?
+        WIN_10_0_SERVER_VERSION_MATRIX : WIN_10_0_CLIENT_VERSION_MATRIX;
+    ga_win_10_0_t const *win_10_0_version = NULL;
     while (table->version != NULL) {
-        if (major == 10 && minor == 0 && tbl_idx) {
+        if (major == 10 && minor == 0) {
             while (win_10_0_table->version != NULL) {
                 if (build >= win_10_0_table->first_build) {
                     win_10_0_version = win_10_0_table;
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PULL 0/9] qemu-ga-win patches
  2022-01-10 13:46 [PULL 0/9] qemu-ga-win patches Konstantin Kostiuk
                   ` (8 preceding siblings ...)
  2022-01-10 13:46 ` [PULL 9/9] qga-win: Detect Windows 11 by " Konstantin Kostiuk
@ 2022-01-10 14:14 ` Philippe Mathieu-Daudé
  2022-01-10 14:16   ` Peter Maydell
  2022-01-15 12:40 ` Peter Maydell
  10 siblings, 1 reply; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-01-10 14:14 UTC (permalink / raw)
  To: Konstantin Kostiuk, qemu-devel, Peter Maydell

On 1/10/22 14:46, Konstantin Kostiuk wrote:
> The following changes since commit df722e33d5da26ea8604500ca8f509245a0ea524:
> 
>   Merge tag 'bsd-user-arm-pull-request' of gitlab.com:bsdimp/qemu into staging (2022-01-08 09:37:59 -0800)
> 
> are available in the Git repository at:
> 
>   https://github.com/kostyanf14/qemu.git tags/qga-win32-pull-2022-01-10
> 
> for you to fetch changes up to 206ce9699fae1f631ac74b7e1115db2affc759fd:
> 
>   qga-win: Detect Windows 11 by build number (2022-01-10 13:05:25 +0000)
> 
> ----------------------------------------------------------------
> qemu-ga-win patches
> 
> * Fix memory leak in get_pci_info function
> * Add support for Windows 11 in guest-get-osinfo command
> 
> 
> Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
> 
> ----------------------------------------------------------------

I see the patch 'Message-ID' tag is not required on the guide:
https://www.qemu.org/docs/master/devel/submitting-a-pull-request.html
but it is sometime useful.

For your next PR I recommend the 'b4' tool which includes it:
https://people.kernel.org/monsieuricon/introducing-b4-and-patch-attestation


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PULL 0/9] qemu-ga-win patches
  2022-01-10 14:14 ` [PULL 0/9] qemu-ga-win patches Philippe Mathieu-Daudé
@ 2022-01-10 14:16   ` Peter Maydell
  2022-01-10 14:37     ` Konstantin Kostiuk
  0 siblings, 1 reply; 16+ messages in thread
From: Peter Maydell @ 2022-01-10 14:16 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: Konstantin Kostiuk, qemu-devel

On Mon, 10 Jan 2022 at 14:14, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> On 1/10/22 14:46, Konstantin Kostiuk wrote:
> > The following changes since commit df722e33d5da26ea8604500ca8f509245a0ea524:
> >
> >   Merge tag 'bsd-user-arm-pull-request' of gitlab.com:bsdimp/qemu into staging (2022-01-08 09:37:59 -0800)
> >
> > are available in the Git repository at:
> >
> >   https://github.com/kostyanf14/qemu.git tags/qga-win32-pull-2022-01-10
> >
> > for you to fetch changes up to 206ce9699fae1f631ac74b7e1115db2affc759fd:
> >
> >   qga-win: Detect Windows 11 by build number (2022-01-10 13:05:25 +0000)
> >
> > ----------------------------------------------------------------
> > qemu-ga-win patches
> >
> > * Fix memory leak in get_pci_info function
> > * Add support for Windows 11 in guest-get-osinfo command
> >
> >
> > Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
> >
> > ----------------------------------------------------------------
>
> I see the patch 'Message-ID' tag is not required on the guide:
> https://www.qemu.org/docs/master/devel/submitting-a-pull-request.html
> but it is sometime useful.

I don't think we should be adding extra requirements if we don't
need them. The pullrequest handling infrastructure doesn't need
message-id tags.

thanks
-- PMM


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PULL 0/9] qemu-ga-win patches
  2022-01-10 14:16   ` Peter Maydell
@ 2022-01-10 14:37     ` Konstantin Kostiuk
  0 siblings, 0 replies; 16+ messages in thread
From: Konstantin Kostiuk @ 2022-01-10 14:37 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Philippe Mathieu-Daudé, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1611 bytes --]

Thanks for the information. I will read about the 'b4' tool.

Best Regards,
Konstantin Kostiuk.


On Mon, Jan 10, 2022 at 4:16 PM Peter Maydell <peter.maydell@linaro.org>
wrote:

> On Mon, 10 Jan 2022 at 14:14, Philippe Mathieu-Daudé <f4bug@amsat.org>
> wrote:
> >
> > On 1/10/22 14:46, Konstantin Kostiuk wrote:
> > > The following changes since commit
> df722e33d5da26ea8604500ca8f509245a0ea524:
> > >
> > >   Merge tag 'bsd-user-arm-pull-request' of gitlab.com:bsdimp/qemu
> into staging (2022-01-08 09:37:59 -0800)
> > >
> > > are available in the Git repository at:
> > >
> > >   https://github.com/kostyanf14/qemu.git
> tags/qga-win32-pull-2022-01-10
> > >
> > > for you to fetch changes up to
> 206ce9699fae1f631ac74b7e1115db2affc759fd:
> > >
> > >   qga-win: Detect Windows 11 by build number (2022-01-10 13:05:25
> +0000)
> > >
> > > ----------------------------------------------------------------
> > > qemu-ga-win patches
> > >
> > > * Fix memory leak in get_pci_info function
> > > * Add support for Windows 11 in guest-get-osinfo command
> > >
> > >
> > > Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
> > >
> > > ----------------------------------------------------------------
> >
> > I see the patch 'Message-ID' tag is not required on the guide:
> > https://www.qemu.org/docs/master/devel/submitting-a-pull-request.html
> > but it is sometime useful.
>
> I don't think we should be adding extra requirements if we don't
> need them. The pullrequest handling infrastructure doesn't need
> message-id tags.
>
> thanks
> -- PMM
>
>

[-- Attachment #2: Type: text/html, Size: 2607 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PULL 0/9] qemu-ga-win patches
  2022-01-10 13:46 [PULL 0/9] qemu-ga-win patches Konstantin Kostiuk
                   ` (9 preceding siblings ...)
  2022-01-10 14:14 ` [PULL 0/9] qemu-ga-win patches Philippe Mathieu-Daudé
@ 2022-01-15 12:40 ` Peter Maydell
  2022-01-15 22:13   ` Konstantin Kostiuk
  10 siblings, 1 reply; 16+ messages in thread
From: Peter Maydell @ 2022-01-15 12:40 UTC (permalink / raw)
  To: Konstantin Kostiuk; +Cc: qemu-devel

On Mon, 10 Jan 2022 at 13:46, Konstantin Kostiuk <kkostiuk@redhat.com> wrote:
>
> The following changes since commit df722e33d5da26ea8604500ca8f509245a0ea524:
>
>   Merge tag 'bsd-user-arm-pull-request' of gitlab.com:bsdimp/qemu into staging (2022-01-08 09:37:59 -0800)
>
> are available in the Git repository at:
>
>   https://github.com/kostyanf14/qemu.git tags/qga-win32-pull-2022-01-10
>
> for you to fetch changes up to 206ce9699fae1f631ac74b7e1115db2affc759fd:
>
>   qga-win: Detect Windows 11 by build number (2022-01-10 13:05:25 +0000)

Hi; this tag doesn't seem to be gpg-signed. QEMU only alloows pullreqs
which are for gpg-signed tags, so you'll need to sign it. Please make
sure you've uploaded your gpg key to a suitable keyserver (eg
keyserver.ubuntu.com and/or keys.openpgp.org) and let me know which
one so I can download it. If you can arrange to get your key signed by
some of your RedHat colleagues (and upload the key with those signatures)
that would also be helpful.

thanks
-- PMM


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PULL 0/9] qemu-ga-win patches
  2022-01-15 12:40 ` Peter Maydell
@ 2022-01-15 22:13   ` Konstantin Kostiuk
  2022-01-16 20:11     ` Peter Maydell
  0 siblings, 1 reply; 16+ messages in thread
From: Konstantin Kostiuk @ 2022-01-15 22:13 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1515 bytes --]

On Sat, Jan 15, 2022 at 2:40 PM Peter Maydell <peter.maydell@linaro.org>
wrote:

> On Mon, 10 Jan 2022 at 13:46, Konstantin Kostiuk <kkostiuk@redhat.com>
> wrote:
> >
> > The following changes since commit
> df722e33d5da26ea8604500ca8f509245a0ea524:
> >
> >   Merge tag 'bsd-user-arm-pull-request' of gitlab.com:bsdimp/qemu into
> staging (2022-01-08 09:37:59 -0800)
> >
> > are available in the Git repository at:
> >
> >   https://github.com/kostyanf14/qemu.git tags/qga-win32-pull-2022-01-10
> >
> > for you to fetch changes up to 206ce9699fae1f631ac74b7e1115db2affc759fd:
> >
> >   qga-win: Detect Windows 11 by build number (2022-01-10 13:05:25 +0000)
>
> Hi; this tag doesn't seem to be gpg-signed. QEMU only alloows pullreqs
> which are for gpg-signed tags, so you'll need to sign it. Please make
> sure you've uploaded your gpg key to a suitable keyserver (eg
> keyserver.ubuntu.com and/or keys.openpgp.org) and let me know which
> one so I can download it. If you can arrange to get your key signed by
> some of your RedHat colleagues (and upload the key with those signatures)
> that would also be helpful.
>
> thanks
> -- PMM
>

Hi. I uploaded my GPG key to keys.openpgp.org. You can find it by my RedHat
email.
Unfortunately, for now, this key can not be signed by other RedHat
developers.
I signed my tag and pushed it to GitHub. Should I resend this set of
patches?

For tag signing, I use the 'git tag -s' command.
I am sorry for the mistakes, this is my first PR.

Best Regards,
Konstantin Kostiuk.

[-- Attachment #2: Type: text/html, Size: 2445 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PULL 0/9] qemu-ga-win patches
  2022-01-15 22:13   ` Konstantin Kostiuk
@ 2022-01-16 20:11     ` Peter Maydell
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Maydell @ 2022-01-16 20:11 UTC (permalink / raw)
  To: Konstantin Kostiuk; +Cc: qemu-devel

On Sat, 15 Jan 2022 at 22:13, Konstantin Kostiuk <kkostiuk@redhat.com> wrote:
> Hi. I uploaded my GPG key to keys.openpgp.org. You can find it by my RedHat email.
> Unfortunately, for now, this key can not be signed by other RedHat developers.
> I signed my tag and pushed it to GitHub. Should I resend this set of patches?

No, there's no need to resend.

If you get an opportunity at some point to get some signatures
on your gpg key that would be great, but I know it's tricky
especially at the moment and for the last couple of years.

> For tag signing, I use the 'git tag -s' command.
> I am sorry for the mistakes, this is my first PR.

No worries.

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/7.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-01-16 20:12 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-10 13:46 [PULL 0/9] qemu-ga-win patches Konstantin Kostiuk
2022-01-10 13:46 ` [PULL 1/9] MAINTAINERS: Add entry for QEMU Guest Agent Windows components Konstantin Kostiuk
2022-01-10 13:46 ` [PULL 2/9] gqa-win: get_pci_info: Clean dev_info if handle is valid Konstantin Kostiuk
2022-01-10 13:46 ` [PULL 3/9] gqa-win: get_pci_info: Use common 'end' label Konstantin Kostiuk
2022-01-10 13:46 ` [PULL 4/9] gqa-win: get_pci_info: Free parent_dev_info properly Konstantin Kostiuk
2022-01-10 13:46 ` [PULL 5/9] gqa-win: get_pci_info: Split logic to separate functions Konstantin Kostiuk
2022-01-10 13:46 ` [PULL 6/9] gqa-win: get_pci_info: Add g_autofree for few variables Konstantin Kostiuk
2022-01-10 13:46 ` [PULL 7/9] gqa-win: get_pci_info: Replace 'while' with 2 calls of the function Konstantin Kostiuk
2022-01-10 13:46 ` [PULL 8/9] qga-win: Detect OS based on Windows 10 by first build number Konstantin Kostiuk
2022-01-10 13:46 ` [PULL 9/9] qga-win: Detect Windows 11 by " Konstantin Kostiuk
2022-01-10 14:14 ` [PULL 0/9] qemu-ga-win patches Philippe Mathieu-Daudé
2022-01-10 14:16   ` Peter Maydell
2022-01-10 14:37     ` Konstantin Kostiuk
2022-01-15 12:40 ` Peter Maydell
2022-01-15 22:13   ` Konstantin Kostiuk
2022-01-16 20:11     ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.