Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx> --- src/cpu/cpu_x86.c | 61 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 198e80a5c2..e197e31310 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -240,6 +240,37 @@ x86cpuidAndBits(virCPUx86CPUID *cpuid, cpuid->edx &= mask->edx; } + +static virCPUx86FeaturePtr +x86FeatureFind(virCPUx86MapPtr map, + const char *name) +{ + size_t i; + + for (i = 0; i < map->nfeatures; i++) { + if (STREQ(map->features[i]->name, name)) + return map->features[i]; + } + + return NULL; +} + + +static virCPUx86FeaturePtr +x86FeatureFindInternal(const char *name) +{ + size_t i; + size_t count = ARRAY_CARDINALITY(x86_kvm_features); + + for (i = 0; i < count; i++) { + if (STREQ(x86_kvm_features[i].name, name)) + return x86_kvm_features + i; + } + + return NULL; +} + + static int virCPUx86CPUIDSorter(const void *a, const void *b) { @@ -753,36 +784,6 @@ x86FeatureFree(virCPUx86FeaturePtr feature) } -static virCPUx86FeaturePtr -x86FeatureFind(virCPUx86MapPtr map, - const char *name) -{ - size_t i; - - for (i = 0; i < map->nfeatures; i++) { - if (STREQ(map->features[i]->name, name)) - return map->features[i]; - } - - return NULL; -} - - -static virCPUx86FeaturePtr -x86FeatureFindInternal(const char *name) -{ - size_t i; - size_t count = ARRAY_CARDINALITY(x86_kvm_features); - - for (i = 0; i < count; i++) { - if (STREQ(x86_kvm_features[i].name, name)) - return x86_kvm_features + i; - } - - return NULL; -} - - static int x86FeatureInData(const char *name, const virCPUx86Data *data, -- 2.14.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list