Hi Daniel,
... first ... a happy new year 2015 to all of you.
I have seen that you have suggested at Openstack review of the s390x cpu model
issue (link:
https://review.openstack.org/#/c/137424/) to post a link to this
Openstack review. Completed now. :-)
It would be nice if my intermediate patch could be reviewed and pushed.
This patch is tested successfully to solve the Openstack issue and can be used
until I will provide my patch set that will implement the s390x cpu model
support at all.
Thanks in advance.
Kind regards
Daniel Hansel
On 19.12.2014 15:49, Daniel Hansel wrote:
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(a)linux.vnet.ibm.com>
---
src/cpu/cpu_s390.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/cpu/cpu_s390.c b/src/cpu/cpu_s390.c
index f9d7e21..23a7f9d 100644
--- a/src/cpu/cpu_s390.c
+++ b/src/cpu/cpu_s390.c
@@ -25,6 +25,7 @@
#include <config.h>
#include "viralloc.h"
+#include "virstring.h"
#include "cpu.h"
@@ -47,7 +48,7 @@ s390NodeData(virArch arch)
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,
@@ -57,6 +58,10 @@ s390Decode(virCPUDefPtr cpu ATTRIBUTE_UNUSED,
virCheckFlags(VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, -1);
+ if (cpu->model == NULL &&
+ VIR_STRDUP(cpu->model, "host") < 0)
+ return -1;
+
return 0;
}
--
Mit freundlichen Grüßen / Kind regards
Daniel Hansel
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294