Merge tag 'iommu-fixes-v3.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull iommu fixes from Joerg Roedel: "Three fixes for the AMD IOMMU driver: - fix a locking issue around get_user_pages() - fix two issues with device aliasing and exclusion range handling" * tag 'iommu-fixes-v3.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: fix enabling exclusion range for an exact device iommu/amd: Take mmap_sem when calling get_user_pages iommu/amd: Fix interrupt remapping for aliased devices
This commit is contained in:
@@ -3999,7 +3999,7 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic)
|
||||
iommu_flush_dte(iommu, devid);
|
||||
if (devid != alias) {
|
||||
irq_lookup_table[alias] = table;
|
||||
set_dte_irq_entry(devid, table);
|
||||
set_dte_irq_entry(alias, table);
|
||||
iommu_flush_dte(iommu, alias);
|
||||
}
|
||||
|
||||
|
@@ -788,7 +788,7 @@ static void __init set_device_exclusion_range(u16 devid, struct ivmd_header *m)
|
||||
* per device. But we can enable the exclusion range per
|
||||
* device. This is done here
|
||||
*/
|
||||
set_dev_entry_bit(m->devid, DEV_ENTRY_EX);
|
||||
set_dev_entry_bit(devid, DEV_ENTRY_EX);
|
||||
iommu->exclusion_start = m->range_start;
|
||||
iommu->exclusion_length = m->range_length;
|
||||
}
|
||||
|
@@ -504,8 +504,10 @@ static void do_fault(struct work_struct *work)
|
||||
|
||||
write = !!(fault->flags & PPR_FAULT_WRITE);
|
||||
|
||||
down_read(&fault->state->mm->mmap_sem);
|
||||
npages = get_user_pages(fault->state->task, fault->state->mm,
|
||||
fault->address, 1, write, 0, &page, NULL);
|
||||
up_read(&fault->state->mm->mmap_sem);
|
||||
|
||||
if (npages == 1) {
|
||||
put_page(page);
|
||||
|
Reference in New Issue
Block a user