This patch series is a collection of enhancements for PowerPC CPUs on PowerKVM.
Series Summary:
==========
Patch 1/4 : Introduce a new architecture 'ppc64le' for libvirt.
Patch 2/4 : Add libvirt support for VMs running in 'compat' mode on Power KVM.
Patch 3/4 : Optimize PVR comparison for PowerPC CPUs.
Patch 4/4 : Correctly model available CPUs in response to PowerPC QEMU implementation.
Detail:
====
* PowerPC has traditionally been a Big-endian architecture. However, with PowerPC ISA
version 2.07, it can run in Little-endian mode as well. IBM Power8 processors, compliant
with ISA 2.07 allow
launching VMs in
little-endian mode. This is signified by 'ppc64le' architecture. Patch 1 adds this
support to libvirt, to allow running VMs based on ppc64le architecture.
* Patch 2-4 tweak libvirt to correctly model PowerPC CPUs based on recent PowerKVM
implementation.
PowerKVM permits VMs with vcpus in the following allowed modes :
i) Host native mode:
where the vcpu seen in the VM belongs to the same processor generation as the host.
Example: A power8 host, conforming to PowerISA version 2.07, will run VMs with
"power8" vcpus.
ii) Binary Compatibility ("compat") mode:
PowerISA allows processors to run VMs in binary compatibility ("compat")
mode supporting an older version of ISA.
As an example: In compatibility mode, a POWER8 host can run a "power7" VM
conforming to PowerISA v2.06, while a POWER7 host can run a "power6" VM,
conforming to power ISA v2.05.
QEMU has recently added support to explicitly denote a VM running in compatibility mode
through commits 6d9412ea & 8dfa3a5e85. Henceforth, VMs of type (i) will be invoked
with the QEMU invocation
"-cpu host", while VMs of type (ii) will be invoked using "-cpu host,
compat=power6".
Now, an explicit cpu selection using "-cpu POWER6" is moot, and the recommended
practice is to use the matching compat mode, if the requested cpu type differs from the
host.
Patches 2-4 address various aspects of this change.
* Patch 2 : Adds support for generating the correct command line for QEMU. New xml
semantics are introduced to signify this type.
* Patch 3 : PowerKVM vCPUs differ uniquely across generations ( such as power6, power7,
power8). Each generation signifies a new PowerISA version that exhibits features unique to
that generation. The
higher order 16 bits of PVR denote the processor generation and the lower order 16 bits
denote the cpu chip (sub)version.
For all practical purposes of launching a VM, we care about the generation the vCPU will
belong to, and not specifically the chip version. In fact, PowerKVM does not seek out
specification of a unique
chip version(such as POWER7_v2.3) for running a vCPU. This patch updates the libvirt PVR
check to reflect this relationship.
* Patch 4: As specified in QEMU commit 8dfa3a5e85, the supported modes for a
"compat" CPU are power6/power7/power8. This patch amends cpu_map.xml to
understand these modes. PPC64 CPU Test cases are
also updated accordingly.
This patch also includes a test case for compat mode, introduced in patch 2.
Changelog:
======
Patch 1/4 : This is v1.
Patch 2/4 : Rebased initial patch
https://www.redhat.com/archives/libvir-list/2014-June/msg01338.html
Patch 3/4, 4/4 : This is v2, addressing response
https://www.redhat.com/archives/libvir-list/2014-August/msg00859.html
--
Prerna Saxena
Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India