arm/aarch64: detect-virt: check dmi
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.
This commit is contained in:
+2
-4
@@ -34,7 +34,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 {
|
||||
@@ -144,9 +144,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",
|
||||
|
||||
Reference in New Issue
Block a user