<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hello,<div><br></div><div>On more question. The second example:</div><div><br></div><div><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">ffff800000000000 - ffff87ffffffffff (=43 bits) guard hole, reserved for hypervisor</span></font></blockquote></blockquote><br></div><div>What are the relation between the Bits (=43bits) and the Adresse Range ?</div><div><br></div><div>Is it possible to calculate the 43 Bits from the range ? &nbsp;If yes, how ?&nbsp;</div><div><br><br><div>Best regards</div><div>Damian&nbsp;<br><div><br></div><div><br></div><div><br></div></div><div><br>Am 13.12.2017 um 05:35 schrieb arshad hussain &lt;<a href="mailto:arshad.super@gmail.com">arshad.super@gmail.com</a>&gt;:<br><br></div><blockquote type="cite"><div><span>On Wed, Dec 13, 2017 at 12:44 AM, Damian Tometzki</span><br><span>&lt;<a href="mailto:damian.tometzki@icloud.com">damian.tometzki@icloud.com</a>&gt; wrote:</span><br><blockquote type="cite"><span>Hello all,</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>i have a short question:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>How are the bits (in brackets) calculated in the virtual memory map ?</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>for example the first line (=47 bits)</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Virtual memory map with 4 level page tables:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm</span><br></blockquote><blockquote type="cite"><span>hole caused by [47:63] sign extension</span><br></blockquote><blockquote type="cite"><span>ffff800000000000 - ffff87ffffffffff (=43 bits) guard hole, reserved for hypervisor</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><span></span><br><span>Presently for x86-64 kernel uses 4-level paging. Out of 64bit only 48 bit</span><br><span>is enabled (Which boils down to Terabyte of address space). For case</span><br><span>where getpagesize() is 4K the breakup is :-</span><br><span></span><br><span>CR3 -&gt; Global(9 bits) -&gt; Upper(9 bits) -&gt; Middle(9 bits) -&gt; Page</span><br><span>table(9 bits) -&gt; [12 bits for page or 4096 bytes] = (48 bits)</span><br><span></span><br><span>Thanks</span><br></div></blockquote></div></body></html>