]> git.proxmox.com Git - qemu-server.git/commit
Add helpers to better structure CPU option handling
authorStefan Reiter <s.reiter@proxmox.com>
Tue, 7 Apr 2020 13:56:17 +0000 (15:56 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 7 Apr 2020 15:27:58 +0000 (17:27 +0200)
commit45619185a622e0116e8368eed74b9dcbd266dc39
tree790075703b719d3baaabf56cd66fc42333959f74
parentea1c21108f774c3440704780bda335535f9a95a4
Add helpers to better structure CPU option handling

To avoid hardcoding even more CPU-flag related things for custom CPU
models, introduce a dynamic approach to resolving flags.

resolve_cpu_flags takes a list of hashes (as documented in the
comment) and resolves them to a valid "-cpu" argument without
duplicates. This also helps by providing a reason why specific CPU flags
have been added, and thus allows for useful warning messages should a
flag be overwritten by another.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Reviewed-By: Fabian Ebner <f.ebner@proxmox.com>
Tested-By: Fabian Ebner <f.ebner@proxmox.com>
PVE/QemuServer/CPUConfig.pm