From 5a02a9adb2c8f45420aa1c0383d298a248811b01 Mon Sep 17 00:00:00 2001 From: Black-Hole1 Date: Fri, 19 Jan 2024 11:38:49 +0800 Subject: [PATCH] virt: support detection of Apple Virtualization guests with cpuid This is a supplement to #24419. On macOS Intel machines, detection needs to be done through cpuid. In macOS, `dmi_vendors` detection is only applicable to M series. Signed-off-by: Black-Hole1 --- src/basic/virt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/basic/virt.c b/src/basic/virt.c index 9c1410886f..465f339c14 100644 --- a/src/basic/virt.c +++ b/src/basic/virt.c @@ -54,6 +54,7 @@ static Virtualization detect_vm_cpuid(void) { { "ACRNACRNACRN", VIRTUALIZATION_ACRN }, /* https://www.lockheedmartin.com/en-us/products/Hardened-Security-for-Intel-Processors.html */ { "SRESRESRESRE", VIRTUALIZATION_SRE }, + { "Apple VZ", VIRTUALIZATION_APPLE }, }; uint32_t eax, ebx, ecx, edx;