]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Ensure 'arch' is always set in cpuArchNodeData
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 4 Sep 2013 16:41:55 +0000 (17:41 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 5 Sep 2013 10:33:46 +0000 (11:33 +0100)
commit66ec11ade4664c85a158a2c309517baa8b5b048f
treeeced6dc4777ea23613d7d6b5696a766a2f5a412c
parentbbcdd9b5dc14146ab944f92807d015b03a2564ea
Ensure 'arch' is always set in cpuArchNodeData

The s390, ppc and arm CPU drivers never set the 'arch' field
in their impl of cpuArchNodeData. This leads to error messages
being reported from cpuDataFree later, due to trying to use
VIR_ARCH_NONE.

 #0  virRaiseErrorFull (filename=filename@entry=0x76f94434 "cpu/cpu.c", funcname=funcname@entry=0x76f942dc <__FUNCTION__.18096> "cpuGetSubDriver", linenr=linenr@entry=58,
     domain=domain@entry=31, code=code@entry=1, level=level@entry=VIR_ERR_ERROR, str1=0x76f70e18 "internal error: %s",
     str2=str2@entry=0x7155f2ec "undefined hardware architecture", str3=str3@entry=0x0, int1=int1@entry=-1, int2=int2@entry=-1, fmt=0x76f70e18 "internal error: %s")
     at util/virerror.c:646
 #1  0x76e682ea in virReportErrorHelper (domcode=domcode@entry=31, errorcode=errorcode@entry=1, filename=0x76f94434 "cpu/cpu.c",
     funcname=0x76f942dc <__FUNCTION__.18096> "cpuGetSubDriver", linenr=linenr@entry=58, fmt=0x76f7e7e4 "%s") at util/virerror.c:1292
 #2  0x76ed82d4 in cpuGetSubDriver (arch=<optimized out>) at cpu/cpu.c:57
 #3  cpuGetSubDriver (arch=VIR_ARCH_NONE) at cpu/cpu.c:51
 #4  0x76ed8818 in cpuDataFree (data=data@entry=0x70c22d78) at cpu/cpu.c:216
 #5  0x716aaec0 in virQEMUCapsInitCPU (arch=VIR_ARCH_ARMV7L, caps=0x70c29a08) at qemu/qemu_capabilities.c:867

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/cpu/cpu.c
src/cpu/cpu.h
src/cpu/cpu_arm.c
src/cpu/cpu_powerpc.c
src/cpu/cpu_s390.c
src/cpu/cpu_x86.c