From 36cf8174b694e7864ea168a2ba443ca1ea4475d7 Mon Sep 17 00:00:00 2001 From: Wojciech Macek Date: Mon, 7 Apr 2014 07:06:39 +0200 Subject: [PATCH] bhyve: support for connectBaselineCPU Implement bhyveConnectBaselineCPU to support OpenStack/Nova --- src/bhyve/bhyve_driver.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 461a0707a9..f70eff5bcf 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -980,6 +980,25 @@ bhyveNodeSetMemoryParameters(virConnectPtr conn, return nodeSetMemoryParameters(params, nparams, flags); } +static char * +bhyveConnectBaselineCPU(virConnectPtr conn ATTRIBUTE_UNUSED, + const char **xmlCPUs, + unsigned int ncpus, + unsigned int flags) +{ + char *cpu = NULL; + + virCheckFlags(VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, NULL); + + if (virConnectBaselineCPUEnsureACL(conn) < 0) + goto cleanup; + + cpu = cpuBaselineXML(xmlCPUs, ncpus, NULL, 0, flags); + + cleanup: + return cpu; +} + static virDriver bhyveDriver = { .no = VIR_DRV_BHYVE, .name = "bhyve", @@ -1017,6 +1036,7 @@ static virDriver bhyveDriver = { .nodeGetCPUMap = bhyveNodeGetCPUMap, /* 1.2.3 */ .nodeGetMemoryParameters = bhyveNodeGetMemoryParameters, /* 1.2.3 */ .nodeSetMemoryParameters = bhyveNodeSetMemoryParameters, /* 1.2.3 */ + .connectBaselineCPU = bhyveConnectBaselineCPU, /* 1.2.4 */ }; -- GitLab