qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Konstantin Kostiuk <kkostiuk@redhat.com>
To: qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
	"Daniel P . Berrangé" <berrange@redhat.com>
Subject: [PULL v2 2/6] qga:/qga-win: skip getting pci info for USB disks
Date: Sat, 17 Dec 2022 11:07:36 +0200	[thread overview]
Message-ID: <20221217090740.522093-3-kkostiuk@redhat.com> (raw)
In-Reply-To: <20221217090740.522093-1-kkostiuk@redhat.com>

From: Kfir Manor <kfir@daynix.com>

Skip getting PCI info from disks type USB and give them an empty PCI address instead.

Signed-off-by: Kfir Manor <kfir@daynix.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
---
 qga/commands-win32.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index bd0f3cccfe..b5fee6a2cd 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -874,10 +874,14 @@ static void get_single_disk_info(int disk_number,
      * if that doesn't hold since that suggests some other unexpected
      * breakage
      */
-    disk->pci_controller = get_pci_info(disk_number, &local_err);
-    if (local_err) {
-        error_propagate(errp, local_err);
-        goto err_close;
+    if (disk->bus_type == GUEST_DISK_BUS_TYPE_USB) {
+        disk->pci_controller = get_empty_pci_address();
+    } else {
+        disk->pci_controller = get_pci_info(disk_number, &local_err);
+        if (local_err) {
+            error_propagate(errp, local_err);
+            goto err_close;
+        }
     }
     if (disk->bus_type == GUEST_DISK_BUS_TYPE_SCSI
             || disk->bus_type == GUEST_DISK_BUS_TYPE_IDE
-- 
2.25.1



  parent reply	other threads:[~2022-12-17  9:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-17  9:07 [PULL v2 0/6] QEMU Guest Agent misc patches Konstantin Kostiuk
2022-12-17  9:07 ` [PULL v2 1/6] qga:/qga-win: adding a empty PCI address creation function Konstantin Kostiuk
2022-12-17  9:07 ` Konstantin Kostiuk [this message]
2022-12-17  9:07 ` [PULL v2 3/6] qga: Add initial OpenBSD and NetBSD support Konstantin Kostiuk
2022-12-17  9:07 ` [PULL v2 4/6] qga-win: add logging to Windows event log Konstantin Kostiuk
2022-12-17  9:07 ` [PULL v2 5/6] qga: map GLib log levels to system levels Konstantin Kostiuk
2022-12-17  9:07 ` [PULL v2 6/6] qga-win: choose the right libpcre version to include in MSI package Konstantin Kostiuk
2022-12-17 21:20 ` [PULL v2 0/6] QEMU Guest Agent misc patches Peter Maydell
2022-12-19 10:34   ` Konstantin Kostiuk
2022-12-19 10:42     ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221217090740.522093-3-kkostiuk@redhat.com \
    --to=kkostiuk@redhat.com \
    --cc=berrange@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).