vfio/type1: remove hugepage checks in is_invalid_reserved_pfn()
authorBen Luo <luoben@linux.alibaba.com>
Thu, 3 Oct 2019 03:49:42 +0000 (11:49 +0800)
committerAlex Williamson <alex.williamson@redhat.com>
Fri, 18 Oct 2019 14:48:53 +0000 (08:48 -0600)
commit026948f01eac4dda130aa623b7414375633fe7c1
treedb2202da423a50b74e0630e2bb45dc913a8e6e41
parent4f5cafb5cb8471e54afdc9054d973535614f7675
vfio/type1: remove hugepage checks in is_invalid_reserved_pfn()

Currently, no hugepage split code can transfer the reserved bit
from head to tail during the split, so checking the head can't make
a difference in a racing condition with hugepage spliting.

The buddy wouldn't allow a driver to allocate an hugepage if any
subpage is reserved in the e820 map at boot, if any driver sets the
reserved bit of head page before mapping the hugepage in userland,
it needs to set the reserved bit in all subpages to be safe.

Signed-off-by: Ben Luo <luoben@linux.alibaba.com>
Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio_iommu_type1.c