From patchwork Fri Jul 2 20:56:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lyon X-Patchwork-Id: 109962 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o62L0L93000766 for ; Fri, 2 Jul 2010 21:00:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757630Ab0GBU7y (ORCPT ); Fri, 2 Jul 2010 16:59:54 -0400 Received: from sj-iport-6.cisco.com ([171.71.176.117]:1116 "EHLO sj-iport-6.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757520Ab0GBU7y (ORCPT ); Fri, 2 Jul 2010 16:59:54 -0400 Authentication-Results: sj-iport-6.cisco.com; dkim=neutral (message not signed) header.i=none X-IronPort-AV: E=Sophos;i="4.53,528,1272844800"; d="scan'208";a="553775595" Received: from sj-core-2.cisco.com ([171.71.177.254]) by sj-iport-6.cisco.com with ESMTP; 02 Jul 2010 20:59:52 +0000 Received: from t60pugs.nuovasystems.com (dhcp-171-71-15-254.cisco.com [171.71.15.254]) by sj-core-2.cisco.com (8.13.8/8.14.3) with SMTP id o62KxqJF005070; Fri, 2 Jul 2010 20:59:52 GMT Date: Fri, 02 Jul 2010 13:56:14 -0700 From: "Tom Lyon" To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, iommu@lists.linux-foundation.org, chrisw@sous-sol.org, mst@redhat.com, dwmw2@infradead.org, joerg.roedel@amd.com Cc: aafabbri@cisco.com, scofeldm@cisco.com Subject: [PATCH V3] 2.6.34: simple IOMMU API extension to check safe interrupt remapping Message-ID: <4c2e526e.HXT+zIj7fSMwTdy/%pugs@cisco.com> User-Agent: Heirloom mailx 12.2 01/07/07 MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 02 Jul 2010 21:00:21 +0000 (UTC) diff -uprN linux-2.6.34/drivers/pci/intel-iommu.c iommuapi-linux-2.6.34/drivers/pci/intel-iommu.c --- linux-2.6.34/drivers/pci/intel-iommu.c 2010-05-16 14:17:36.000000000 -0700 +++ iommuapi-linux-2.6.34/drivers/pci/intel-iommu.c 2010-07-02 12:39:19.000000000 -0700 @@ -3705,6 +3705,8 @@ static int intel_iommu_domain_has_cap(st if (cap == IOMMU_CAP_CACHE_COHERENCY) return dmar_domain->iommu_snooping; + if (cap == IOMMU_CAP_INTR_REMAP) + return intr_remapping_enabled; return 0; } diff -uprN linux-2.6.34/include/linux/iommu.h iommuapi-linux-2.6.34/include/linux/iommu.h --- linux-2.6.34/include/linux/iommu.h 2010-05-16 14:17:36.000000000 -0700 +++ iommuapi-linux-2.6.34/include/linux/iommu.h 2010-07-02 12:38:45.000000000 -0700 @@ -30,6 +30,7 @@ struct iommu_domain { }; #define IOMMU_CAP_CACHE_COHERENCY 0x1 +#define IOMMU_CAP_INTR_REMAP 0x2 /* isolates device intrs */ struct iommu_ops { int (*domain_init)(struct iommu_domain *domain);