cpu_x86: Add virCPUx86DataGetSignature for tests

The function exports the functionality of x86DataToSignatureFull and
x86MakeSignature to the test suite.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jiri Denemark 2019-02-25 10:04:21 +01:00
parent 793a9293ca
commit 661307b4b2
3 changed files with 18 additions and 0 deletions

View File

@ -3070,6 +3070,18 @@ virCPUx86DataSetSignature(virCPUDataPtr cpuData,
} }
uint32_t
virCPUx86DataGetSignature(virCPUDataPtr cpuData,
unsigned int *family,
unsigned int *model,
unsigned int *stepping)
{
x86DataToSignatureFull(&cpuData->data.x86, family, model, stepping);
return x86MakeSignature(*family, *model, *stepping);
}
int int
virCPUx86DataSetVendor(virCPUDataPtr cpuData, virCPUx86DataSetVendor(virCPUDataPtr cpuData,
const char *vendor) const char *vendor)

View File

@ -34,6 +34,11 @@ int virCPUx86DataSetSignature(virCPUDataPtr cpuData,
unsigned int model, unsigned int model,
unsigned int stepping); unsigned int stepping);
uint32_t virCPUx86DataGetSignature(virCPUDataPtr cpuData,
unsigned int *family,
unsigned int *model,
unsigned int *stepping);
int virCPUx86DataSetVendor(virCPUDataPtr cpuData, int virCPUx86DataSetVendor(virCPUDataPtr cpuData,
const char *vendor); const char *vendor);

View File

@ -1210,6 +1210,7 @@ virCPUValidateFeatures;
# cpu/cpu_x86.h # cpu/cpu_x86.h
virCPUx86DataAddCPUID; virCPUx86DataAddCPUID;
virCPUx86DataAddFeature; virCPUx86DataAddFeature;
virCPUx86DataGetSignature;
virCPUx86DataSetSignature; virCPUx86DataSetSignature;
virCPUx86DataSetVendor; virCPUx86DataSetVendor;