-
Notifications
You must be signed in to change notification settings - Fork 599
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support user set remote mmap vma address
1. os auto assignment vma addr maybe conflict with vma in gpu living migrate scene; 2. so, we should give choice to user; Signed-off-by: haozi007 <[email protected]>
- Loading branch information
1 parent
8cf9722
commit 6d4eeb7
Showing
2 changed files
with
7 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -816,7 +816,7 @@ static int parasite_memfd_exchange(struct parasite_ctl *ctl, unsigned long size, | |
uint8_t orig_code[MEMFD_FNAME_SZ] = MEMFD_FNAME; | ||
pid_t pid = ctl->rpid; | ||
long sret = -ENOSYS; | ||
int ret, fd, lfd; | ||
int ret, fd, lfd, remote_flags; | ||
|
||
if (ctl->ictx.flags & INFECT_NO_MEMFD) | ||
return 1; | ||
|
@@ -860,7 +860,11 @@ static int parasite_memfd_exchange(struct parasite_ctl *ctl, unsigned long size, | |
goto err_cure; | ||
} | ||
|
||
ctl->remote_map = remote_mmap(ctl, NULL, size, remote_prot, MAP_FILE | MAP_SHARED, fd, 0); | ||
remote_flags = MAP_FILE | MAP_SHARED; | ||
if (ctl->ictx.remote_map_addr){ | ||
Check warning on line 864 in compel/src/lib/infect.c GitHub Actions / build
|
||
remote_flags |= MAP_FIXED_NOREPLACE; | ||
} | ||
ctl->remote_map = remote_mmap(ctl, (void *)ctl->ictx.remote_map_addr, size, remote_prot, remote_flags, fd, 0); | ||
if (!ctl->remote_map) { | ||
pr_err("Can't rmap memfd for parasite blob\n"); | ||
goto err_curef; | ||
|