yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 0dadf0b76c9236d048c203fb5b9baaf3fe6fac15 Mon Sep 17 00:00:00 2001
From: Alex Williamson <alex.williamson@redhat.com>
Date: Fri, 29 Sep 2017 21:45:44 +0200
Subject: [PATCH 12/27] vfio/pci: Fix incorrect error message

RH-Author: Alex Williamson <alex.williamson@redhat.com>
Message-id: <20170929214544.16765.85472.stgit@gimli.home>
Patchwork-id: 76770
O-Subject: [RHEL-7.5 qemu-kvm PATCH 12/16] vfio/pci: Fix incorrect error message
Bugzilla: 1494181
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Auger Eric <eric.auger@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>

From: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>

Upstream: 6e4e6f0d403b1fb25f9dfdbe17754c643997753d

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".

Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/misc/vfio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index a95bbaf..e2dc3f5 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -3867,8 +3867,8 @@ static int vfio_initfn(PCIDevice *pdev)
         if (!(~vdev->host.domain || ~vdev->host.bus ||
               ~vdev->host.slot || ~vdev->host.function)) {
             error_report("No provided host device - "
-                         "Use -vfio-pci,host=DDDD:BB:DD.F "
-                         "or -vfio-pci,sysfsdev=PATH_TO_DEVICE");
+                         "Use -device vfio-pci,host=DDDD:BB:DD.F "
+                         "or -device vfio-pci,sysfsdev=PATH_TO_DEVICE");
             return -EINVAL;
         }
         vdev->vbasedev.sysfsdev =
-- 
1.8.3.1