From 8363e23a2f7482f8cfc33d8e1c99eb939083b609 Mon Sep 17 00:00:00 2001
From: mille-feuille <gtpgx305@gmail.com>
Date: Thu, 8 Feb 2024 23:47:24 +0900
Subject: [PATCH 0294/1160] detect-virt: fix Google Compute Engine support
Follow-up for 9b0688f491674b53ef7a52bdf561a430c53673d6
(cherry picked from commit baa90b4b81da6fd28b2fe7f4f37c8c546881f3a0)
src/basic/virt.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
@@ -454,7 +454,7 @@ Virtualization detect_vm(void) {
/* We have to use the correct order here:
*
- * → First, try to detect Oracle Virtualbox, Amazon EC2 Nitro, and Parallels, even if they use KVM,
+ * → First, try to detect Oracle Virtualbox, Amazon EC2 Nitro, Parallels, and Google Compute Engine, even if they use KVM,
* as well as Xen even if it cloaks as Microsoft Hyper-V. Attempt to detect uml at this stage also
* since it runs as a user-process nested inside other VMs. Also check for Xen now, because Xen PV
* mode does not override CPUID when nested inside another hypervisor.
@@ -469,7 +469,8 @@ Virtualization detect_vm(void) {
VIRTUALIZATION_ORACLE,
VIRTUALIZATION_XEN,
VIRTUALIZATION_AMAZON,
- VIRTUALIZATION_PARALLELS)) {
+ VIRTUALIZATION_PARALLELS,
+ VIRTUALIZATION_GOOGLE)) {
v = dmi;
goto finish;
}
--
2.33.0