[pve-devel] [PATCH v2 qemu-server 02/12] Add QEMU CPU flag querying helpers

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Oct 2 07:47:44 CEST 2019


On 9/30/19 12:58 PM, Stefan Reiter wrote:
> * query_understood_cpu_flags returns all flags that QEMU/KVM knows about

Why isn't that information generated and pve-qemu built-time and shipped in
/usr/share or the like? It won't change independently of qemu so could make
sense? Swaps way more expensive run_commands by a simple file read.

> * query_supported_cpu_flags returns all flags that QEMU/KVM can use on
>   this particular host.
> 
> To get supported flags, a temporary VM is started with QEMU, so we can
> issue the "query-cpu-model-expansion" QMP command. This is how libvirt
> queries supported flags for its "host-passthrough" CPU type.
> query_supported_cpu_flags is thus rather slow and shouldn't be called
> unnecessarily.
> 
> Currently only supports x86_64, because QEMU-aarch64 doesn't provide the
> necessary querying functions.
> 
> Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
> ---
> 




More information about the pve-devel mailing list