mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tests: Switch to sparse initialization of virCPUDef
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
@@ -34,20 +34,16 @@ static virCPUFeatureDef cpuDefaultFeatures[] = {
|
||||
{ (char *) "lahf_lm", -1 },
|
||||
};
|
||||
static virCPUDef cpuDefaultData = {
|
||||
VIR_CPU_TYPE_HOST, /* type */
|
||||
0, /* mode */
|
||||
0, /* match */
|
||||
VIR_ARCH_X86_64, /* arch */
|
||||
(char *) "core2duo", /* model */
|
||||
NULL, /* vendor_id */
|
||||
0, /* fallback */
|
||||
(char *) "Intel", /* vendor */
|
||||
1, /* sockets */
|
||||
2, /* cores */
|
||||
1, /* threads */
|
||||
ARRAY_CARDINALITY(cpuDefaultFeatures), /* nfeatures */
|
||||
ARRAY_CARDINALITY(cpuDefaultFeatures), /* nfeatures_max */
|
||||
cpuDefaultFeatures, /* features */
|
||||
.type = VIR_CPU_TYPE_HOST,
|
||||
.arch = VIR_ARCH_X86_64,
|
||||
.model = (char *) "core2duo",
|
||||
.vendor = (char *) "Intel",
|
||||
.sockets = 1,
|
||||
.cores = 2,
|
||||
.threads = 1,
|
||||
.nfeatures = ARRAY_CARDINALITY(cpuDefaultFeatures),
|
||||
.nfeatures_max = ARRAY_CARDINALITY(cpuDefaultFeatures),
|
||||
.features = cpuDefaultFeatures,
|
||||
};
|
||||
|
||||
static virCPUFeatureDef cpuHaswellFeatures[] = {
|
||||
@@ -77,20 +73,16 @@ static virCPUFeatureDef cpuHaswellFeatures[] = {
|
||||
{ (char *) "lahf_lm", -1 },
|
||||
};
|
||||
static virCPUDef cpuHaswellData = {
|
||||
VIR_CPU_TYPE_HOST, /* type */
|
||||
0, /* mode */
|
||||
0, /* match */
|
||||
VIR_ARCH_X86_64, /* arch */
|
||||
(char *) "Haswell", /* model */
|
||||
NULL, /* vendor_id */
|
||||
0, /* fallback */
|
||||
(char *) "Intel", /* vendor */
|
||||
1, /* sockets */
|
||||
2, /* cores */
|
||||
2, /* threads */
|
||||
ARRAY_CARDINALITY(cpuHaswellFeatures), /* nfeatures */
|
||||
ARRAY_CARDINALITY(cpuHaswellFeatures), /* nfeatures_max */
|
||||
cpuHaswellFeatures, /* features */
|
||||
.type = VIR_CPU_TYPE_HOST,
|
||||
.arch = VIR_ARCH_X86_64,
|
||||
.model = (char *) "Haswell",
|
||||
.vendor = (char *) "Intel",
|
||||
.sockets = 1,
|
||||
.cores = 2,
|
||||
.threads = 2,
|
||||
.nfeatures = ARRAY_CARDINALITY(cpuHaswellFeatures),
|
||||
.nfeatures_max = ARRAY_CARDINALITY(cpuHaswellFeatures),
|
||||
.features = cpuHaswellFeatures,
|
||||
};
|
||||
|
||||
static virCPUDef cpuPower8Data = {
|
||||
|
||||
Reference in New Issue
Block a user