]> xenbits.xensource.com Git - seabios.git/commitdiff
kvm: detect unconditionally
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 10 Mar 2020 10:22:46 +0000 (11:22 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 16 Mar 2020 13:29:41 +0000 (14:29 +0100)
So we detect kvm even in case there is no qemu pci hostbridge present,
for example when using the new, pci-less microvm machine type.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20200310102248.28412-2-kraxel@redhat.com

src/fw/paravirt.c

index 4fcd8f570673ebd14f2122708d7db544c7312300..ef420931b9a5aae1f403cff9b44d28a651272b9b 100644 (file)
@@ -102,13 +102,13 @@ static void qemu_detect(void)
         dprintf(1, "Running on QEMU (unknown nb: %04x:%04x)\n", v, d);
         break;
     }
-    kvm_detect();
 }
 
 void
 qemu_preinit(void)
 {
     qemu_detect();
+    kvm_detect();
 
     if (!CONFIG_QEMU)
         return;
@@ -118,12 +118,6 @@ qemu_preinit(void)
         return;
     }
 
-    if (!runningOnQEMU()) {
-        dprintf(1, "Warning: No QEMU Northbridge found (isapc?)\n");
-        PlatformRunningOn |= PF_QEMU;
-        kvm_detect();
-    }
-
     // On emulators, get memory size from nvram.
     u32 rs = ((rtc_read(CMOS_MEM_EXTMEM2_LOW) << 16)
               | (rtc_read(CMOS_MEM_EXTMEM2_HIGH) << 24));