<br><br><div class="gmail_quote">On Sat, Aug 6, 2011 at 11:35 PM, Thayumanavar S <span dir="ltr"><<a href="mailto:thayumker@gmail.com">thayumker@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">> Hello everyone,<br>
> I am wondering whether it is possible to reserve a particular physical<br>
> page in the kernel.<br>
> The GFP pages can start from _any_ location, and i cannot find a way to<br>
> specify a starting pfn.<br>
> I need a few dozen pages to store a bitmap starting at a particular physical<br>
> page frame number.<br>
> Perhaps i am trying to do this wrong? I am trying to establish a<br>
> (one-way) communication between KVM and a guest VM, by assuming that if KVM<br>
> knows the physical address in the VM , it can access that bitmap.<br>
<br>
</div></div>you can covert pa to pfn to struct page (there are some macros in the<br>
kernel that does this, you grep the kernel source for it) and directly<br>
set the PG_reserved flag of that struct page.<br>
<br></blockquote><div><br>Ok. But in this case i have to ensure that the pfn is not mapped by the kernel, right? <br>Will scanning mem_map to find such a pfn help? <br>I'm wondering if there are regions which are typically 'free' which i can reserve and use.<br>
<br>Thanks for the reply, <br><br></div></div><br>