From patchwork Wed Jan 21 06:33:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sheng Yang X-Patchwork-Id: 3395 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n0L6SfX9023547 for ; Tue, 20 Jan 2009 22:28:41 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750879AbZAUGdH (ORCPT ); Wed, 21 Jan 2009 01:33:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751591AbZAUGdH (ORCPT ); Wed, 21 Jan 2009 01:33:07 -0500 Received: from mga02.intel.com ([134.134.136.20]:25637 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbZAUGdG (ORCPT ); Wed, 21 Jan 2009 01:33:06 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 20 Jan 2009 22:27:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.37,299,1231142400"; d="scan'208";a="380164856" Received: from syang10-desktop.sh.intel.com (HELO syang10-desktop) ([10.239.13.29]) by orsmga002.jf.intel.com with ESMTP; 20 Jan 2009 22:31:21 -0800 Received: from yasker by syang10-desktop with local (Exim 4.69) (envelope-from ) id 1LPWe4-00050R-V7; Wed, 21 Jan 2009 14:33:01 +0800 From: Sheng Yang To: Avi Kivity Cc: kvm@vger.kernel.org, weidong.han@intel.com, Sheng Yang , Wei Huang Subject: [PATCH 1/1] kvm: Fix build for VT-d/AMD IOMMU Date: Wed, 21 Jan 2009 14:33:00 +0800 Message-Id: <1232519580-19225-1-git-send-email-sheng@linux.intel.com> X-Mailer: git-send-email 1.5.6.3 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 Signed-off-by: Sheng Yang --- kernel/ia64/Kbuild | 4 ++-- kernel/x86/Kbuild | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/ia64/Kbuild b/kernel/ia64/Kbuild index 130ec45..5bc6098 100644 --- a/kernel/ia64/Kbuild +++ b/kernel/ia64/Kbuild @@ -3,8 +3,8 @@ obj-m := kvm.o kvm-intel.o kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o \ irq_comm.o ../anon_inodes.o ../external-module-compat.o -ifeq ($(CONFIG_DMAR),y) -kvm-objs += vtd.o +ifeq ($(CONFIG_IOMMU_API),y) +kvm-objs += iommu.o endif EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127 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