Hello,
I'm trying to use AMX in my virtual machines.
More info on AMX: https://www.intel.com/content/www/us/en/products/docs/accelerator-engines/advanced-matrix-extensions/overview.html
My system in test is currently SLES 15 SP5. 
I'm also verifying in parallel with Suse (especially regarding the backported features in their 5.14 based kernel), but in the meantime I would like to understand implication, if any, of libvirt in the certification loop I have to analyse.
From what I see we have in upstream:
. support in the KVM kernel module since 5.17
. support of cpu model SapphireRapids, the first offering AMX as an ISA extension, in QEMU since 7.0

Is there any dependance to check on libvirt too?
When I run
virsh cpu-models x86_64
Is libvirt sw stack querying qemu directly? Or the kvm kernel module? Or any internal "database" file?

From man page it is not clear to me what "known" means:
"
   cpu-models
       Syntax:

          cpu-models arch

       Print  the  list  of CPU models known by libvirt for the specified architecture.  Whether a specific hypervisor is able to create a domain which uses any of the printed CPU models is a separate question which can be answered by looking at the domain capabilities  XML  returned by domcapabilities command.  Moreover, for some architectures libvirt does not know any CPU models and the usable CPU models are only limited  by the hypervisor. This command will print that all CPU models are accepted for these architectures and the actual list of supported CPU models can be checked in the domain capabilities XML.
"

In SLES 15 SP5 with:

qemu-7.1.0-150500.49.9.2.x86_64
kernel-default-5.14.21-150500.55.49.1.x86_64
libvirtd-*-9.0.0-150500.6.11.1.x86_64

I get
# virsh cpu-models x86_64
...
Cascadelake-Server
Cascadelake-Server-noTSX
Icelake-Client
Icelake-Client-noTSX
Icelake-Server
Icelake-Server-noTSX
Cooperlake
Snowridge
athlon
phenom
Opteron_G1
Opteron_G2
...

# virsh domcapabilities | grep -i sapphirerapid
#

In fedora39 with

qemu-8.1.3-4.fc39.x86_64
kernel-6.7.5-200.fc39.x86_64
libvirt-*-9.7.0-2.fc39.x86_64

I get
# virsh cpu-models x86_64
...
Cascadelake-Server
Cascadelake-Server-noTSX
Icelake-Client
Icelake-Client-noTSX
Icelake-Server
Icelake-Server-noTSX
Cooperlake
Snowridge
SapphireRapids
athlon
phenom
Opteron_G1
Opteron_G2
...

# virsh domcapabilities | grep -i sapphirerapids
      <model usable='no' vendor='Intel'>SapphireRapids</model>
#
because I'm running on a client system without AMX support

Thanks in advance,
Gianluca