[libvirt] [RFC PATCH v2 0/4] Libvirt for PowerPC

Prerna Saxena prerna at linux.vnet.ibm.com
Tue Nov 15 02:44:17 UTC 2011


On 11/15/2011 02:36 AM, Stefan Berger wrote:
> On 11/14/2011 09:43 AM, Prerna Saxena wrote:
>> Hi,
>> Recent development in KVM for 64-bit Power ISA Book3S machines, allows
>> users to run multiple KVM guest instances on POWER7 and PPC970
>> processor based systems. Also qemu-system-ppc64 has been enhanced to
>> support a new machine type "pseries" suitable for Power Book3S machines.
>> This addition effectively brings the KVM+qemu combination to run
>> multiple guest instances on a Power Book3S machine.
>>
>> Libvirt continues to be the key interface to configure and manage the
>> KVM guest instances on x86. This patch set is an effort to enable
>> libvirt to support KVM guest configuration and management on Power Book3S
>> machines.
>>
>> Based on community discussion around the earlier version, this patch
>> series augments the present 'kvm' driver to support PowerPC-KVM based
>> guests. Since some of the supported devices vary between architectures,
>> the code is now reworked to dynamically choose the correct handler
>> function based on guest domain architecture at runtime (def->os.arch).
>>
>> This patch series consists of 4 patches :
>> Patch 1/4 : Use sysfs to gather host topology. Presently libvirt
>> depends on /proc/cpuinfo gather CPU, cores, threads, etc
>> This is highly architecture dependent. A alternative is
>> to use sysfs, which provides a platform-neutral interface
>> to parse CPU topology.
>> Patch 2/4 : Add PowerPC CPU Driver
>> Patch 3/4 : Add support for qemu-system-ppc64
>> Patch 4/4 : Refactor qemu commmand-line generation to separate out arch-
>> specific options from generic command line.
>>
>> Changelog from v1:
>> * Patches 1,2,3 unchanged ; The hacks in Patch 4 of v1 have been
>> replaced by a new patch to neatly select arch-specific features.
>>
>> Awaiting comments and feedback,
> A few quick comments:
>
> Run 'make syntax-check'. Some cleanup needs to be done.
>
> Also use ATTRIBUTE_UNUSED on variables that are not use, like here when
> compiling on x86.
>
> cpu/cpu_powerpc.c: In function 'PowerPCDecode':
> cpu/cpu_powerpc.c:50:28: warning: unused parameter 'cpu'
> [-Wunused-parameter]
> cpu/cpu_powerpc.c:51:36: warning: unused parameter 'data'
> [-Wunused-parameter]
> cpu/cpu_powerpc.c:52:28: warning: unused parameter 'models'
> [-Wunused-parameter]
> cpu/cpu_powerpc.c:53:28: warning: unused parameter 'nmodels'
> [-Wunused-parameter]
> cpu/cpu_powerpc.c:54:27: warning: unused parameter 'preferred'
> [-Wunused-parameter]
> cpu/cpu_powerpc.c: At top level:
> cpu/cpu_powerpc.c:75:5: warning: initialization from incompatible
> pointer type
> cpu/cpu_powerpc.c: In function 'PowerPCDataFree':
> cpu/cpu_powerpc.c:66:1: warning: control reaches end of non-void
> function [-Wreturn-type]
>
> nodeinfo.c: In function 'linuxNodeInfoCPUPopulate':
> nodeinfo.c:287:5: warning: suggest parentheses around assignment used as
> truth value [-Wparentheses]
> nodeinfo.c:202:36: warning: unused parameter 'need_hyperthreads'
> [-Wunused-parameter]
>
> qemu/qemu_command.c: In function 'qemuBuildX86CommandLine':
> qemu/qemu_command.c:5250:17: warning: too many arguments for format
> [-Wformat-extra-args]
> qemu/qemu_command.c:5201:41: warning: unused parameter 'conn'
> [-Wunused-parameter]
> qemu/qemu_command.c: In function 'qemuBuildCommandLine':
> qemu/qemu_command.c:3264:35: warning: 'qemuCmdFunc' may be used
> uninitialized in this function [-Wuninitialized]
>
> Some of the code (part 4) when I looked seemed to have indentation
> problems.
>
> Stefan
>
>
Hi Stefan,
Thank you for your comments. I will fix these warnings, and use
ATTRIBUTE_UNUSED for variables not in use.

Regards,
-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India




More information about the libvir-list mailing list