pci: do not check for page-aligned size and offset before calling mmap()
The kernel will validate that the size is page-aligned. The file offset is always zero, so the kernel will also validate that the offset is page-aligned. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
parent
8be28f8438
commit
0e21b56aea
1 changed files with 0 additions and 11 deletions
|
|
@ -1650,17 +1650,6 @@ impl VfioPciDevice {
|
|||
self.common.interrupt.msix.as_ref(),
|
||||
)?;
|
||||
|
||||
for area in &sparse_areas {
|
||||
if !is_page_size_aligned(area.size) || !is_page_size_aligned(area.offset) {
|
||||
error!(
|
||||
"Could not mmap sparse area that is not page size aligned \
|
||||
(offset = 0x{:x}, size = 0x{:x})",
|
||||
area.offset, area.size
|
||||
);
|
||||
return Err(VfioPciError::MmapArea);
|
||||
}
|
||||
}
|
||||
|
||||
for area in sparse_areas.iter() {
|
||||
let mapping = match MmapRegion::mmap(
|
||||
area.size,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue