The curent libvirt CPU driver for s390 does not return a host CPU model.
This patch returns 'host' according to the other platforms that would
not decode any CPU model.
This is an intermediate bugfix due to a discussion on OpenStack mailing
list. The final patch introducing the CPU model support for s390x will
exchange the hard-coded decode method.
Signed-off-by: Daniel Hansel <daniel.hansel@linux.vnet.ibm.com>
#include <config.h>
#include "viralloc.h"
+#include "virstring.h"
#include "cpu.h"
static int
-s390Decode(virCPUDefPtr cpu ATTRIBUTE_UNUSED,
+s390Decode(virCPUDefPtr cpu,
const virCPUData *data ATTRIBUTE_UNUSED,
const char **models ATTRIBUTE_UNUSED,
unsigned int nmodels ATTRIBUTE_UNUSED,
virCheckFlags(VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, -1);
+ if (cpu->model == NULL &&
+ VIR_STRDUP(cpu->model, "host") < 0)
+ return -1;
+
return 0;
}