Reserve physical page
From: Prateek Sharma <hidden>
Date: 2011-08-07 07:28:30
On Sat, Aug 6, 2011 at 11:35 PM, Thayumanavar S [off-list ref] wrote:
quoted
Hello everyone, I am wondering whether it is possible to reserve a particular physical page in the kernel. The GFP pages can start from _any_ location, and i cannot find a way to specify a starting pfn. I need a few dozen pages to store a bitmap starting at a particularphysicalquoted
page frame number. Perhaps i am trying to do this wrong? I am trying to establish a (one-way) communication between KVM and a guest VM, by assuming that ifKVMquoted
knows the physical address in the VM , it can access that bitmap.you can covert pa to pfn to struct page (there are some macros in the kernel that does this, you grep the kernel source for it) and directly set the PG_reserved flag of that struct page.
Ok. But in this case i have to ensure that the pfn is not mapped by the kernel, right? Will scanning mem_map to find such a pfn help? I'm wondering if there are regions which are typically 'free' which i can reserve and use. Thanks for the reply, -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110807/19d67bdd/attachment-0001.html