Re: [libvirt] [v5][Patch 0/4] Libvirt CPU enhancements for Power KVM

2014-11-04 Thread Prerna Saxena

On Monday 03 November 2014 02:57 PM, Michal Privoznik wrote:
 On 31.10.2014 10:15, Prerna Saxena wrote:
 This patch series is a collection of enhancements for PowerPC CPUs on 
 PowerKVM.
 In this iteration, I have followed Dan's suggestion on using existing cpu 
 mode
 format to describe powerPC compatibility mode.
 Hope this can finally make it for 1.2.10 !

   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 : Improve PVR handling to fall back to cpu generation.
 Patch 4/4 : Add documentation describing compat mode usage for PowerPC 
 guests.

 What am I missing here is a test case. Can you please add a qemuxml2argv test 
 case? Just send it as a follow up patch and I'll merge the code then.

 Michal

Hi Michal,
I have sent out a v6 of the patches rebased on top of latest master.
Apart from introducing a testcase, these have minor changes over v5.

Thanks for the review,

-- 
Prerna Saxena

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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [v5][Patch 0/4] Libvirt CPU enhancements for Power KVM

2014-11-03 Thread Michal Privoznik

On 31.10.2014 10:15, Prerna Saxena wrote:

This patch series is a collection of enhancements for PowerPC CPUs on PowerKVM.
In this iteration, I have followed Dan's suggestion on using existing cpu mode
format to describe powerPC compatibility mode.
Hope this can finally make it for 1.2.10 !

  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 : Improve PVR handling to fall back to cpu generation.
Patch 4/4 : Add documentation describing compat mode usage for PowerPC guests.


What am I missing here is a test case. Can you please add a qemuxml2argv 
test case? Just send it as a follow up patch and I'll merge the code then.


Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [v5][Patch 0/4] Libvirt CPU enhancements for Power KVM

2014-10-31 Thread Prerna Saxena
This patch series is a collection of enhancements for PowerPC CPUs on PowerKVM.
In this iteration, I have followed Dan's suggestion on using existing cpu mode 
format to describe powerPC compatibility mode.
Hope this can finally make it for 1.2.10 !

 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 : Improve PVR handling to fall back to cpu generation.
Patch 4/4 : Add documentation describing compat mode usage for PowerPC guests.

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,3 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 POWER7 host, conforming to PowerISA version 2.06, will run VMs 
with power7 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 POWER7 host can run a power6 
VM, conforming to power ISA v2.05.
  Similarly, a POWER8 host can run a power7 VM conforming to PowerISA 
v2.06.

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 not valid. Instead, the 
recommended practice is to use the matching compat mode, if the requested cpu 
type differs from the host.
Patches 2-3 address various aspects of this change.

* Patch 2 : Adds support for generating the correct command line for QEMU. 
Existing xml semantics of 'host-model' are interpreted differently on PowerPc 
architecture 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 : Documentation is added to explain functionality introduced by Patch 
2.

Changelog:
=
v1 : https://www.redhat.com/archives/libvir-list/2014-June/msg01338.html
v2 : http://www.redhat.com/archives/libvir-list/2014-October/msg00351.html
v3 : http://www.mail-archive.com/libvir-list@redhat.com/msg104010.html
v4:  http://www.mail-archive.com/libvir-list@redhat.com/msg104067.html

Changes since v4:

* Patches 1,3 already ack'ed by Michal, and have been posted unchanged.
* In Patch 2,Discarded fallback=compat, and implemented Dan's suggestion to 
overload cpu mode host-model.
Now, on PowerPc, a VM with this XML schema will automatically be a compat-mode 
VM:
cpu mode='host-model'
modelpower7/model
  /cpu
* Introduced a new patch '4' to add documentation that explains this.

 Regards,

-- 
Prerna Saxena

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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list