Skip to content
This repository was archived by the owner on Jan 28, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion core/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,15 @@ static int handle_set_ram(struct vm_t *vm, uint64_t start_gpa, uint64_t size,
gpa_space = &vm->gpa_space;
start_gfn = start_gpa >> PG_ORDER_4K;
npages = size >> PG_ORDER_4K;
gpa_space_adjust_prot_bitmap(gpa_space, start_gfn + npages);

ret = gpa_space_adjust_prot_bitmap(gpa_space, start_gfn + npages);
if (ret) {
hax_error("%s: Failed to resize prot bitmap: ret=%d, start_gfn=0x%llx,"
" npages=0x%llx, start_uva=0x%llx, flags=0x%x\n", __func__,
ret, start_gfn, npages, start_uva, flags);
return ret;
}

ret = memslot_set_mapping(gpa_space, start_gfn, npages, start_uva, flags);
if (ret) {
hax_error("%s: memslot_set_mapping() failed: ret=%d, start_gfn=0x%llx,"
Expand Down