From patchwork Tue Aug 4 15:57:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 39160 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 n74Fw5mL008906 for ; Tue, 4 Aug 2009 15:58:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751966AbZHDP6D (ORCPT ); Tue, 4 Aug 2009 11:58:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755096AbZHDP6D (ORCPT ); Tue, 4 Aug 2009 11:58:03 -0400 Received: from hera.kernel.org ([140.211.167.34]:51577 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751966AbZHDP6C (ORCPT ); Tue, 4 Aug 2009 11:58:02 -0400 Received: from [129.150.224.150] (sca-ea-fw-1.Sun.COM [192.18.43.225]) (authenticated bits=0) by hera.kernel.org (8.14.2/8.13.8) with ESMTP id n74Fvcu4005784 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Aug 2009 15:57:47 GMT Message-ID: <4A785A57.8050505@kernel.org> Date: Tue, 04 Aug 2009 08:57:11 -0700 From: Yinghai Lu User-Agent: Thunderbird 2.0.0.22 (X11/20090605) MIME-Version: 1.0 To: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Jesse Barnes , Suresh Siddha CC: "linux-kernel@vger.kernel.org" , linux-pci@vger.kernel.org, Yu Zhao Subject: [PATCH] pci: dmar/intr_remapping/iov use physfn to search drhd X-Virus-Scanned: ClamAV 0.93.3/9650/Tue Aug 4 03:42:34 2009 on hera.kernel.org X-Virus-Status: Clean Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org when virtfn is used, we should use physfn to find correct drhd Signed-off-by: Yinghai Lu --- drivers/pci/dmar.c | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/drivers/pci/dmar.c =================================================================== --- linux-2.6.orig/drivers/pci/dmar.c +++ linux-2.6/drivers/pci/dmar.c @@ -493,6 +493,11 @@ dmar_find_matched_drhd_unit(struct pci_d struct dmar_drhd_unit *dmaru = NULL; struct acpi_dmar_hardware_unit *drhd; +#ifdef CONFIG_PCI_IOV + if (dev->is_virtfn) + dev = dev->physfn; +#endif + list_for_each_entry(dmaru, &dmar_drhd_units, list) { drhd = container_of(dmaru->hdr, struct acpi_dmar_hardware_unit,