diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-07-21 19:46:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-07-21 19:46:53 -0400 |
commit | ffb48e7924768d760bcd63212c8530c010059215 (patch) | |
tree | d16508564169a50a3ccc6b52f8f264245fa7e51b /drivers | |
parent | 55b636b419a269e167f7d6a9265e5e316a89cd5f (diff) | |
parent | b03897cf318dfc47de33a7ecbc7655584266f034 (diff) |
Merge tag 'powerpc-4.18-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman:
"Two regression fixes, one for xmon disassembly formatting and the
other to fix the E500 build.
Two commits to fix a potential security issue in the VFIO code under
obscure circumstances.
And finally a fix to the Power9 idle code to restore SPRG3, which is
user visible and used for sched_getcpu().
Thanks to: Alexey Kardashevskiy, David Gibson. Gautham R. Shenoy,
James Clarke"
* tag 'powerpc-4.18-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/powernv: Fix save/restore of SPRG3 on entry/exit from stop (idle)
powerpc/Makefile: Assemble with -me500 when building for E500
KVM: PPC: Check if IOMMU page is contained in the pinned physical page
vfio/spapr: Use IOMMU pageshift rather than pagesize
powerpc/xmon: Fix disassembly since printf changes
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/vfio/vfio_iommu_spapr_tce.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c b/drivers/vfio/vfio_iommu_spapr_tce.c index 759a5bdd40e1..7cd63b0c1a46 100644 --- a/drivers/vfio/vfio_iommu_spapr_tce.c +++ b/drivers/vfio/vfio_iommu_spapr_tce.c | |||
@@ -457,17 +457,17 @@ static void tce_iommu_unuse_page(struct tce_container *container, | |||
457 | } | 457 | } |
458 | 458 | ||
459 | static int tce_iommu_prereg_ua_to_hpa(struct tce_container *container, | 459 | static int tce_iommu_prereg_ua_to_hpa(struct tce_container *container, |
460 | unsigned long tce, unsigned long size, | 460 | unsigned long tce, unsigned long shift, |
461 | unsigned long *phpa, struct mm_iommu_table_group_mem_t **pmem) | 461 | unsigned long *phpa, struct mm_iommu_table_group_mem_t **pmem) |
462 | { | 462 | { |
463 | long ret = 0; | 463 | long ret = 0; |
464 | struct mm_iommu_table_group_mem_t *mem; | 464 | struct mm_iommu_table_group_mem_t *mem; |
465 | 465 | ||
466 | mem = mm_iommu_lookup(container->mm, tce, size); | 466 | mem = mm_iommu_lookup(container->mm, tce, 1ULL << shift); |
467 | if (!mem) | 467 | if (!mem) |
468 | return -EINVAL; | 468 | return -EINVAL; |
469 | 469 | ||
470 | ret = mm_iommu_ua_to_hpa(mem, tce, phpa); | 470 | ret = mm_iommu_ua_to_hpa(mem, tce, shift, phpa); |
471 | if (ret) | 471 | if (ret) |
472 | return -EINVAL; | 472 | return -EINVAL; |
473 | 473 | ||
@@ -487,7 +487,7 @@ static void tce_iommu_unuse_page_v2(struct tce_container *container, | |||
487 | if (!pua) | 487 | if (!pua) |
488 | return; | 488 | return; |
489 | 489 | ||
490 | ret = tce_iommu_prereg_ua_to_hpa(container, *pua, IOMMU_PAGE_SIZE(tbl), | 490 | ret = tce_iommu_prereg_ua_to_hpa(container, *pua, tbl->it_page_shift, |
491 | &hpa, &mem); | 491 | &hpa, &mem); |
492 | if (ret) | 492 | if (ret) |
493 | pr_debug("%s: tce %lx at #%lx was not cached, ret=%d\n", | 493 | pr_debug("%s: tce %lx at #%lx was not cached, ret=%d\n", |
@@ -611,7 +611,7 @@ static long tce_iommu_build_v2(struct tce_container *container, | |||
611 | entry + i); | 611 | entry + i); |
612 | 612 | ||
613 | ret = tce_iommu_prereg_ua_to_hpa(container, | 613 | ret = tce_iommu_prereg_ua_to_hpa(container, |
614 | tce, IOMMU_PAGE_SIZE(tbl), &hpa, &mem); | 614 | tce, tbl->it_page_shift, &hpa, &mem); |
615 | if (ret) | 615 | if (ret) |
616 | break; | 616 | break; |
617 | 617 | ||