|
|
9ae3a8 |
From 5bf64f8c7302964bd5fd208d9db9fa38ee96e0fa Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Alex Williamson <alex.williamson@redhat.com>
|
|
|
9ae3a8 |
Date: Fri, 10 Apr 2015 16:33:39 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 01/14] vfio: warn if host device rom can't be read
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Message-id: <20150410163339.15324.77513.stgit@gimli.home>
|
|
|
9ae3a8 |
Patchwork-id: 64789
|
|
|
9ae3a8 |
O-Subject: [RHEL7.2 qemu-kvm PATCH 1/8] vfio: warn if host device rom can't be read
|
|
|
9ae3a8 |
Bugzilla: 1210503
|
|
|
9ae3a8 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Bandan Das <bsd@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: Bandan Das <bsd@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Upstream: d20b43dfea1587b561aae17e4fa0f7407779d253
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
If the device rom can't be read, report an error to the
|
|
|
9ae3a8 |
user. This alerts the user that the device has a bad
|
|
|
9ae3a8 |
state that is causing rom read failure or option rom
|
|
|
9ae3a8 |
loading has been disabled from the device boot menu
|
|
|
9ae3a8 |
(among other reasons).
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Bandan Das <bsd@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/misc/vfio.c | 7 +++++++
|
|
|
9ae3a8 |
1 file changed, 7 insertions(+)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
|
|
|
9ae3a8 |
index 40b0923..c9dbc28 100644
|
|
|
9ae3a8 |
--- a/hw/misc/vfio.c
|
|
|
9ae3a8 |
+++ b/hw/misc/vfio.c
|
|
|
9ae3a8 |
@@ -1197,6 +1197,13 @@ static void vfio_pci_load_rom(VFIODevice *vdev)
|
|
|
9ae3a8 |
vdev->rom_offset = reg_info.offset;
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if (!vdev->rom_size) {
|
|
|
9ae3a8 |
+ error_report("vfio-pci: Cannot read device rom at "
|
|
|
9ae3a8 |
+ "%04x:%02x:%02x.%x\n",
|
|
|
9ae3a8 |
+ vdev->host.domain, vdev->host.bus, vdev->host.slot,
|
|
|
9ae3a8 |
+ vdev->host.function);
|
|
|
9ae3a8 |
+ error_printf("Device option ROM contents are probably invalid "
|
|
|
9ae3a8 |
+ "(check dmesg).\nSkip option ROM probe with rombar=0, "
|
|
|
9ae3a8 |
+ "or load from file with romfile=\n");
|
|
|
9ae3a8 |
return;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|