mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
cpu_x86: Introduce virCPUx86DataSetSignature
The API is useful for creating virCPUData in a hypervisor driver from data we got by querying the hypervisor. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
d3f831a97a
commit
f358a75ab3
@ -2720,6 +2720,17 @@ virCPUx86DataAddCPUID(virCPUDataPtr cpuData,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
virCPUx86DataSetSignature(virCPUDataPtr cpuData,
|
||||||
|
unsigned int family,
|
||||||
|
unsigned int model)
|
||||||
|
{
|
||||||
|
uint32_t signature = x86MakeSignature(family, model);
|
||||||
|
|
||||||
|
return x86DataAddSignature(&cpuData->data.x86, signature);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct cpuArchDriver cpuDriverX86 = {
|
struct cpuArchDriver cpuDriverX86 = {
|
||||||
.name = "x86",
|
.name = "x86",
|
||||||
.arch = archs,
|
.arch = archs,
|
||||||
|
@ -32,4 +32,8 @@ extern struct cpuArchDriver cpuDriverX86;
|
|||||||
int virCPUx86DataAddCPUID(virCPUDataPtr cpuData,
|
int virCPUx86DataAddCPUID(virCPUDataPtr cpuData,
|
||||||
const virCPUx86CPUID *cpuid);
|
const virCPUx86CPUID *cpuid);
|
||||||
|
|
||||||
|
int virCPUx86DataSetSignature(virCPUDataPtr cpuData,
|
||||||
|
unsigned int family,
|
||||||
|
unsigned int model);
|
||||||
|
|
||||||
#endif /* __VIR_CPU_X86_H__ */
|
#endif /* __VIR_CPU_X86_H__ */
|
||||||
|
@ -1003,6 +1003,7 @@ virCPUUpdate;
|
|||||||
|
|
||||||
# cpu/cpu_x86.h
|
# cpu/cpu_x86.h
|
||||||
virCPUx86DataAddCPUID;
|
virCPUx86DataAddCPUID;
|
||||||
|
virCPUx86DataSetSignature;
|
||||||
|
|
||||||
|
|
||||||
# datatypes.h
|
# datatypes.h
|
||||||
|
Loading…
Reference in New Issue
Block a user