Commit abb560ab authored by Daniel Jordan's avatar Daniel Jordan Committed by Greg Kroah-Hartman
Browse files

vfio/type1: Prepare for batched pinning with struct vfio_batch



[ Upstream commit 4b6c33b3 ]

Get ready to pin more pages at once with struct vfio_batch, which
represents a batch of pinned pages.

The struct has a fallback page pointer to avoid two unlikely scenarios:
pointlessly allocating a page if disable_hugepages is enabled or failing
the whole pinning operation if the kernel can't allocate memory.

vaddr_get_pfn() becomes vaddr_get_pfns() to prepare for handling
multiple pages, though for now only one page is stored in the pages
array.

Signed-off-by: default avatarDaniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Stable-dep-of: 873aefb3 ("vfio/type1: Unpin zero pages")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 38cb9b86
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment