summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gryniewicz <dang@gentoo.org>2009-02-08 19:36:44 +0000
committerDaniel Gryniewicz <dang@gentoo.org>2009-02-08 19:36:44 +0000
commit1530eabfc292d720bafbb75ba01b7d8c1470bf94 (patch)
tree0ecc3cf068f097a8527ad25729999ddff7183acf /app-emulation/kvm
parentVersion bump #250214 by lindevel. (diff)
downloadgentoo-2-1530eabfc292d720bafbb75ba01b7d8c1470bf94.tar.gz
gentoo-2-1530eabfc292d720bafbb75ba01b7d8c1470bf94.tar.bz2
gentoo-2-1530eabfc292d720bafbb75ba01b7d8c1470bf94.zip
Fix kvm with vtd; bug #256685
(Portage version: 2.1.6.7/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation/kvm')
-rw-r--r--app-emulation/kvm/ChangeLog6
-rw-r--r--app-emulation/kvm/files/kvm-83-vtd.patch34
-rw-r--r--app-emulation/kvm/kvm-83.ebuild5
3 files changed, 43 insertions, 2 deletions
diff --git a/app-emulation/kvm/ChangeLog b/app-emulation/kvm/ChangeLog
index 543394e1577b..d42661570972 100644
--- a/app-emulation/kvm/ChangeLog
+++ b/app-emulation/kvm/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-emulation/kvm
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/kvm/ChangeLog,v 1.26 2009/01/26 19:33:26 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/kvm/ChangeLog,v 1.27 2009/02/08 19:36:43 dang Exp $
+
+ 08 Feb 2009; Daniel Gryniewicz <dang@gentoo.org> +files/kvm-83-vtd.patch,
+ kvm-83.ebuild:
+ Fix kvm with vtd; bug #256685
*kvm-83 (26 Jan 2009)
diff --git a/app-emulation/kvm/files/kvm-83-vtd.patch b/app-emulation/kvm/files/kvm-83-vtd.patch
new file mode 100644
index 000000000000..b26ece46786d
--- /dev/null
+++ b/app-emulation/kvm/files/kvm-83-vtd.patch
@@ -0,0 +1,34 @@
+From: Sheng Yang <sheng@linux.intel.com>
+Date: Wed, 21 Jan 2009 06:33:00 +0000 (+0800)
+Subject: kvm: external module: Fix build for VT-d/AMD IOMMU
+X-Git-Url: http://git.kernel.org/?p=virt%2Fkvm%2Fkvm-userspace.git;a=commitdiff_plain;h=f4d1fb9baa37ac54414ea21d910937a33d885e9a;hp=7b2bbc4aa31828a78bd33ae5b6b39fd925c5de7e
+
+kvm: external module: Fix build for VT-d/AMD IOMMU
+
+The vtd.c has renamed to iommu.c, and config option has changed to
+CONFIG_IOMMU_API.
+
+Notice now the host kernel before 2.6.29 can't work with VT-d due to API
+changed... At least this patch enabled building with host kernel before 2.6.29
+with CONFIG_DMAR.
+
+Signed-off-by: Wei Huang <wei.w.huang@intel.com>
+Signed-off-by: Sheng Yang <sheng@linux.intel.com>
+Signed-off-by: Avi Kivity <avi@redhat.com>
+---
+
+diff --git a/kernel/x86/Kbuild b/kernel/x86/Kbuild
+index c4723b1..4ef1168 100644
+--- a/kernel/x86/Kbuild
++++ b/kernel/x86/Kbuild
+@@ -9,8 +9,8 @@ kvm-objs := kvm_main.o x86.o mmu.o x86_emulate.o ../anon_inodes.o irq.o i8259.o
+ ifeq ($(EXT_CONFIG_KVM_TRACE),y)
+ kvm-objs += kvm_trace.o
+ endif
+-ifeq ($(CONFIG_DMAR),y)
+-kvm-objs += vtd.o
++ifeq ($(CONFIG_IOMMU_API),y)
++kvm-objs += iommu.o
+ endif
+ kvm-intel-objs := vmx.o vmx-debug.o ../external-module-compat.o
+ kvm-amd-objs := svm.o ../external-module-compat.o
diff --git a/app-emulation/kvm/kvm-83.ebuild b/app-emulation/kvm/kvm-83.ebuild
index d1db41ef11c0..15ffd6b70db6 100644
--- a/app-emulation/kvm/kvm-83.ebuild
+++ b/app-emulation/kvm/kvm-83.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/kvm/kvm-83.ebuild,v 1.1 2009/01/26 19:33:26 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/kvm/kvm-83.ebuild,v 1.2 2009/02/08 19:36:43 dang Exp $
inherit eutils flag-o-matic toolchain-funcs linux-mod
@@ -103,6 +103,9 @@ src_unpack() {
# avoid strip
sed -i 's/$(INSTALL) -m 755 -s/$(INSTALL) -m 755/' qemu/Makefile
+ # Fix building with vtd; bug #256685
+ epatch "${FILESDIR}"/${P}-vtd.patch
+
# apply patchset
EPATCH_SOURCE="${WORKDIR}/${PATCHSET}"
EPATCH_SUFFIX="patch"