RE: [PATCH v2] IA64 Compilation Error Fix for Intel IOMMU IdentityMapping Support

From: Yu, Fenghua
Date: Thu Jun 25 2009 - 17:56:31 EST


>-----Original Message-----
>From: David Woodhouse [mailto:dwmw2@xxxxxxxxxxxxx]
>Sent: Thursday, June 25, 2009 2:52 PM
>To: FUJITA Tomonori
>Cc: Yu, Fenghua; chrisw@xxxxxxxxxx; torvalds@xxxxxxxxxxxxxxxxxxxx;
>akpm@xxxxxxxxxxxxxxxxxxxx; Luck, Tony; linux-kernel@xxxxxxxxxxxxxxx;
>iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx; linux-ia64@xxxxxxxxxxxxxxx
>Subject: Re: [PATCH v2] IA64 Compilation Error Fix for Intel IOMMU Identity
>Mapping Support
>
>On Thu, 2009-06-25 at 08:11 +0100, David Woodhouse wrote:
>> It raises the question: Why are we using firmware-specific interfaces to
>> list the available memory -- can't we get that from somewhere _generic_?
>>
>> The less we tie our code to these crappy BIOS, EFI and ACPI interfaces,
>> the better off we'll be.
>
>Does this work everywhere... ?
>
>(Fenghua, why are we doing the whole setup per pci dev anyway -- why not
>set up the page tables once and point all devices at the same page
>tables?)
>

That's what the ia64 fix patch does...the first pci device set up the page table. Then all following pci devices use that page table by setting up the context mapping.

+ if (first_pdev) {
+ /*
+ * first pdev sets up the whole page table for
+ * si_domain.
+ */
+ first_pdev = 0;
+ ret = iommu_setup_identity_map(pdev);
+ if (ret)
+ return ret;
+ } else {
+ /*
+ * following pdev's just use the page table.
+ */
+ printk(KERN_INFO "IOMMU: identity mapping for device %s\n",
+ pci_name(pdev));
+ ret = domain_context_mapping(si_domain, pdev,
+ CONTEXT_TT_MULTI_LEVEL);
+ if (ret)
Thanks.

-Fenghua
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/