[PATCH 0/2] VirtIO and vhost support in ppc64

This patch set changes the RHEL and SLES versions that support virtio in PPC64. Also, it disable vhost feature for LE (PPC Little Endian) distros: Ubuntu 14.04 and SLES 12 Rodrigo Trujillo (2): Change modern distro versions for PPC Disable vhost feature in Ubuntu and SLES (PPC64 LE) src/kimchi/osinfo.py | 4 ++-- src/kimchi/vmtemplate.py | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) -- 1.9.3

This patch changes the version of modern distro for PPC to RHEL >= 6.5 and SLES >= 11 SP3. Modern distro in PPC can use virtio. Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com> --- src/kimchi/osinfo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kimchi/osinfo.py b/src/kimchi/osinfo.py index d2a1c1d..3064f4c 100644 --- a/src/kimchi/osinfo.py +++ b/src/kimchi/osinfo.py @@ -60,10 +60,10 @@ modern_version_bases = {'x86': {'debian': '6.0', 'ubuntu': '7.10', 'opensuse': '10.3', 'centos': '5.3', 'rhel': '6.0', 'fedora': '16', 'gentoo': '0', 'sles': '11'}, - 'power': {'rhel': '7.0', 'fedora': '19', + 'power': {'rhel': '6.5', 'fedora': '19', 'ubuntu': '14.04', 'opensuse': '13.1', - 'sles': '12'}} + 'sles': '11sp3'}} icon_available_distros = [icon[5:-4] for icon in glob.glob1('%s/images/' % paths.ui_dir, 'icon-*.png')] -- 1.9.3

There are know issues related to vhost feature and Little Endian distros. This patch sets driver name='qemu', disabling the vhost feature when libvirt starts a virtual machine. LE Distros: Ubuntu >= 14.04 and SLES >= 12. Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com> --- src/kimchi/vmtemplate.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py index 8d5217a..4b0f398 100644 --- a/src/kimchi/vmtemplate.py +++ b/src/kimchi/vmtemplate.py @@ -23,6 +23,9 @@ import socket import urlparse +from distutils.version import LooseVersion + + from kimchi import osinfo from kimchi.exception import InvalidParameter, IsoFormatError from kimchi.isoinfo import IsoImage @@ -265,15 +268,27 @@ drive=drive-%(bus)s0-1-0,id=%(bus)s0-1-0'/> ret.append(info) return ret + def _disable_vhost(self): + # Hack to disable vhost feature in Ubuntu LE and SLES LE (PPC) + driver = "" + if self.info['arch'] == 'ppc64' and \ + ((self.info['os_distro'] == 'ubuntu' and LooseVersion( + self.info['os_version']) >= LooseVersion('14.04')) or + (self.info['os_distro'] == 'sles' and LooseVersion( + self.info['os_version']) >= LooseVersion('12'))): + driver = " <driver name='qemu'/>\n " + return driver + def _get_networks_xml(self): network = """ <interface type='network'> <source network='%(network)s'/> <model type='%(nic_model)s'/> - </interface> + %(driver)s</interface> """ networks = "" - net_info = {"nic_model": self.info['nic_model']} + net_info = {"nic_model": self.info['nic_model'], + "driver": self._disable_vhost()} for nw in self.info['networks']: net_info['network'] = nw networks += network % net_info -- 1.9.3

-- Tested-by: Paulo Vital <pvital@linux.vnet.ibm.com> Reviewed-by: Paulo Vital <pvital@linux.vnet.ibm.com> On Wed, 2014-07-30 at 19:27 -0300, Rodrigo Trujillo wrote:
This patch set changes the RHEL and SLES versions that support virtio in PPC64. Also, it disable vhost feature for LE (PPC Little Endian) distros: Ubuntu 14.04 and SLES 12
Rodrigo Trujillo (2): Change modern distro versions for PPC Disable vhost feature in Ubuntu and SLES (PPC64 LE)
src/kimchi/osinfo.py | 4 ++-- src/kimchi/vmtemplate.py | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-)
participants (3)
-
Aline Manera
-
Paulo Ricardo Paz Vital
-
Rodrigo Trujillo