<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 ? If yes, how ? </div><div><br><br><div>Best regards</div><div>Damian <br><div><br></div><div><br></div><div><br></div></div><div><br>Am 13.12.2017 um 05:35 schrieb arshad hussain <<a href="mailto:arshad.super@gmail.com">arshad.super@gmail.com</a>>:<br><br></div><blockquote type="cite"><div><span>On Wed, Dec 13, 2017 at 12:44 AM, Damian Tometzki</span><br><span><<a href="mailto:damian.tometzki@icloud.com">damian.tometzki@icloud.com</a>> 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 -> Global(9 bits) -> Upper(9 bits) -> Middle(9 bits) -> Page</span><br><span>table(9 bits) -> [12 bits for page or 4096 bytes] = (48 bits)</span><br><span></span><br><span>Thanks</span><br></div></blockquote></div></body></html>