<div dir="ltr"><div>Hello Michal.</div><div><br></div><div>yes, good point. I did some tests and I obtained some mixed results, but at the end, the behavior looks like:</div><div>- if I stop the boot at firmware and I dump the memory, no artefacts are there</div><div>- if I continue the boot, sometimes artefacts appears in memory. So it looks like it's a kind of caching of the operating system at this point.</div><div><br></div><div>It is not the "fast boot" option, which I already checked, so it's probably something else. I need to dig on this.<br></div><div>Anyway, thanks for your help.</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mer 31 lug 2019 alle ore 16:01 Michal Necasek <<a href="mailto:michal.necasek@oracle.com">michal.necasek@oracle.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Times New Roman;font-size:12pt;color:rgb(0,0,0)"><div><br></div><div> What does "shutdown the guest system/start again the guest system" mean? Shut down the VM and start it again? Or reboot the guest OS without terminating the VM?</div><div><br></div><div> In either case, I'd recommend dumping the VM's memory right after the VM is reset (when it's executing firmware). Are the artifacts there at that point?</div><div><br></div><div> Running with --dbg just shows the VM debugger UI, it does not change the VM's behavior.<br></div><div><br></div><div>       - Michal</div><div><br></div>----- Original Message -----<br>From: <a href="mailto:b38911@gmail.com" target="_blank">b38911@gmail.com</a><br>To: <a href="mailto:michal.necasek@oracle.com" target="_blank">michal.necasek@oracle.com</a><br>Sent: Tuesday, July 30, 2019 11:13:05 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna<br>Subject: Re: [vbox-dev] Memory initialization<br><br><div dir="ltr"><div>Hi Michal.</div><div><br></div><div>Sure, I'll try to explain better what I mean:</div><div><br></div><div>- start virtualbox and start a Windows 10 guest system (allocating let's say 4GB of RAM)</div><div>- start a specific software in the guest, which, after its exits, leave some artefacts in RAM (like a specific portion of code in unallocated memory). So far, so good, nothing strange.</div><div>- shutdown the guest system</div><div>- start again the guest system</div><div>- looking into the RAM (dumping it), I still see the same artefacts, even if I didn't ran the same software as before. Like if the allocated RAM (still 4GB) was not re-initialized to 0</div><div><br></div><div>This make sense if the initial allocation does not set memory to 0 (or something else), since I'm not rebooting the host, so for sure these artefacts are still in the host memory.</div><div>If you say that this is reset should be done, I'll try to re-run a set of tests, may be I'm missing something. Consider that I'm running the VM with --dbg option, not sure if this change something.</div><div><br></div><div>Thanks and let me know if you need more details on this.</div><div>Thanks</div><div>c<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mar 30 lug 2019 alle ore 10:11 Michal Necasek <<a href="mailto:michal.necasek@oracle.com" target="_blank">michal.necasek@oracle.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
  Can you provide a simple reproduction scenario? What does one have to <br>
do to see this?<br>
<br>
  A VM reset should clear memory. A caveat is that a given guest OS may <br>
not perform a full reset but only a soft reboot, which does not clear <br>
memory.<br>
<br>
     - Michal<br>
<br>
On 7/28/2019 10:15 PM, b38911 wrote:<br>
> Hello all.<br>
> <br>
> I was suggested to post my question here.<br>
> <br>
> Here my doubt:<br>
> <br>
> I noticed this behavior, which is probably expected: dumping the RAM of <br>
> a guest (with ".pgmphystofile" command) I saw that the memory is not <br>
> initialized between virtual powercycle, like if there was a real <br>
> powerdown. Sometimes, between restarts of the guest (with a shutdown and <br>
> then a restart), I find some memory artifacts belonging to processes <br>
> that shouldn't be there.<br>
> I assume this happens because I'm not restarting the host system, so <br>
> probably the RAM is just remapped, but not initialized. This is a bit <br>
> annoying in some case, especially if you are using the system for <br>
> testing purposes.<br>
> <br>
> Is there a way to force the guest to initialize the allocated RAM to <br>
> zero (or something else), in order to emulate a real powerdown-powerup?<br>
> Thanks for your help.<br>
> <br>
> cips<br>
> <br>
> _______________________________________________<br>
> vbox-dev mailing list<br>
> <a href="mailto:vbox-dev@virtualbox.org" target="_blank">vbox-dev@virtualbox.org</a><br>
> <a href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" rel="noreferrer" target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a><br>
<br>
_______________________________________________<br>
vbox-dev mailing list<br>
<a href="mailto:vbox-dev@virtualbox.org" target="_blank">vbox-dev@virtualbox.org</a><br>
<a href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" rel="noreferrer" target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a><br>
</blockquote></div>
</div></div></blockquote></div>