Useful for libvirt users (e.g. virt-manager) to extract CPU map described model names. However setting of cpuid is not yet implemented. Signed-off-by: Joao Martins <joao.m.martins@xxxxxxxxxx> --- src/libxl/libxl_driver.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index a00dd55..c35a292 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -5798,6 +5798,19 @@ libxlConnectBaselineCPU(virConnectPtr conn, return cpu; } +static int +libxlConnectGetCPUModelNames(virConnectPtr conn, + const char *arch, + char ***models, + unsigned int flags) +{ + virCheckFlags(0, -1); + if (virConnectGetCPUModelNamesEnsureACL(conn) < 0) + return -1; + + return cpuGetModels(arch, models); +} + static virHypervisorDriver libxlHypervisorDriver = { .name = LIBXL_DRIVER_NAME, .connectOpen = libxlConnectOpen, /* 0.9.0 */ @@ -5902,6 +5915,7 @@ static virHypervisorDriver libxlHypervisorDriver = { .connectGetDomainCapabilities = libxlConnectGetDomainCapabilities, /* 2.0.0 */ .connectCompareCPU = libxlConnectCompareCPU, /* 2.1.0 */ .connectBaselineCPU = libxlConnectBaselineCPU, /* 2.1.0 */ + .connectGetCPUModelNames = libxlConnectGetCPUModelNames /* 2.1.0 */ }; static virConnectDriver libxlConnectDriver = { -- 2.1.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list