summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCole Robinson <crobinso@fedoraproject.org>2010-03-22 20:00:58 +0000
committerCole Robinson <crobinso@fedoraproject.org>2010-03-22 20:00:58 +0000
commit7a684cb65d69f2b116809456bed99ed32ca44080 (patch)
tree06a1c2c0e01d45db01155ce84966927bbf2c342e
parent37a71a40d3f8c82e84786f9148fef9352b66b98f (diff)
downloadpython-virtinst-7a684cb65d69f2b116809456bed99ed32ca44080.zip
python-virtinst-7a684cb65d69f2b116809456bed99ed32ca44080.tar.gz
python-virtinst-7a684cb65d69f2b116809456bed99ed32ca44080.tar.xz
Enable x2apic for new KVM guestspython-virtinst-0_500_2-3_fc14
-rw-r--r--python-virtinst.spec8
-rw-r--r--virtinst-0.500.2-use-x2apic.patch54
2 files changed, 61 insertions, 1 deletions
diff --git a/python-virtinst.spec b/python-virtinst.spec
index 495fb44..ba30a04 100644
--- a/python-virtinst.spec
+++ b/python-virtinst.spec
@@ -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 (clone an existing virtual machine).
%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@redhat.com> - 0.500.2-3.fc14
+- Enable x2apic for new KVM guests
+
* Sun Mar 21 2010 Cole Robinson <crobinso@redhat.com> - 0.500.2-2.fc14
- Improve clone progress reporting (bz 550870)
- virt-install: Fix windows installs
diff --git a/virtinst-0.500.2-use-x2apic.patch b/virtinst-0.500.2-use-x2apic.patch
new file mode 100644
index 0000000..3cb0256
--- /dev/null
+++ b/virtinst-0.500.2-use-x2apic.patch
@@ -0,0 +1,54 @@
+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
+