rpms/python-virtinst/devel virtinst-0.500.2-use-x2apic.patch, NONE, 1.1 python-virtinst.spec, 1.78, 1.79
Cole Robinson
crobinso at fedoraproject.org
Mon Mar 22 20:00:58 UTC 2010
Author: crobinso
Update of /cvs/pkgs/rpms/python-virtinst/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv28123
Modified Files:
python-virtinst.spec
Added Files:
virtinst-0.500.2-use-x2apic.patch
Log Message:
Enable x2apic for new KVM guests
virtinst-0.500.2-use-x2apic.patch:
CapabilitiesParser.py | 3 +++
Guest.py | 17 +++++++++++++++++
2 files changed, 20 insertions(+)
--- NEW FILE virtinst-0.500.2-use-x2apic.patch ---
diff -rup virtinst-0.500.2/virtinst/CapabilitiesParser.py foo/virtinst/CapabilitiesParser.py
--- virtinst-0.500.2/virtinst/CapabilitiesParser.py 2010-02-08 23:07:04.000000000 -0500
+++ foo/virtinst/CapabilitiesParser.py 2010-03-22 15:05:19.530904000 -0400
@@ -90,6 +90,7 @@ class Host(object):
def __init__(self, node = None):
# e.g. "i686" or "x86_64"
self.arch = None
+ self.model = None
self.features = CapabilityFeatures()
self.topology = None
@@ -115,6 +116,8 @@ class Host(object):
while n:
if n.name == "arch":
self.arch = n.content
+ elif n.name == "model":
+ self.model = n.content
elif n.name == "features":
self.features = CapabilityFeatures(n)
n = n.next
diff -rup virtinst-0.500.2/virtinst/Guest.py foo/virtinst/Guest.py
--- virtinst-0.500.2/virtinst/Guest.py 2010-03-22 15:03:37.220776000 -0400
+++ foo/virtinst/Guest.py 2010-03-22 15:07:16.032765000 -0400
@@ -695,6 +695,22 @@ class Guest(object):
"""
return self.clock.get_xml_config()
+ def _get_cpu_xml(self):
+ """
+ Return <cpu> XML
+ """
+ xml = ""
+ is_kvm = self.type == "kvm"
+ model = self._caps.host.model
+
+ if is_kvm and model:
+ xml += " <cpu match='exact'>\n"
+ xml += " <model>%s</model>\n" % model
+ xml += " <feature policy='force' name='x2apic'/>\n"
+ xml += " </cpu>"
+
+ return xml
+
def _get_seclabel_xml(self):
"""
Return <seclabel> XML
@@ -718,6 +734,7 @@ class Guest(object):
xml = _util.xml_append(xml,
self.installer.get_install_xml(self, install))
xml = _util.xml_append(xml, self._get_features_xml())
+ xml = _util.xml_append(xml, self._get_cpu_xml())
xml = _util.xml_append(xml, self._get_clock_xml())
return xml
Index: python-virtinst.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-virtinst/devel/python-virtinst.spec,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -p -r1.78 -r1.79
--- python-virtinst.spec 22 Mar 2010 00:49:14 -0000 1.78
+++ python-virtinst.spec 22 Mar 2010 20:00:58 -0000 1.79
@@ -17,12 +17,14 @@
Summary: Python modules and utilities for installing virtual machines
Name: python-%{appname}
Version: 0.500.2
-Release: 2%{_extra_release}
+Release: 3%{_extra_release}
Source0: http://virt-manager.org/download/sources/%{appname}/%{appname}-%{version}.tar.gz
# Improve clone progress reporting (bz 550870)
Patch1: %{appname}-%{version}-improve-clone-progress.patch
# virt-install: Fix windows installs
Patch2: %{appname}-%{version}-fix-windows-installs.patch
+# Enable x2apic for new KVM guests
+Patch3: %{appname}-%{version}-use-x2apic.patch
License: GPLv2+
Group: Development/Libraries
@@ -52,6 +54,7 @@ and install new VMs) and virt-clone (clo
%setup -q -n %{appname}-%{version}
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
python setup.py build
@@ -87,6 +90,9 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/virt-convert
%changelog
+* Mon Mar 22 2010 Cole Robinson <crobinso at redhat.com> - 0.500.2-3.fc14
+- Enable x2apic for new KVM guests
+
* Sun Mar 21 2010 Cole Robinson <crobinso at redhat.com> - 0.500.2-2.fc14
- Improve clone progress reporting (bz 550870)
- virt-install: Fix windows installs
More information about the scm-commits
mailing list