Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx> Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx> --- Notes: Version 2: - no change src/cpu/cpu_x86.c | 19 ++++ .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 88 ++++++++--------- .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 88 ++++++++--------- tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 88 ++++++++--------- .../domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 92 +++++++++--------- .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 92 +++++++++--------- tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 92 +++++++++--------- .../domaincapsdata/qemu_5.1.0-q35.x86_64.xml | 92 +++++++++--------- .../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 92 +++++++++--------- tests/domaincapsdata/qemu_5.1.0.x86_64.xml | 92 +++++++++--------- .../domaincapsdata/qemu_5.2.0-q35.x86_64.xml | 92 +++++++++--------- .../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 92 +++++++++--------- tests/domaincapsdata/qemu_5.2.0.x86_64.xml | 92 +++++++++--------- .../domaincapsdata/qemu_6.0.0-q35.x86_64.xml | 94 +++++++++---------- .../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml | 94 +++++++++---------- tests/domaincapsdata/qemu_6.0.0.x86_64.xml | 94 +++++++++---------- .../domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 94 +++++++++---------- .../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 94 +++++++++---------- tests/domaincapsdata/qemu_6.1.0.x86_64.xml | 94 +++++++++---------- .../domaincapsdata/qemu_6.2.0-q35.x86_64.xml | 94 +++++++++---------- .../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 94 +++++++++---------- tests/domaincapsdata/qemu_6.2.0.x86_64.xml | 94 +++++++++---------- .../domaincapsdata/qemu_7.0.0-q35.x86_64.xml | 94 +++++++++---------- .../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml | 94 +++++++++---------- tests/domaincapsdata/qemu_7.0.0.x86_64.xml | 94 +++++++++---------- .../domaincapsdata/qemu_7.1.0-q35.x86_64.xml | 90 +++++++++--------- .../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml | 90 +++++++++--------- tests/domaincapsdata/qemu_7.1.0.x86_64.xml | 90 +++++++++--------- 28 files changed, 1264 insertions(+), 1245 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 9fcd6b8add..4d2379803c 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -3137,6 +3137,24 @@ virCPUx86GetModels(char ***models) } +static const char * +virCPUx86GetVendorForModel(const char *modelName) +{ + virCPUx86Map *map; + virCPUx86Model *model; + + if (!(map = virCPUx86GetMap())) + return NULL; + + model = x86ModelFind(map, modelName); + + if (!model || !model->vendor) + return NULL; + + return model->vendor->name; +} + + static int virCPUx86Translate(virCPUDef *cpu, virDomainCapsCPUModels *models) @@ -3539,6 +3557,7 @@ struct cpuArchDriver cpuDriverX86 = { .dataFormat = virCPUx86DataFormat, .dataParse = virCPUx86DataParse, .getModels = virCPUx86GetModels, + .getVendorForModel = virCPUx86GetVendorForModel, .translate = virCPUx86Translate, .expandFeatures = virCPUx86ExpandFeatures, .copyMigratable = virCPUx86CopyMigratable, diff --git a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml index fa86554892..dab12e5888 100644 --- a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml @@ -63,55 +63,55 @@ <mode name='custom' supported='yes'> <model usable='yes' vendor='unknown'>qemu64</model> <model usable='yes' vendor='unknown'>qemu32</model> - <model usable='no' vendor='unknown'>phenom</model> + <model usable='no' vendor='AMD'>phenom</model> <model usable='yes' vendor='unknown'>pentium3</model> <model usable='yes' vendor='unknown'>pentium2</model> <model usable='yes' vendor='unknown'>pentium</model> - <model usable='yes' vendor='unknown'>n270</model> + <model usable='yes' vendor='Intel'>n270</model> <model usable='yes' vendor='unknown'>kvm64</model> <model usable='yes' vendor='unknown'>kvm32</model> - <model usable='yes' vendor='unknown'>coreduo</model> - <model usable='yes' vendor='unknown'>core2duo</model> - <model usable='no' vendor='unknown'>athlon</model> - <model usable='yes' vendor='unknown'>Westmere-IBRS</model> - <model usable='yes' vendor='unknown'>Westmere</model> - <model usable='no' vendor='unknown'>Snowridge</model> - <model usable='no' vendor='unknown'>Skylake-Server-noTSX-IBRS</model> - <model usable='no' vendor='unknown'>Skylake-Server-IBRS</model> - <model usable='no' vendor='unknown'>Skylake-Server</model> - <model usable='yes' vendor='unknown'>Skylake-Client-noTSX-IBRS</model> - <model usable='yes' vendor='unknown'>Skylake-Client-IBRS</model> - <model usable='yes' vendor='unknown'>Skylake-Client</model> - <model usable='yes' vendor='unknown'>SandyBridge-IBRS</model> - <model usable='yes' vendor='unknown'>SandyBridge</model> - <model usable='yes' vendor='unknown'>Penryn</model> - <model usable='no' vendor='unknown'>Opteron_G5</model> - <model usable='no' vendor='unknown'>Opteron_G4</model> - <model usable='no' vendor='unknown'>Opteron_G3</model> - <model usable='yes' vendor='unknown'>Opteron_G2</model> - <model usable='yes' vendor='unknown'>Opteron_G1</model> - <model usable='yes' vendor='unknown'>Nehalem-IBRS</model> - <model usable='yes' vendor='unknown'>Nehalem</model> - <model usable='yes' vendor='unknown'>IvyBridge-IBRS</model> - <model usable='yes' vendor='unknown'>IvyBridge</model> - <model usable='no' vendor='unknown'>Icelake-Server-noTSX</model> - <model usable='no' vendor='unknown'>Icelake-Server</model> - <model usable='no' vendor='unknown'>Icelake-Client-noTSX</model> - <model usable='no' vendor='unknown'>Icelake-Client</model> - <model usable='yes' vendor='unknown'>Haswell-noTSX-IBRS</model> - <model usable='yes' vendor='unknown'>Haswell-noTSX</model> - <model usable='yes' vendor='unknown'>Haswell-IBRS</model> - <model usable='yes' vendor='unknown'>Haswell</model> - <model usable='no' vendor='unknown'>EPYC-IBPB</model> - <model usable='no' vendor='unknown'>EPYC</model> - <model usable='no' vendor='unknown'>Dhyana</model> - <model usable='yes' vendor='unknown'>Conroe</model> - <model usable='no' vendor='unknown'>Cascadelake-Server-noTSX</model> - <model usable='no' vendor='unknown'>Cascadelake-Server</model> - <model usable='yes' vendor='unknown'>Broadwell-noTSX-IBRS</model> - <model usable='yes' vendor='unknown'>Broadwell-noTSX</model> - <model usable='yes' vendor='unknown'>Broadwell-IBRS</model> - <model usable='yes' vendor='unknown'>Broadwell</model> + <model usable='yes' vendor='Intel'>coreduo</model> + <model usable='yes' vendor='Intel'>core2duo</model> + <model usable='no' vendor='AMD'>athlon</model> + <model usable='yes' vendor='Intel'>Westmere-IBRS</model> + <model usable='yes' vendor='Intel'>Westmere</model> + <model usable='no' vendor='Intel'>Snowridge</model> + <model usable='no' vendor='Intel'>Skylake-Server-noTSX-IBRS</model> + <model usable='no' vendor='Intel'>Skylake-Server-IBRS</model> + <model usable='no' vendor='Intel'>Skylake-Server</model> + <model usable='yes' vendor='Intel'>Skylake-Client-noTSX-IBRS</model> + <model usable='yes' vendor='Intel'>Skylake-Client-IBRS</model> + <model usable='yes' vendor='Intel'>Skylake-Client</model> + <model usable='yes' vendor='Intel'>SandyBridge-IBRS</model> + <model usable='yes' vendor='Intel'>SandyBridge</model> + <model usable='yes' vendor='Intel'>Penryn</model> + <model usable='no' vendor='AMD'>Opteron_G5</model> + <model usable='no' vendor='AMD'>Opteron_G4</model> + <model usable='no' vendor='AMD'>Opteron_G3</model> + <model usable='yes' vendor='AMD'>Opteron_G2</model> + <model usable='yes' vendor='AMD'>Opteron_G1</model> + <model usable='yes' vendor='Intel'>Nehalem-IBRS</model> + <model usable='yes' vendor='Intel'>Nehalem</model> + <model usable='yes' vendor='Intel'>IvyBridge-IBRS</model> + <model usable='yes' vendor='Intel'>IvyBridge</model> + <model usable='no' vendor='Intel'>Icelake-Server-noTSX</model> + <model usable='no' vendor='Intel'>Icelake-Server</model> + <model usable='no' vendor='Intel'>Icelake-Client-noTSX</model> + <model usable='no' vendor='Intel'>Icelake-Client</model> + <model usable='yes' vendor='Intel'>Haswell-noTSX-IBRS</model> + <model usable='yes' vendor='Intel'>Haswell-noTSX</model> + <model usable='yes' vendor='Intel'>Haswell-IBRS</model> + <model usable='yes' vendor='Intel'>Haswell</model> + <model usable='no' vendor='AMD'>EPYC-IBPB</model> + <model usable='no' vendor='AMD'>EPYC</model> + <model usable='no' vendor='Hygon'>Dhyana</model> + <model usable='yes' vendor='Intel'>Conroe</model> + <model usable='no' vendor='Intel'>Cascadelake-Server-noTSX</model> + <model usable='no' vendor='Intel'>Cascadelake-Server</model> + <model usable='yes' vendor='Intel'>Broadwell-noTSX-IBRS</model> + <model usable='yes' vendor='Intel'>Broadwell-noTSX</model> + <model usable='yes' vendor='Intel'>Broadwell-IBRS</model> + <model usable='yes' vendor='Intel'>Broadwell</model> <model usable='yes' vendor='unknown'>486</model> </mode> </cpu> ... -- 2.38.0