[SeaBIOS] [PATCH 4/7] kvmtool: detect pci devices
Gerd Hoffmann
kraxel at redhat.com
Tue Jul 7 08:38:43 CEST 2015
Make a pci bus scan, so we find the virtio devices.
Tested with virtio-blk only (kvmtool uses that by default).
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
src/fw/paravirt.c | 9 +++++++++
src/fw/paravirt.h | 1 +
src/post.c | 1 +
3 files changed, 11 insertions(+)
diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c
index efd9848..28d47d2 100644
--- a/src/fw/paravirt.c
+++ b/src/fw/paravirt.c
@@ -457,3 +457,12 @@ kvmtool_preinit(void)
RamSize = 128 * 1024 * 1024;
add_e820(0, RamSize, E820_RAM);
}
+
+void
+kvmtool_platform_setup(void)
+{
+ if (!CONFIG_KVMTOOL)
+ return;
+
+ pci_probe_devices();
+}
diff --git a/src/fw/paravirt.h b/src/fw/paravirt.h
index 7caca4d..3078af6 100644
--- a/src/fw/paravirt.h
+++ b/src/fw/paravirt.h
@@ -35,5 +35,6 @@ void qemu_platform_setup(void);
void qemu_cfg_init(void);
void kvmtool_preinit(void);
+void kvmtool_platform_setup(void);
#endif
diff --git a/src/post.c b/src/post.c
index 36cc5d7..f6b8b8e 100644
--- a/src/post.c
+++ b/src/post.c
@@ -173,6 +173,7 @@ platform_hardware_setup(void)
// Platform specific setup
qemu_platform_setup();
+ kvmtool_platform_setup();
coreboot_platform_setup();
// Initialize TPM
--
1.8.3.1
More information about the SeaBIOS
mailing list