From: Black-Hole1 Date: Fri, 19 Jan 2024 03:38:49 +0000 (+0800) Subject: virt: support detection of Apple Virtualization guests with cpuid X-Git-Tag: v256-rc1~1107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a02a9adb2c8f45420aa1c0383d298a248811b01;p=thirdparty%2Fsystemd.git 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 --- diff --git a/src/basic/virt.c b/src/basic/virt.c index 9c1410886f4..465f339c146 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;