On Wed, Jan 15, 2025 at 04:07:38PM +0100, Thomas Huth wrote: > On 15/01/2025 11.43, Daniel P. Berrangé wrote: > > On Wed, Jan 15, 2025 at 11:34:05AM +0100, Boris Fiuczynski wrote: > > > Allows for the query of hypervisor-known CPU models via the simple > > > command: virsh hypervisor-cpu-models. For the QEMU driver, the models > > > are queried via the capabilities file. Each model is printed to the > > > terminal on its own line similar to the cpu-models command, and there > > > is no order to the listing. > > > > This is just duplicating what we already expose to users in > > virConnectGetDomainCapabilities / virsh domcapabilities. > > > > eg > > > > # virsh domcapabilities --xpath '//cpu//model/text()' > > Hi Daniel! > > From a plain end-users perspective (which I belong to here in this case), I > think it would be very helpful to have a "virsh hypervisor-cpu-models" > command! I already ran into this problem in the past: I wanted to get a list > of CPU models that are supported by the hypervisor, I had to discover that > "virsh cpu-models" is completely useless on s390x, I saw that there are > already "hypervisor-cpu-compare" and "hypervisor-cpu-baseline" and then > started wondering why there is nothing similar for easily getting the list > of CPU models here. As an average user, it can be quite hard to figure out > that you have to use "virsh domcapabilities" for this instead. > > Last time this has been discussed, you also mentioned that you wouldn't > object such a command if it's based on GetDomainCapabilities (see > https://marc.info/?i=ZHCZeXbywKCR5jzw@xxxxxxxxxx), which seems now to be the > case if I got patch 3/4 right? And considering that other people ran into > this problem already, too (see https://web.archive.org/web/20230817214310/https://listman.redhat.com/archives/libvir-list/2022-June/232626.html > ), I'd appreciate if we could give this a chance, please? Ah, I knew I had dejavu here. Indeed I did say that a virsh command based on GetDomainCapabilities was OK, but that is not what this series is doing. This is essentially the same as the old series, adding a new public virConnectGetHypervisorCPUModelNames API, which virsh then calls. virsh needs to call virConnectGetDomainCapabilities directly if we want a 'hypervisor-cpu-models' command. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|