virt: rework kvm with hyperv enlightenment checks a bit

Let's avoid extending the virtualization with an "alias" entry that has
the same string assigned as another.

The only reason this was done was to make the patch small that added a
second CPUID vendor string for kvm to the vm_table[] array. Let's
instead rework the array to use struct elements that match up strings
with ids. Given the array was previously mostly sparse this should be a
general improvement.

Fixes: #22950
Follow-up for: #22945
This commit is contained in:
Lennart Poettering
2022-04-04 11:28:56 +02:00
parent fbe0430015
commit 0f534758d1
3 changed files with 26 additions and 27 deletions
-1
View File
@@ -10,7 +10,6 @@ enum {
VIRTUALIZATION_VM_FIRST,
VIRTUALIZATION_KVM = VIRTUALIZATION_VM_FIRST,
VIRTUALIZATION_HV_KVM,
VIRTUALIZATION_AMAZON,
VIRTUALIZATION_QEMU,
VIRTUALIZATION_BOCHS,