
On Thursday 26 June 2014 03:41 PM, Prerna Saxena wrote:
PowerISA allows processors to run VMs in binary compatibility ("compat") mode supporting an older version of ISA. Eg,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 PowerISA v2.05.
QEMU has recently added support to explicitly denote a VM running in compatibility mode through commit 6d9412ea. Now, a "compat" mode VM can be run by invoking this qemu commandline on a POWER8 host: -cpu host,compat=power7 as against the older specification of "-cpu power7".
However, running in compatibility mode is not identical to running natively on an older processor. Hence the virtualization stack needs to explicitly provide for a compat-mode VM.
This patch allows libvirt to extend the "fallback" semantics of cpu model to describe this new mode for PowerKVM guests. Additionally with the new scheme of things, qemu doesn't provide a way to query for the supported compat models and models returned when querying with '-cpu ?' are no longer valid. Hence removing the check cpuModelIsAllowed() for now.
When a user wants to request a power7 vm to run in compatibility mode on a Power8 host, this can be described in XML as follows : <cpu mode='custom' match='exact'> <model fallback='compat'>power7</model> </cpu>
An alternative approach could be to leave the libvirt XML intact, and merely change the backend qemu command generation when the VM-requested cpu does not match the host processor.
Looking forward to suggestions on how this can best be implemented..
Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com> Signed-off-by: Pradipta Kr. Banerjee <bpradip@in.ibm.com> Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
Ping ! Would folks have some feedback on the patch ? Regards, -- Prerna Saxena Linux Technology Centre, IBM Systems and Technology Lab, Bangalore, India