From nobody Wed Nov 5 10:15:13 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 15336395905521010.8366163453916; Tue, 7 Aug 2018 03:59:50 -0700 (PDT) Received: from localhost ([::1]:38427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmziP-0000Gw-Jj for importer@patchew.org; Tue, 07 Aug 2018 06:59:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmzae-00024r-Nq for qemu-devel@nongnu.org; Tue, 07 Aug 2018 06:51:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmzaZ-0004IK-TP for qemu-devel@nongnu.org; Tue, 07 Aug 2018 06:51:48 -0400 Received: from mail-wr1-f42.google.com ([209.85.221.42]:33942) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fmzaZ-0004HS-My for qemu-devel@nongnu.org; Tue, 07 Aug 2018 06:51:43 -0400 Received: by mail-wr1-f42.google.com with SMTP id c13-v6so15332298wrt.1 for ; Tue, 07 Aug 2018 03:51:43 -0700 (PDT) Received: from fiorina.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id j9-v6sm1287794wrv.5.2018.08.07.03.51.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Aug 2018 03:51:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rCCBQLCvoxUj/rJHYqFIRwOfG/RwdLkaEfJuGDN4GzU=; b=EXUCMsxkfCLC/s41mkSqd6s3l53ULEpOzogrgQU/CEV3fW0l31Mjxkn0P/bpfaljNz dHNxvYPCzLlSirm26zfm1wlIhWPLjIJHmzObgZnTyfNU8omDOOiHyIQp8iyqPMPgBNvW obvbCRrPnVKQxK22NonjSQBpwV//RJCgiT2G7vd79WY47RqI1Am88vuqEbO674k5jnWj lz++JjY3sEfsYgdCJEw/Wn0XONR18m15hcGgeOPKAW6oyv5EJjQ5AXzKV2m0rRoU9gpn TzzhlX+VfMvSu2l8Y4YMrFmtrNlEVJSpLaNnbPAiW2Z1r/Ajt6/SzqOgAjQjMWJjyD+X WK9Q== X-Gm-Message-State: AOUpUlFZ30VSR7GOqL7VxBi2eNiWSD32uHYxyhxxbiaUnl5fh99UwRIA rC9daDFw8WoGbWKrAI3wXAgsBn71GoA= X-Google-Smtp-Source: AAOMgpdsIbh/4bfbCnmUSXIyFSI1+PUy1cwarVCLdPX04nEY7ApFKWy9AsuAdQaQpbGJ6Non8SkYEA== X-Received: by 2002:adf:8385:: with SMTP id 5-v6mr12350317wre.13.1533639102522; Tue, 07 Aug 2018 03:51:42 -0700 (PDT) From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Golembiovsk=C3=BD?= To: qemu-devel@nongnu.org Date: Tue, 7 Aug 2018 12:51:36 +0200 Message-Id: <9fcdb4fc0d467b1e0f0a4b2e299305e05a62e7eb.1533639095.git.tgolembi@redhat.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.221.42 Subject: [Qemu-devel] [PATCH v2 2/4] qga: win32: add debugging information X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Tom=C3=A1=C5=A1=20Golembiovsk=C3=BD?= , Michael Roth Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 The windows code generaly lacks debug information (compared to posix code). This patch adds some related to HW info in guest-get-fsinfo command. Signed-off-by: Tom=C3=A1=C5=A1 Golembiovsk=C3=BD --- qga/commands-win32.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 318d760a74..36d76c22c0 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -498,6 +498,7 @@ static GuestPCIAddress *get_pci_info(char *guid, Error = **errp) goto out; } =20 + g_debug("enumerating devices"); dev_info_data.cbSize =3D sizeof(SP_DEVINFO_DATA); for (i =3D 0; SetupDiEnumDeviceInfo(dev_info, i, &dev_info_data); i++)= { DWORD addr, bus, slot, func, dev, data, size2; @@ -522,6 +523,7 @@ static GuestPCIAddress *get_pci_info(char *guid, Error = **errp) if (g_strcmp0(buffer, dev_name)) { continue; } + g_debug("found device %s", dev_name); =20 /* There is no need to allocate buffer in the next functions. The = size * is known and ULONG according to @@ -530,6 +532,7 @@ static GuestPCIAddress *get_pci_info(char *guid, Error = **errp) */ if (!SetupDiGetDeviceRegistryProperty(dev_info, &dev_info_data, SPDRP_BUSNUMBER, &data, (PBYTE)&bus, size, NULL)) { + g_debug("failed to get bus"); break; } =20 @@ -537,6 +540,7 @@ static GuestPCIAddress *get_pci_info(char *guid, Error = **errp) * transformed into device function and number */ if (!SetupDiGetDeviceRegistryProperty(dev_info, &dev_info_data, SPDRP_ADDRESS, &data, (PBYTE)&addr, size, NULL)) { + g_debug("failed to get address"); break; } =20 @@ -544,6 +548,7 @@ static GuestPCIAddress *get_pci_info(char *guid, Error = **errp) * This number is typically a user-perceived slot number. */ if (!SetupDiGetDeviceRegistryProperty(dev_info, &dev_info_data, SPDRP_UI_NUMBER, &data, (PBYTE)&slot, size, NULL)) { + g_debug("failed to get slot"); break; } =20 @@ -608,6 +613,7 @@ static GuestDiskAddressList *build_guest_disk_info(char= *guid, Error **errp) scsi_ad =3D &addr; char *name =3D g_strndup(guid, strlen(guid)-1); =20 + g_debug("getting disk info for: %s", name); vol_h =3D CreateFile(name, 0, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); if (vol_h =3D=3D INVALID_HANDLE_VALUE) { @@ -615,6 +621,7 @@ static GuestDiskAddressList *build_guest_disk_info(char= *guid, Error **errp) goto out_free; } =20 + g_debug("getting bus type"); bus =3D get_disk_bus_type(vol_h, errp); if (bus < 0) { goto out_close; @@ -622,6 +629,7 @@ static GuestDiskAddressList *build_guest_disk_info(char= *guid, Error **errp) =20 disk =3D g_malloc0(sizeof(*disk)); disk->bus_type =3D find_bus_type(bus); + g_debug("bus type %d", disk->bus_type); if (bus =3D=3D BusTypeScsi || bus =3D=3D BusTypeAta || bus =3D=3D BusT= ypeRAID #if (_WIN32_WINNT >=3D 0x0600) /* This bus type is not supported before Windows Server 2003 S= P1 */ @@ -631,6 +639,7 @@ static GuestDiskAddressList *build_guest_disk_info(char= *guid, Error **errp) /* We are able to use the same ioctls for different bus types * according to Microsoft docs * https://technet.microsoft.com/en-us/library/ee851589(v=3Dws.10)= .aspx */ + g_debug("getting pci-controller info"); if (DeviceIoControl(vol_h, IOCTL_SCSI_GET_ADDRESS, NULL, 0, scsi_a= d, sizeof(SCSI_ADDRESS), &len, NULL)) { disk->unit =3D addr.Lun; --=20 2.18.0