i compiled a static program using gcc on linux and run it under kvm. I checked every page table entry of this process in guest memory and found that some pages have been mapped and some ones are not. Is this the feature of on-demand paging? My question is whether there is a solution to make all the pte present and mapped in the page table?
E.g. i fork a new process and load a new elf binary, how to make every page mapped in the page table of this new process.
Thanks
i compiled a static program using gcc on linux and run it under kvm.
Share
Try out the following system call:
Set the flags parameter with MCL_FUTURE and it will lock all current and future pages into memory. You can find more info about it here or just type “man mlockall” and you will get a bunch of information.