1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

virt: Support detection of LMHS SRE guests

This commit is contained in:
Neil Moore 2022-12-01 14:03:06 -05:00 committed by Yu Watanabe
parent ef6636fd18
commit d833ed781f
4 changed files with 11 additions and 1 deletions

View File

@ -62,7 +62,7 @@
</thead>
<tbody>
<row>
<entry valign="top" morerows="15">VM</entry>
<entry valign="top" morerows="16">VM</entry>
<entry><varname>qemu</varname></entry>
<entry>QEMU software virtualization, without KVM</entry>
</row>
@ -142,6 +142,11 @@
<entry><ulink url="https://developer.apple.com/documentation/virtualization">Apple Virtualization.framework</ulink></entry>
</row>
<row>
<entry><varname>sre</varname></entry>
<entry><ulink url="https://www.lockheedmartin.com/en-us/products/Hardened-Security-for-Intel-Processors.html">LMHS SRE hypervisor</ulink></entry>
</row>
<row>
<entry valign="top" morerows="9">Container</entry>
<entry><varname>openvz</varname></entry>

View File

@ -1285,6 +1285,7 @@
<literal>bhyve</literal>,
<literal>qnx</literal>,
<literal>apple</literal>,
<literal>sre</literal>,
<literal>openvz</literal>,
<literal>lxc</literal>,
<literal>lxc-libvirt</literal>,

View File

@ -50,6 +50,8 @@ static Virtualization detect_vm_cpuid(void) {
{ "QNXQVMBSQG", VIRTUALIZATION_QNX },
/* https://projectacrn.org */
{ "ACRNACRNACRN", VIRTUALIZATION_ACRN },
/* https://www.lockheedmartin.com/en-us/products/Hardened-Security-for-Intel-Processors.html */
{ "SRESRESRESRE", VIRTUALIZATION_SRE },
};
uint32_t eax, ebx, ecx, edx;
@ -1036,6 +1038,7 @@ static const char *const virtualization_table[_VIRTUALIZATION_MAX] = {
[VIRTUALIZATION_ACRN] = "acrn",
[VIRTUALIZATION_POWERVM] = "powervm",
[VIRTUALIZATION_APPLE] = "apple",
[VIRTUALIZATION_SRE] = "sre",
[VIRTUALIZATION_VM_OTHER] = "vm-other",
[VIRTUALIZATION_SYSTEMD_NSPAWN] = "systemd-nspawn",

View File

@ -26,6 +26,7 @@ typedef enum Virtualization {
VIRTUALIZATION_ACRN,
VIRTUALIZATION_POWERVM,
VIRTUALIZATION_APPLE,
VIRTUALIZATION_SRE,
VIRTUALIZATION_VM_OTHER,
VIRTUALIZATION_VM_LAST = VIRTUALIZATION_VM_OTHER,