<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
Hello there,<br>i'd like some hints in regards how the CR3 register is handled. From what i've learned, it seems that VirtualBox, everytime a guest O.S. try to write on CR3. generates a #GP and <br>uses a function 


        
        
        
        <style type="text/css">p { margin-bottom  </style><font style="" color="#000000"><font style="" face="FreeMono"><font style="font-size: 10pt;" size="2">EMInterpretCRxWrite() <font style="" face="Times New Roman">that calls </font></font></font></font><font style="" color="#000000"><font face="FreeMono"><font size="2"><span lang="en-GB">emUpdateCRx</span></font></font></font><font style="" color="#000000"><font style="font-size: 10pt;" size="2"><font style="" face="FreeMono">() <font style="" face="Times New Roman">which modifies</font></font></font></font><font style="" color="#000000"><font style="" face="FreeMono"><font style="font-size: 10pt;" size="2"> <font style="" face="Times New Roman">the VCpu. In particular, in regards to CR3, it sets the new value(with </font></font></font></font>


        
        
        
        <font style="" color="#000000"><font face="FreeMono, monospace"><font style="font-size: 10pt;" size="2">CPUMSetGuestCR3</font></font></font>
<font style="" color="#000000"><font style="" face="FreeMono"><font style="font-size: 10pt;" size="2"><font style="" face="Times New Roman"> )and does a flush calling </font></font></font></font><font style="" color="#000000"><font face="FreeMono, monospace"><font style="font-size: 10pt;" size="2">PGMFlushTLB</font></font></font><font style="" color="#000000"><font style="" face="FreeMono"><font style="font-size: 10pt;" size="2">()<font style="" face="Times New Roman"> that remap the CR3 with the function </font></font></font></font><font style="" color="#000000"><font style="font-size: 10pt;" size="2"><font style="" face="FreeMono, monospace">MapCR3()</font></font></font><font style="" color="#000000"><font style="" face="FreeMono"><font style="font-size: 10pt;" size="2">.<font style="" face="Times New Roman"> Now, i  think that VirtualBox has to do the setup of the new page table right? And, in order to catch all the exceptions, it has to write protect it or am i wrong?and if it is so,can anyone address me to the source code that does these??</font></font></font></font><p style="margin-bottom: 0cm;" lang="zxx"><font style="" color="#000000"><font style="" face="FreeMono"><font style="font-size: 10pt;" size="2"><font style="" face="Times New Roman">i would appreciate</font><br></font></font></font></p>
                                          </div></body>
</html>