chiark / gitweb /
arm/aarch64: detect-virt: check dmi
authorAndrew Jones <drjones@redhat.com>
Tue, 3 Nov 2015 18:10:13 +0000 (12:10 -0600)
committerSven Eden <yamakuzure@gmx.net>
Wed, 26 Apr 2017 10:58:55 +0000 (12:58 +0200)
ARM/AArch64 guests now have SMBIOS tables populated (when boot
with a late enough QEMU and a late enough AAVMF is used as the
bootloader). Furthermore, when booting ARM/AArch64 guests with
ACPI, the DT detection obviously no longer works, so we need
dmi detection.

src/basic/virt.c

index 8e398e506f924403ae8629697f70d94ae2b93405..e07fa5a69bbf3fa48835a479aa2b428ed0ac4bca 100644 (file)
@@ -30,7 +30,7 @@
 
 static int detect_vm_cpuid(void) {
 
-        /* Both CPUID and DMI are x86 specific interfaces... */
+        /* CPUID is an x86 specific interface. */
 #if defined(__i386__) || defined(__x86_64__)
 
         static const struct {
@@ -140,9 +140,7 @@ static int detect_vm_device_tree(void) {
 }
 
 static int detect_vm_dmi(void) {
-
-        /* Both CPUID and DMI are x86 specific interfaces... */
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
 
         static const char *const dmi_vendors[] = {
                 "/sys/class/dmi/id/sys_vendor",