linux-next: manual merge of the vfio tree with Linus' tree
From: Stephen Rothwell
Date: Mon Jun 04 2018 - 02:15:34 EST
Hi Alex,
Today's linux-next merge of the vfio tree got a conflict in:
drivers/vfio/vfio_iommu_type1.c
between commit:
89c29def6b01 ("Revert "vfio/type1: Improve memory pinning process for raw PFN mapping"")
from Linus' tree and commit:
7b578b0de3d3 ("vfio/type1: Fix task tracking for QEMU vCPU hotplug")
from the vfio tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc drivers/vfio/vfio_iommu_type1.c
index 3c082451ab1a,2c71508abdd8..000000000000
--- a/drivers/vfio/vfio_iommu_type1.c
+++ b/drivers/vfio/vfio_iommu_type1.c
@@@ -422,8 -434,8 +426,8 @@@ static long vfio_pin_pages_remote(struc
* Reserved pages aren't counted against the user, externally pinned
* pages are already counted against the user.
*/
- if (!vfio_find_vpfn(dma, iova)) {
+ if (!rsvd && !vfio_find_vpfn(dma, iova)) {
- if (!lock_cap && current->mm->locked_vm + 1 > limit) {
+ if (!dma->lock_cap && current->mm->locked_vm + 1 > limit) {
put_pfn(*pfn_base, dma->prot);
pr_warn("%s: RLIMIT_MEMLOCK (%ld) exceeded\n", __func__,
limit << PAGE_SHIFT);
@@@ -448,8 -459,8 +452,8 @@@
break;
}
- if (!vfio_find_vpfn(dma, iova)) {
+ if (!rsvd && !vfio_find_vpfn(dma, iova)) {
- if (!lock_cap &&
+ if (!dma->lock_cap &&
current->mm->locked_vm + lock_acct + 1 > limit) {
put_pfn(pfn, dma->prot);
pr_warn("%s: RLIMIT_MEMLOCK (%ld) exceeded\n",
Attachment:
pgpk4_i_7zwqj.pgp
Description: OpenPGP digital signature