On September 9, 2019 2:56 pm, Stefan Reiter wrote: > On 9/6/19 1:42 PM, Fabian Grünbichler wrote: >>> +# this is neither the default for 'query_supported_cpu_flags' below, nor >>> for >>> +# /proc/cpuinfo. >>> +# >>> +# To compare (or array_intersect) flags, it's a good idea to convert them >>> all >>> +# to a common format first (e.g. map s/\.|-/_/g). >>> +sub query_understood_cpu_flags { >> >> not used anywhere in this series? also, confusingly, this returns less >> values then the other helper (maybe because of some aliases?), and it's >> not a strict subset :-/ >> > > Yes, this is for exposing via the API (for the GUI to create/edit custom > models I have in mind). I just thought it fits with this patch well, > since the comments refer to each other. > > Also, query_understood_cpu_flags returns 188 flags for me, while > query_supported_cpu_flags only returns 104...
yes, a double check confirms this - seems I had the output files mixed up.. sorry for the noise > > The discrepancies generally arise because > a) query_understood_cpu_flags returns flags the host cannot use and > b) query_supported_cpu_flags (rather the QMP call) doesn't actually > return CPU flags, but CPU settings - with most of them being flags. > Those settings (and some flags, curiously) cannot be specified as a > "-cpu" argument however. that makes sense - and would make a good starting point for an informative comment ;) > > The intersection of those provides only flags that can be passed to > "-cpu" without issues in my testing. Since query_understood_cpu_flags is > not host specific though, it doesn't need broadcasting. _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel