Commit 989d216f authored by Linus Torvalds's avatar Linus Torvalds

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
parents 677d1bb0 2c16c9fd
...@@ -3999,7 +3999,7 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic) ...@@ -3999,7 +3999,7 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic)
iommu_flush_dte(iommu, devid); iommu_flush_dte(iommu, devid);
if (devid != alias) { if (devid != alias) {
irq_lookup_table[alias] = table; irq_lookup_table[alias] = table;
set_dte_irq_entry(devid, table); set_dte_irq_entry(alias, table);
iommu_flush_dte(iommu, alias); iommu_flush_dte(iommu, alias);
} }
......
...@@ -788,7 +788,7 @@ static void __init set_device_exclusion_range(u16 devid, struct ivmd_header *m) ...@@ -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 * per device. But we can enable the exclusion range per
* device. This is done here * 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_start = m->range_start;
iommu->exclusion_length = m->range_length; iommu->exclusion_length = m->range_length;
} }
......
...@@ -504,8 +504,10 @@ static void do_fault(struct work_struct *work) ...@@ -504,8 +504,10 @@ static void do_fault(struct work_struct *work)
write = !!(fault->flags & PPR_FAULT_WRITE); write = !!(fault->flags & PPR_FAULT_WRITE);
down_read(&fault->state->mm->mmap_sem);
npages = get_user_pages(fault->state->task, fault->state->mm, npages = get_user_pages(fault->state->task, fault->state->mm,
fault->address, 1, write, 0, &page, NULL); fault->address, 1, write, 0, &page, NULL);
up_read(&fault->state->mm->mmap_sem);
if (npages == 1) { if (npages == 1) {
put_page(page); put_page(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment