1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-26 03:21:44 +03:00

qemu: always translate underscores to hyphens in CPU features

QEMU switched from using underscores in x86 CPU features to hyphens
in the 2.8.0 series with two commits

  commit fc7dfd205f3287893c436d932a167bffa30579c8 (HEAD, refs/bisect/bad)
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   Fri Sep 30 15:49:40 2016 -0300

    target-i386: Remove underscores from feat_names arrays

  commit 54b8dc7c19cd781e96f1e9b001ca6001d804eb19
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   Fri Sep 30 15:49:38 2016 -0300

    target-i386: Register aliases for feature names with underscores

Libvirt names use underscores so we conditionally tranlate the
names when talking to new QEMU. Since the min QEMU was raised to
version 2.11.0, all QEMU versions we talk to expect hypens, so
the translation can be done unconditionally.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2021-10-07 15:25:54 +01:00
parent 28a1059ddd
commit 7bf6292fb3
29 changed files with 29 additions and 30 deletions

View File

@ -3387,8 +3387,7 @@ virQEMUCapsCPUFeatureTranslate(virQEMUCaps *qemuCaps,
table = virQEMUCapsCPUFeaturesX86;
if (!table ||
!feature ||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CANONICAL_CPU_FEATURES))
!feature)
return feature;
for (entry = table; entry->libvirt; entry++) {

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-foo/master-key.aes \
-machine pc,accel=kvm,usb=off,dump-guest-core=off \
-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf_lm,l3-cache=off \
-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds-cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf-lm,l3-cache=off \
-m 214 \
-realtime mlock=off \
-smp 1,sockets=1,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc,accel=kvm,usb=off,dump-guest-core=off \
-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf_lm \
-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds-cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf-lm \
-m 214 \
-realtime mlock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
-cpu qemu32,-kvm_pv_eoi \
-cpu qemu32,-kvm-pv-eoi \
-m 214 \
-realtime mlock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
-cpu qemu32,+kvm_pv_eoi \
-cpu qemu32,+kvm-pv-eoi \
-m 214 \
-realtime mlock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc,accel=kvm,usb=off,dump-guest-core=off \
-cpu core2duo,+ds,+ht,+tm,+ds_cpl,+xtpr,+3dnowext,+lahf_lm,-nx,-cx16,-tm2,-pbe,-ss,-sse4a,-wdt \
-cpu core2duo,+ds,+ht,+tm,+ds-cpl,+xtpr,+3dnowext,+lahf-lm,-nx,-cx16,-tm2,-pbe,-ss,-sse4a,-wdt \
-m 214 \
-realtime mlock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc,accel=kvm,usb=off,dump-guest-core=off \
-cpu core2duo,+ds,+ht,+tm,+ds_cpl,+xtpr,+3dnowext,+lahf_lm,-nx,-cx16,-tm2,-pbe,-ss,-sse4a,-wdt \
-cpu core2duo,+ds,+ht,+tm,+ds-cpl,+xtpr,+3dnowext,+lahf-lm,-nx,-cx16,-tm2,-pbe,-ss,-sse4a,-wdt \
-m 214 \
-realtime mlock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
-cpu Haswell,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+dtes64,+monitor,+ds_cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+f16c,+rdrand,+pdpe1gb,+abm,+lahf_lm \
-cpu Haswell,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+dtes64,+monitor,+ds-cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+f16c,+rdrand,+pdpe1gb,+abm,+lahf-lm \
-m 214 \
-realtime mlock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-i440fx-4.0,accel=tcg,usb=off,dump-guest-core=off \
-cpu EPYC,acpi=on,ss=on,monitor=on,hypervisor=on,erms=on,mpx=on,pcommit=on,clwb=on,pku=on,la57=on,3dnowext=on,3dnow=on,npt=on,vme=off,fma=off,avx=off,f16c=off,rdrand=off,avx2=off,rdseed=off,sha-ni=off,xsavec=off,fxsr_opt=off,misalignsse=off,3dnowprefetch=off,osvw=off,topoext=off,nrip-save=off \
-cpu EPYC,acpi=on,ss=on,monitor=on,hypervisor=on,erms=on,mpx=on,pcommit=on,clwb=on,pku=on,la57=on,3dnowext=on,3dnow=on,npt=on,vme=off,fma=off,avx=off,f16c=off,rdrand=off,avx2=off,rdseed=off,sha-ni=off,xsavec=off,fxsr-opt=off,misalignsse=off,3dnowprefetch=off,osvw=off,topoext=off,nrip-save=off \
-m 214 \
-overcommit mem-lock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
-cpu Penryn,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+monitor,+ds_cpl,+vmx,+est,+tm2,+xtpr,-sse4.1,+cx16,+lahf_lm \
-cpu Penryn,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+monitor,+ds-cpl,+vmx,+est,+tm2,+xtpr,-sse4.1,+cx16,+lahf-lm \
-m 214 \
-realtime mlock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
-cpu 'core2duo,vendor=Libvirt QEMU,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf_lm' \
-cpu 'core2duo,vendor=Libvirt QEMU,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds-cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf-lm' \
-m 214 \
-realtime mlock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine q35,accel=kvm,usb=off,dump-guest-core=off \
-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf_lm \
-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds-cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf-lm \
-m 214 \
-realtime mlock=off \
-smp 1,sockets=1,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-q35-2.11,accel=kvm,usb=off,dump-guest-core=off \
-cpu Skylake-Client,ss=on,vmx=on,hypervisor=on,tsc_adjust=on,clflushopt=on,umip=on,xsaves=on,pdpe1gb=on \
-cpu Skylake-Client,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,xsaves=on,pdpe1gb=on \
-m 214 \
-realtime mlock=off \
-smp 1,sockets=1,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-q35-2.12,accel=kvm,usb=off,dump-guest-core=off \
-cpu Haswell-noTSX,vme=on,ss=on,f16c=on,rdrand=on,hypervisor=on,arat=on,tsc_adjust=on,xsaveopt=on,pdpe1gb=on,abm=on \
-cpu Haswell-noTSX,vme=on,ss=on,f16c=on,rdrand=on,hypervisor=on,arat=on,tsc-adjust=on,xsaveopt=on,pdpe1gb=on,abm=on \
-m 214 \
-realtime mlock=off \
-smp 1,sockets=1,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-q35-3.0,accel=kvm,usb=off,dump-guest-core=off \
-cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc_adjust=on,clflushopt=on,umip=on,xsaves=on,pdpe1gb=on,topoext=on \
-cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,xsaves=on,pdpe1gb=on,topoext=on \
-m 214 \
-realtime mlock=off \
-smp 1,sockets=1,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-q35-3.1,accel=kvm,usb=off,dump-guest-core=off \
-cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc_adjust=on,clflushopt=on,umip=on,xsaves=on,pdpe1gb=on \
-cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,xsaves=on,pdpe1gb=on \
-m 214 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-q35-4.0,accel=kvm,usb=off,dump-guest-core=off \
-cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc_adjust=on,clflushopt=on,umip=on,ssbd=on,xsaves=on,pdpe1gb=on \
-cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,ssbd=on,xsaves=on,pdpe1gb=on \
-m 214 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc,accel=kvm,usb=off,dump-guest-core=off \
-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf_lm \
-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds-cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf-lm \
-m 214 \
-realtime mlock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc,accel=kvm,usb=off,dump-guest-core=off \
-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf_lm,-syscall,-nx,-lm,-svm \
-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds-cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf-lm,-syscall,-nx,-lm,-svm \
-m 214 \
-realtime mlock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc,accel=kvm,usb=off,dump-guest-core=off \
-cpu core2duo,+ds,+acpi,+ht,+tm,+ds_cpl,+vmx,+est,+xtpr,+3dnowext,+lahf_lm,-nx,-cx16,-tm2,-pbe,-ss,-sse4a,-wdt \
-cpu core2duo,+ds,+acpi,+ht,+tm,+ds-cpl,+vmx,+est,+xtpr,+3dnowext,+lahf-lm,-nx,-cx16,-tm2,-pbe,-ss,-sse4a,-wdt \
-m 214 \
-realtime mlock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-i440fx-4.0,accel=tcg,usb=off,dump-guest-core=off \
-cpu Haswell,pclmuldq=on,ds_cpl=on,tsc_adjust=on,fxsr_opt=on,lahf_lm=on,cmp_legacy=on,nodeid_msr=on,perfctr_core=on,perfctr_nb=on,kvm_pv_eoi=on,kvm_pv_unhalt=on \
-cpu Haswell,pclmulqdq=on,ds-cpl=on,tsc-adjust=on,fxsr-opt=on,lahf-lm=on,cmp-legacy=on,nodeid-msr=on,perfctr-core=on,perfctr-nb=on,kvm-pv-eoi=on,kvm-pv-unhalt=on \
-m 214 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc,accel=kvm,usb=off,dump-guest-core=off \
-cpu Haswell,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+dtes64,+monitor,+ds_cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+f16c,+rdrand,+pdpe1gb,+abm,+lahf_lm,+invtsc,tsc-frequency=4567890000 \
-cpu Haswell,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+dtes64,+monitor,+ds-cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+f16c,+rdrand,+pdpe1gb,+abm,+lahf-lm,+invtsc,tsc-frequency=4567890000 \
-m 214 \
-realtime mlock=off \
-smp 1,sockets=1,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-i440fx-4.0,accel=kvm,usb=off,dump-guest-core=off \
-cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc_adjust=on,clflushopt=on,umip=on,ssbd=on,xsaves=on,pdpe1gb=on,invtsc=on,tsc-frequency=4567890000 \
-cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,ssbd=on,xsaves=on,pdpe1gb=on,invtsc=on,tsc-frequency=4567890000 \
-m 214 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-i440fx-4.0,accel=tcg,usb=off,dump-guest-core=off \
-cpu qemu32,kvm_pv_eoi=off \
-cpu qemu32,kvm-pv-eoi=off \
-m 214 \
-overcommit mem-lock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-i440fx-4.0,accel=tcg,usb=off,dump-guest-core=off \
-cpu qemu32,kvm_pv_eoi=on \
-cpu qemu32,kvm-pv-eoi=on \
-m 214 \
-overcommit mem-lock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=spice \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-f14/master-key.aes \
-machine pc,accel=kvm,usb=off,dump-guest-core=off \
-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf_lm \
-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds-cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf-lm \
-m 1024 \
-realtime mlock=off \
-smp 2,sockets=1,cores=2,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-i440fx-4.0,accel=tcg,usb=off,dump-guest-core=off \
-cpu qemu32,kvmclock=off,kvm_pv_eoi=off \
-cpu qemu32,kvmclock=off,kvm-pv-eoi=off \
-m 214 \
-overcommit mem-lock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-i440fx-4.0,accel=tcg,usb=off,dump-guest-core=off \
-cpu qemu32,kvm_pv_unhalt=off \
-cpu qemu32,kvm-pv-unhalt=off \
-m 214 \
-overcommit mem-lock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-i440fx-4.0,accel=tcg,usb=off,dump-guest-core=off \
-cpu qemu32,kvm_pv_unhalt=on \
-cpu qemu32,kvm-pv-unhalt=on \
-m 214 \
-overcommit mem-lock=off \
-smp 6,sockets=6,cores=1,threads=1 \