forked from cloud-hypervisor/cloud-hypervisor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vfio: fix memory slot over KVM_USER_MEM_SLOTS
When adding vfio passthrough devices cloud hypervisor allocate a new memory slot in map_mmio_regions. As we +1 each time as new memory slot, it will fail as the memory slot over KVM_USER_MEM_SLOTS in kernel when calling KVM_SET_USER_MEMORY_REGION ioctl. This patch introduces a vector to save the memory slots allocated, and return the minimal available memory slot to caller to fix this issue. Signed-off-by: Yi Wang <foxywang@tencent.com>
- Loading branch information
Showing
3 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters