cpu_x86: Penalize disabled features when computing CPU model

For finding the best matching CPU model for a given set of features
while we don't know the CPU signature (i.e., when computing a baseline
CPU model) we've been using a "shortest list of features" heuristics.
This works well if new CPU models are supersets of older models, but
that's not always the case. As a result it may actually select a new CPU
model as a baseline while removing some features from it to make it
compatible with older models. This is in general worse than using an old
CPU model with a bunch of added features as a guest OS or apps may crash
when using features that were disabled.

On the other hand we don't want to end up with a very old model which
would guarantee no disabled features as it could stop a guest OS or apps
from using some features provided by the CPU because they would not
expect them on such an old CPU.

This patch changes the heuristics to something in between. Enabled and
disabled features are counted separately so that a CPU model requiring
some features to be disabled looks worse than a model with fewer
disabled features even if its complete list of features is longer. The
penalty given for each additional disabled feature gets bigger to make
longer list of disabled features look even worse.

https://bugzilla.redhat.com/show_bug.cgi?id=1851227

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Jiri Denemark 2022-04-26 15:06:30 +02:00
parent 1d6ca40ac2
commit 48341b025a
23 changed files with 330 additions and 200 deletions

View File

@ -1956,23 +1956,57 @@ virCPUx86Compare(virCPUDef *host,
}
/* Base penalty for disabled features. */
#define BASE_PENALTY 2
static int
virCPUx86CompareCandidateFeatureList(virCPUDef *cpuCurrent,
virCPUDef *cpuCandidate)
{
size_t current = cpuCurrent->nfeatures;
size_t enabledCurrent = current;
size_t disabledCurrent = 0;
size_t candidate = cpuCandidate->nfeatures;
size_t enabled = candidate;
size_t disabled = 0;
if (candidate < current) {
VIR_DEBUG("%s is better than %s: %zu < %zu",
if (cpuCandidate->type != VIR_CPU_TYPE_HOST) {
size_t i;
int penalty = BASE_PENALTY;
for (i = 0; i < enabledCurrent; i++) {
if (cpuCurrent->features[i].policy == VIR_CPU_FEATURE_DISABLE) {
enabledCurrent--;
disabledCurrent += penalty;
penalty++;
}
}
current = enabledCurrent + disabledCurrent;
penalty = BASE_PENALTY;
for (i = 0; i < enabled; i++) {
if (cpuCandidate->features[i].policy == VIR_CPU_FEATURE_DISABLE) {
enabled--;
disabled += penalty;
penalty++;
}
}
candidate = enabled + disabled;
}
if (candidate < current ||
(candidate == current && disabled < disabledCurrent)) {
VIR_DEBUG("%s is better than %s: %zu (%zu, %zu) < %zu (%zu, %zu)",
cpuCandidate->model, cpuCurrent->model,
candidate, current);
candidate, enabled, disabled,
current, enabledCurrent, disabledCurrent);
return 1;
}
VIR_DEBUG("%s is not better than %s: %zu >= %zu",
VIR_DEBUG("%s is not better than %s: %zu (%zu, %zu) >= %zu (%zu, %zu)",
cpuCandidate->model, cpuCurrent->model,
candidate, current);
candidate, enabled, disabled,
current, enabledCurrent, disabledCurrent);
return 0;
}

View File

@ -1,6 +1,7 @@
<cpu mode='custom' match='exact'>
<model fallback='forbid'>core2duo</model>
<model fallback='forbid'>n270</model>
<vendor>Intel</vendor>
<feature policy='require' name='pse36'/>
<feature policy='require' name='ds'/>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ss'/>
@ -14,6 +15,6 @@
<feature policy='require' name='xtpr'/>
<feature policy='require' name='pdcm'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='lm'/>
<feature policy='require' name='lahf_lm'/>
<feature policy='disable' name='syscall'/>
</cpu>

View File

@ -1,5 +1,5 @@
<cpu mode='custom' match='exact'>
<model fallback='forbid'>core2duo</model>
<model fallback='forbid'>n270</model>
<vendor>Intel</vendor>
<feature policy='require' name='ds'/>
<feature policy='require' name='acpi'/>
@ -15,6 +15,7 @@
<feature policy='require' name='xtpr'/>
<feature policy='require' name='pdcm'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='syscall'/>
<feature policy='require' name='lm'/>
<feature policy='require' name='lahf_lm'/>
<feature policy='disable' name='pse36'/>
</cpu>

View File

@ -1,22 +1,25 @@
<cpu mode='custom' match='exact'>
<model fallback='forbid'>Opteron_G3</model>
<model fallback='forbid'>athlon</model>
<vendor>AMD</vendor>
<feature policy='require' name='vme'/>
<feature policy='require' name='mca'/>
<feature policy='require' name='clflush'/>
<feature policy='require' name='pni'/>
<feature policy='require' name='cx16'/>
<feature policy='require' name='x2apic'/>
<feature policy='require' name='popcnt'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='syscall'/>
<feature policy='require' name='fxsr_opt'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='3dnowext'/>
<feature policy='require' name='3dnow'/>
<feature policy='require' name='lm'/>
<feature policy='require' name='lahf_lm'/>
<feature policy='require' name='cmp_legacy'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='abm'/>
<feature policy='require' name='sse4a'/>
<feature policy='require' name='misalignsse'/>
<feature policy='require' name='3dnowprefetch'/>
<feature policy='require' name='osvw'/>
<feature policy='require' name='npt'/>
<feature policy='require' name='nrip-save'/>
<feature policy='disable' name='nx'/>
<feature policy='disable' name='rdtscp'/>
<feature policy='disable' name='svm'/>
<feature policy='disable' name='monitor'/>
</cpu>

View File

@ -1,11 +1,14 @@
<cpu mode='custom' match='exact'>
<model fallback='allow'>Skylake-Client-IBRS</model>
<model fallback='allow'>Broadwell-IBRS</model>
<vendor>Intel</vendor>
<feature policy='require' name='vme'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='f16c'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='tsc_adjust'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='disable' name='mpx'/>
<feature policy='disable' name='xsavec'/>
<feature policy='disable' name='xgetbv1'/>
<feature policy='require' name='abm'/>
</cpu>

View File

@ -1,14 +1,15 @@
<cpu mode='custom' match='exact'>
<model fallback='allow'>Cooperlake</model>
<model fallback='allow'>Cascadelake-Server</model>
<vendor>Intel</vendor>
<feature policy='require' name='ss'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='tsc_adjust'/>
<feature policy='require' name='mpx'/>
<feature policy='require' name='umip'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='stibp'/>
<feature policy='require' name='arch-capabilities'/>
<feature policy='require' name='xsaves'/>
<feature policy='disable' name='avx512-bf16'/>
<feature policy='disable' name='mds-no'/>
<feature policy='disable' name='pschange-mc-no'/>
<feature policy='disable' name='taa-no'/>
<feature policy='require' name='rdctl-no'/>
<feature policy='require' name='ibrs-all'/>
<feature policy='require' name='skip-l1dfl-vmentry'/>
</cpu>

View File

@ -1,12 +1,13 @@
<cpu mode='custom' match='exact'>
<model fallback='allow'>Cascadelake-Server</model>
<model fallback='allow'>Skylake-Server-IBRS</model>
<vendor>Intel</vendor>
<feature policy='require' name='ss'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='tsc_adjust'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='umip'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='ssbd'/>
<feature policy='require' name='xsaves'/>
<feature policy='require' name='skip-l1dfl-vmentry'/>
<feature policy='disable' name='avx512vnni'/>
</cpu>

View File

@ -1,14 +1,15 @@
<cpu mode='custom' match='exact'>
<model fallback='allow'>Cooperlake</model>
<model fallback='allow'>Cascadelake-Server</model>
<vendor>Intel</vendor>
<feature policy='require' name='ss'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='tsc_adjust'/>
<feature policy='require' name='mpx'/>
<feature policy='require' name='umip'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='stibp'/>
<feature policy='require' name='arch-capabilities'/>
<feature policy='require' name='xsaves'/>
<feature policy='disable' name='avx512-bf16'/>
<feature policy='disable' name='mds-no'/>
<feature policy='disable' name='pschange-mc-no'/>
<feature policy='disable' name='taa-no'/>
<feature policy='require' name='rdctl-no'/>
<feature policy='require' name='ibrs-all'/>
<feature policy='require' name='skip-l1dfl-vmentry'/>
</cpu>

View File

@ -1,17 +1,19 @@
<cpu mode='custom' match='exact'>
<model fallback='allow'>Nehalem</model>
<model fallback='allow'>qemu64</model>
<topology sockets='2' dies='1' cores='4' threads='1'/>
<feature policy='force' name='pbe'/>
<feature policy='force' name='monitor'/>
<feature policy='require' name='ssse3'/>
<feature policy='require' name='xtpr'/>
<feature policy='require' name='dca'/>
<feature policy='require' name='sse4.1'/>
<feature policy='force' name='3dnowext'/>
<feature policy='force' name='svm'/>
<feature policy='require' name='lahf_lm'/>
<feature policy='disable' name='sse'/>
<feature policy='disable' name='sse4.2'/>
<feature policy='forbid' name='popcnt'/>
<feature policy='disable' name='3dnow'/>
<feature policy='require' name='ssse3'/>
<feature policy='disable' name='vmx'/>
<feature policy='disable' name='ds_cpl'/>
<feature policy='force' name='svm'/>
<feature policy='forbid' name='popcnt'/>
</cpu>

View File

@ -36,35 +36,42 @@
</enum>
</mode>
<mode name='host-model' supported='yes'>
<model fallback='forbid'>EPYC</model>
<model fallback='forbid'>Opteron_G3</model>
<vendor>AMD</vendor>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='ssse3'/>
<feature policy='require' name='sse4.1'/>
<feature policy='require' name='sse4.2'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='aes'/>
<feature policy='require' name='xsave'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='erms'/>
<feature policy='require' name='mpx'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='pcommit'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='clwb'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='la57'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='3dnowext'/>
<feature policy='require' name='3dnow'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='npt'/>
<feature policy='disable' name='vme'/>
<feature policy='disable' name='fma'/>
<feature policy='disable' name='avx'/>
<feature policy='disable' name='f16c'/>
<feature policy='disable' name='rdrand'/>
<feature policy='disable' name='avx2'/>
<feature policy='disable' name='rdseed'/>
<feature policy='disable' name='sha-ni'/>
<feature policy='disable' name='xsavec'/>
<feature policy='disable' name='fxsr_opt'/>
<feature policy='disable' name='misalignsse'/>
<feature policy='disable' name='3dnowprefetch'/>
<feature policy='disable' name='osvw'/>
<feature policy='disable' name='topoext'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>qemu64</model>

View File

@ -36,36 +36,42 @@
</enum>
</mode>
<mode name='host-model' supported='yes'>
<model fallback='forbid'>EPYC</model>
<model fallback='forbid'>Opteron_G3</model>
<vendor>AMD</vendor>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='ssse3'/>
<feature policy='require' name='sse4.1'/>
<feature policy='require' name='sse4.2'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='aes'/>
<feature policy='require' name='xsave'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='erms'/>
<feature policy='require' name='mpx'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='pcommit'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='clwb'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='la57'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='3dnowext'/>
<feature policy='require' name='3dnow'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='npt'/>
<feature policy='disable' name='vme'/>
<feature policy='disable' name='fma'/>
<feature policy='disable' name='avx'/>
<feature policy='disable' name='f16c'/>
<feature policy='disable' name='rdrand'/>
<feature policy='disable' name='avx2'/>
<feature policy='disable' name='rdseed'/>
<feature policy='disable' name='sha-ni'/>
<feature policy='disable' name='xsavec'/>
<feature policy='disable' name='fxsr_opt'/>
<feature policy='disable' name='misalignsse'/>
<feature policy='disable' name='3dnowprefetch'/>
<feature policy='disable' name='osvw'/>
<feature policy='disable' name='topoext'/>
<feature policy='disable' name='nrip-save'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>qemu64</model>

View File

@ -36,36 +36,43 @@
</enum>
</mode>
<mode name='host-model' supported='yes'>
<model fallback='forbid'>EPYC-IBPB</model>
<model fallback='forbid'>Opteron_G3</model>
<vendor>AMD</vendor>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='ssse3'/>
<feature policy='require' name='sse4.1'/>
<feature policy='require' name='sse4.2'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='aes'/>
<feature policy='require' name='xsave'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='erms'/>
<feature policy='require' name='mpx'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='pcommit'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='clwb'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='la57'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='3dnowext'/>
<feature policy='require' name='3dnow'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='npt'/>
<feature policy='disable' name='vme'/>
<feature policy='disable' name='fma'/>
<feature policy='disable' name='avx'/>
<feature policy='disable' name='f16c'/>
<feature policy='disable' name='avx2'/>
<feature policy='disable' name='rdseed'/>
<feature policy='disable' name='sha-ni'/>
<feature policy='disable' name='xsavec'/>
<feature policy='disable' name='fxsr_opt'/>
<feature policy='disable' name='misalignsse'/>
<feature policy='disable' name='3dnowprefetch'/>
<feature policy='disable' name='osvw'/>
<feature policy='disable' name='topoext'/>
<feature policy='disable' name='ibpb'/>
<feature policy='disable' name='nrip-save'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>qemu64</model>

View File

@ -36,36 +36,43 @@
</enum>
</mode>
<mode name='host-model' supported='yes'>
<model fallback='forbid'>EPYC-IBPB</model>
<model fallback='forbid'>Opteron_G3</model>
<vendor>AMD</vendor>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='ssse3'/>
<feature policy='require' name='sse4.1'/>
<feature policy='require' name='sse4.2'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='aes'/>
<feature policy='require' name='xsave'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='erms'/>
<feature policy='require' name='mpx'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='pcommit'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='clwb'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='la57'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='3dnowext'/>
<feature policy='require' name='3dnow'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='npt'/>
<feature policy='disable' name='vme'/>
<feature policy='disable' name='fma'/>
<feature policy='disable' name='avx'/>
<feature policy='disable' name='f16c'/>
<feature policy='disable' name='avx2'/>
<feature policy='disable' name='rdseed'/>
<feature policy='disable' name='sha-ni'/>
<feature policy='disable' name='xsavec'/>
<feature policy='disable' name='fxsr_opt'/>
<feature policy='disable' name='misalignsse'/>
<feature policy='disable' name='3dnowprefetch'/>
<feature policy='disable' name='osvw'/>
<feature policy='disable' name='topoext'/>
<feature policy='disable' name='ibpb'/>
<feature policy='disable' name='nrip-save'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>qemu64</model>

View File

@ -36,35 +36,43 @@
</enum>
</mode>
<mode name='host-model' supported='yes'>
<model fallback='forbid'>EPYC</model>
<model fallback='forbid'>Opteron_G3</model>
<vendor>AMD</vendor>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='ssse3'/>
<feature policy='require' name='sse4.1'/>
<feature policy='require' name='sse4.2'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='aes'/>
<feature policy='require' name='xsave'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='erms'/>
<feature policy='require' name='mpx'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='pcommit'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='clwb'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='la57'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='3dnowext'/>
<feature policy='require' name='3dnow'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='npt'/>
<feature policy='disable' name='vme'/>
<feature policy='disable' name='fma'/>
<feature policy='disable' name='avx'/>
<feature policy='disable' name='f16c'/>
<feature policy='disable' name='avx2'/>
<feature policy='disable' name='rdseed'/>
<feature policy='disable' name='sha-ni'/>
<feature policy='disable' name='xsavec'/>
<feature policy='disable' name='fxsr_opt'/>
<feature policy='disable' name='misalignsse'/>
<feature policy='disable' name='3dnowprefetch'/>
<feature policy='disable' name='osvw'/>
<feature policy='disable' name='topoext'/>
<feature policy='disable' name='nrip-save'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>qemu64</model>

View File

@ -36,35 +36,43 @@
</enum>
</mode>
<mode name='host-model' supported='yes'>
<model fallback='forbid'>EPYC</model>
<model fallback='forbid'>Opteron_G3</model>
<vendor>AMD</vendor>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='ssse3'/>
<feature policy='require' name='sse4.1'/>
<feature policy='require' name='sse4.2'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='aes'/>
<feature policy='require' name='xsave'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='erms'/>
<feature policy='require' name='mpx'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='pcommit'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='clwb'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='la57'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='3dnowext'/>
<feature policy='require' name='3dnow'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='npt'/>
<feature policy='disable' name='vme'/>
<feature policy='disable' name='fma'/>
<feature policy='disable' name='avx'/>
<feature policy='disable' name='f16c'/>
<feature policy='disable' name='avx2'/>
<feature policy='disable' name='rdseed'/>
<feature policy='disable' name='sha-ni'/>
<feature policy='disable' name='xsavec'/>
<feature policy='disable' name='fxsr_opt'/>
<feature policy='disable' name='misalignsse'/>
<feature policy='disable' name='3dnowprefetch'/>
<feature policy='disable' name='osvw'/>
<feature policy='disable' name='topoext'/>
<feature policy='disable' name='nrip-save'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>qemu64</model>

View File

@ -36,35 +36,43 @@
</enum>
</mode>
<mode name='host-model' supported='yes'>
<model fallback='forbid'>EPYC</model>
<model fallback='forbid'>Opteron_G3</model>
<vendor>AMD</vendor>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='ssse3'/>
<feature policy='require' name='sse4.1'/>
<feature policy='require' name='sse4.2'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='aes'/>
<feature policy='require' name='xsave'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='erms'/>
<feature policy='require' name='mpx'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='pcommit'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='clwb'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='la57'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='3dnowext'/>
<feature policy='require' name='3dnow'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='npt'/>
<feature policy='disable' name='vme'/>
<feature policy='disable' name='fma'/>
<feature policy='disable' name='avx'/>
<feature policy='disable' name='f16c'/>
<feature policy='disable' name='avx2'/>
<feature policy='disable' name='rdseed'/>
<feature policy='disable' name='sha-ni'/>
<feature policy='disable' name='xsavec'/>
<feature policy='disable' name='fxsr_opt'/>
<feature policy='disable' name='misalignsse'/>
<feature policy='disable' name='3dnowprefetch'/>
<feature policy='disable' name='osvw'/>
<feature policy='disable' name='topoext'/>
<feature policy='disable' name='nrip-save'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>qemu64</model>

View File

@ -36,35 +36,43 @@
</enum>
</mode>
<mode name='host-model' supported='yes'>
<model fallback='forbid'>EPYC</model>
<model fallback='forbid'>Opteron_G3</model>
<vendor>AMD</vendor>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='ssse3'/>
<feature policy='require' name='sse4.1'/>
<feature policy='require' name='sse4.2'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='aes'/>
<feature policy='require' name='xsave'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='erms'/>
<feature policy='require' name='mpx'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='pcommit'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='clwb'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='la57'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='3dnowext'/>
<feature policy='require' name='3dnow'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='npt'/>
<feature policy='disable' name='vme'/>
<feature policy='disable' name='fma'/>
<feature policy='disable' name='avx'/>
<feature policy='disable' name='f16c'/>
<feature policy='disable' name='avx2'/>
<feature policy='disable' name='rdseed'/>
<feature policy='disable' name='sha-ni'/>
<feature policy='disable' name='xsavec'/>
<feature policy='disable' name='fxsr_opt'/>
<feature policy='disable' name='misalignsse'/>
<feature policy='disable' name='3dnowprefetch'/>
<feature policy='disable' name='osvw'/>
<feature policy='disable' name='topoext'/>
<feature policy='disable' name='nrip-save'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>qemu64</model>

View File

@ -36,35 +36,43 @@
</enum>
</mode>
<mode name='host-model' supported='yes'>
<model fallback='forbid'>EPYC</model>
<model fallback='forbid'>Opteron_G3</model>
<vendor>AMD</vendor>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='ssse3'/>
<feature policy='require' name='sse4.1'/>
<feature policy='require' name='sse4.2'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='aes'/>
<feature policy='require' name='xsave'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='erms'/>
<feature policy='require' name='mpx'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='pcommit'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='clwb'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='la57'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='3dnowext'/>
<feature policy='require' name='3dnow'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='npt'/>
<feature policy='disable' name='vme'/>
<feature policy='disable' name='fma'/>
<feature policy='disable' name='avx'/>
<feature policy='disable' name='f16c'/>
<feature policy='disable' name='avx2'/>
<feature policy='disable' name='rdseed'/>
<feature policy='disable' name='sha-ni'/>
<feature policy='disable' name='xsavec'/>
<feature policy='disable' name='fxsr_opt'/>
<feature policy='disable' name='misalignsse'/>
<feature policy='disable' name='3dnowprefetch'/>
<feature policy='disable' name='osvw'/>
<feature policy='disable' name='topoext'/>
<feature policy='disable' name='nrip-save'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>qemu64</model>

View File

@ -36,36 +36,44 @@
</enum>
</mode>
<mode name='host-model' supported='yes'>
<model fallback='forbid'>EPYC</model>
<model fallback='forbid'>Opteron_G3</model>
<vendor>AMD</vendor>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='ssse3'/>
<feature policy='require' name='sse4.1'/>
<feature policy='require' name='sse4.2'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='aes'/>
<feature policy='require' name='xsave'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='erms'/>
<feature policy='require' name='mpx'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='pcommit'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='clwb'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='la57'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='3dnowext'/>
<feature policy='require' name='3dnow'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='npt'/>
<feature policy='require' name='svme-addr-chk'/>
<feature policy='disable' name='vme'/>
<feature policy='disable' name='fma'/>
<feature policy='disable' name='avx'/>
<feature policy='disable' name='f16c'/>
<feature policy='disable' name='avx2'/>
<feature policy='disable' name='rdseed'/>
<feature policy='disable' name='sha-ni'/>
<feature policy='disable' name='xsavec'/>
<feature policy='disable' name='fxsr_opt'/>
<feature policy='disable' name='misalignsse'/>
<feature policy='disable' name='3dnowprefetch'/>
<feature policy='disable' name='osvw'/>
<feature policy='disable' name='topoext'/>
<feature policy='disable' name='nrip-save'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>qemu64</model>

View File

@ -36,37 +36,45 @@
</enum>
</mode>
<mode name='host-model' supported='yes'>
<model fallback='forbid'>EPYC</model>
<model fallback='forbid'>Opteron_G3</model>
<vendor>AMD</vendor>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='ssse3'/>
<feature policy='require' name='sse4.1'/>
<feature policy='require' name='sse4.2'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='aes'/>
<feature policy='require' name='xsave'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='erms'/>
<feature policy='require' name='mpx'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='pcommit'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='clwb'/>
<feature policy='require' name='umip'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='la57'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='3dnowext'/>
<feature policy='require' name='3dnow'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='npt'/>
<feature policy='require' name='svme-addr-chk'/>
<feature policy='disable' name='vme'/>
<feature policy='disable' name='fma'/>
<feature policy='disable' name='avx'/>
<feature policy='disable' name='f16c'/>
<feature policy='disable' name='avx2'/>
<feature policy='disable' name='rdseed'/>
<feature policy='disable' name='sha-ni'/>
<feature policy='disable' name='xsavec'/>
<feature policy='disable' name='fxsr_opt'/>
<feature policy='disable' name='misalignsse'/>
<feature policy='disable' name='3dnowprefetch'/>
<feature policy='disable' name='osvw'/>
<feature policy='disable' name='topoext'/>
<feature policy='disable' name='nrip-save'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>qemu64</model>

View File

@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc,usb=off,dump-guest-core=off \
-accel kvm \
-cpu Penryn,sse4.1=off,sse4.2=off,popcnt=off,aes=off \
-cpu Conroe,cx16=on,sse4.1=off,sse4.2=off,popcnt=off,aes=off \
-m 214 \
-overcommit mem-lock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-i440fx-4.0,usb=off,dump-guest-core=off \
-accel tcg \
-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 Opteron_G3,acpi=on,ss=on,pclmulqdq=on,monitor=on,ssse3=on,sse4.1=on,sse4.2=on,movbe=on,aes=on,xsave=on,hypervisor=on,arat=on,fsgsbase=on,bmi1=on,smep=on,bmi2=on,erms=on,mpx=on,adx=on,smap=on,pcommit=on,clflushopt=on,clwb=on,pku=on,la57=on,xsaveopt=on,xgetbv1=on,mmxext=on,pdpe1gb=on,3dnowext=on,3dnow=on,cr8legacy=on,npt=on,misalignsse=off \
-m 214 \
-overcommit mem-lock=off \
-smp 6,sockets=6,cores=1,threads=1 \

View File

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