Skip to contentSkip to conversation

vfio/pci: Fix incorrect error message

RFC PATCH In review Dong Jia Shi 2 participants 4 messages Apr 25, 2017 – Apr 26, 2017

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 vfio/pci: Fix incorrect error message

When the "No host device provided" error occurs, the hint message that starts with "Use -vfio-pci," makes no sense, since "-vfio-pci" is not a valid command line parameter.

Correct this by replacing "-vfio-pci" with "-device vfio-pci".

---
 hw/vfio/pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/vfio/pci.c +2 -2
index 03a3d01..32aca77 100644
@@ -2625,8 +2625,8 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
         if (!(~vdev->host.domain || ~vdev->host.bus ||
               ~vdev->host.slot || ~vdev->host.function)) {
             error_setg(errp, "No provided host device");
-            error_append_hint(errp, "Use -vfio-pci,host=DDDD:BB:DD.F "
-                              "or -vfio-pci,sysfsdev=PATH_TO_DEVICE\n");
+            error_append_hint(errp, "Use -device vfio-pci,host=DDDD:BB:DD.F "
+                              "or -device vfio-pci,sysfsdev=PATH_TO_DEVICE\n");
             return;
         }
         vdev->vbasedev.sysfsdev =
Signature · 1 line
2.10.2
#1 lore raw

* Dong Jia Shi <[email protected]> [2017-04-25 06:52:01 +0200]:

Hey Alex,

Please ignore the "RFC" tag in the subject. Sorry for the mistake.

Quoted 29 lines

When the "No host device provided" error occurs, the hint message that starts with "Use -vfio-pci," makes no sense, since "-vfio-pci" is not a valid command line parameter.

Correct this by replacing "-vfio-pci" with "-device vfio-pci".

---
 hw/vfio/pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/vfio/pci.c +2 -2
index 03a3d01..32aca77 100644
@@ -2625,8 +2625,8 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
         if (!(~vdev->host.domain || ~vdev->host.bus ||
               ~vdev->host.slot || ~vdev->host.function)) {
             error_setg(errp, "No provided host device");
-            error_append_hint(errp, "Use -vfio-pci,host=DDDD:BB:DD.F "
-                              "or -vfio-pci,sysfsdev=PATH_TO_DEVICE\n");
+            error_append_hint(errp, "Use -device vfio-pci,host=DDDD:BB:DD.F "
+                              "or -device vfio-pci,sysfsdev=PATH_TO_DEVICE\n");
             return;
         }
         vdev->vbasedev.sysfsdev =
Signature · 1 line
2.10.2
Signature · 1 line
Dong Jia Shi
Reviewed-by
#2 lore raw

Hi Dong,

Quoted 13 lines · Dong Jia Shi

* Dong Jia Shi <[email protected]> [2017-04-25 06:52:01 +0200]:

Hey Alex,

Please ignore the "RFC" tag in the subject. Sorry for the mistake.

Quoted 7 lines

When the "No host device provided" error occurs, the hint message that starts with "Use -vfio-pci," makes no sense, since "-vfio-pci" is not a valid command line parameter.

Correct this by replacing "-vfio-pci" with "-device vfio-pci".

Thanks

Eric

Quoted 23 lines
Quoted 22 lines
---
 hw/vfio/pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/vfio/pci.c +2 -2
index 03a3d01..32aca77 100644
@@ -2625,8 +2625,8 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
         if (!(~vdev->host.domain || ~vdev->host.bus ||
               ~vdev->host.slot || ~vdev->host.function)) {
             error_setg(errp, "No provided host device");
-            error_append_hint(errp, "Use -vfio-pci,host=DDDD:BB:DD.F "
-                              "or -vfio-pci,sysfsdev=PATH_TO_DEVICE\n");
+            error_append_hint(errp, "Use -device vfio-pci,host=DDDD:BB:DD.F "
+                              "or -device vfio-pci,sysfsdev=PATH_TO_DEVICE\n");
             return;
         }
         vdev->vbasedev.sysfsdev =
Signature · 1 line
2.10.2
#3 lore raw

* Auger Eric <[email protected]> [2017-04-26 10:06:58 +0200]:

Hi Eric,

Quoted 9 lines

Hi Dong,

Quoted 6 lines · Dong Jia Shi

* Dong Jia Shi <[email protected]> [2017-04-25 06:52:01 +0200]:

Hey Alex,

Please ignore the "RFC" tag in the subject. Sorry for the mistake.

Quoted 8 lines
Quoted 7 lines
Quoted 7 lines

When the "No host device provided" error occurs, the hint message that starts with "Use -vfio-pci," makes no sense, since "-vfio-pci" is not a valid command line parameter.

Correct this by replacing "-vfio-pci" with "-device vfio-pci".

Thanks for the review!

Quoted 28 lines

Thanks

Eric

Quoted 23 lines
Quoted 22 lines
---
 hw/vfio/pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/vfio/pci.c +2 -2
index 03a3d01..32aca77 100644
@@ -2625,8 +2625,8 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
         if (!(~vdev->host.domain || ~vdev->host.bus ||
               ~vdev->host.slot || ~vdev->host.function)) {
             error_setg(errp, "No provided host device");
-            error_append_hint(errp, "Use -vfio-pci,host=DDDD:BB:DD.F "
-                              "or -vfio-pci,sysfsdev=PATH_TO_DEVICE\n");
+            error_append_hint(errp, "Use -device vfio-pci,host=DDDD:BB:DD.F "
+                              "or -device vfio-pci,sysfsdev=PATH_TO_DEVICE\n");
             return;
         }
         vdev->vbasedev.sysfsdev =
Signature · 1 line
2.10.2
Signature · 1 line
Dong Jia Shi