<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">On Feb 9, 2019, at 2:10 AM, Zach Reizner <<a href="mailto:zachr@google.com" class="">zachr@google.com</a>> wrote:<br class=""><div class=""><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif" class="">On Fri, Feb 8, 2019 at 2:18 AM Liu Jiang <<a href="mailto:liuj97@gmail.com" class="">liuj97@gmail.com</a>> wrote:</span><br class=""></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class=""><div style="overflow-wrap: break-word;" class=""><div style="overflow-wrap: break-word;" class="">Hi all,<div class=""><span class="gmail-m_-6324568620085656860Apple-tab-span" style="white-space:pre-wrap"> </span>As we have discussed during the meeting, I have created a memory-model repository under rust-vmm project and  posted the initial version at <a href="https://github.com/rust-vmm/memory-model" target="_blank" class="">https://github.com/rust-vmm/memory-model</a> .</div><div class="">The initial version tries to merge current code from the upstream crosvm and firecracker projects. And the most sensitive user visible change is changing from u64 to usize for memory related data fields.</div></div></div></div></blockquote><div class=""><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">On 64-bit arm devices, we usually run a 32-bit userspace with a 64-bit kernel. In this case, the machine word size (usize) that crosvm is compiled with (32-bit) isn't the same as the one the guest kernel, host kernel, hardware is using (64-bit). We used u64 to ensure that the size was always at least as big as needed.</div></div></div></div></div></blockquote><div class="">Hi Zach,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">     </span>Good point. So seems that the AddressSpace abstraction may help to solve this conflict. </div><div class="">1) The AddressSpace represents virtual machine physical address space, which contains memory and MMIO regions. For simplicity, u64 will be used here for both 32-bits and 64-bits virtual machines. And GuestAddress should be u64 too.</div><div class="">2) The GuestMemory represents partial or full mapping of an AddressSpace into current process, so usize should be used here for memory related fields because they are used to save pointer/size in current process. And MemoryMapping should be usize too.</div><div class="">What’s your thoughts?</div><div class="">Thanks,</div><div class="">Gerry</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class=""><div style="overflow-wrap: break-word;" class=""><div style="overflow-wrap: break-word;" class=""><div class="">So please help to comment on whether this is the right way to go, and next step plan is:</div><div class="">1) import <a href="http://endian.rs/" target="_blank" class="">endian.rs</a> from crosvm</div><div class="">2) add address space abstraction for virtual machine</div><div class="">Thanks,</div><div class="">Gerry</div></div></div></div>_______________________________________________<br class="">
Rust-vmm mailing list<br class="">
<a href="mailto:Rust-vmm@lists.opendev.org" target="_blank" class="">Rust-vmm@lists.opendev.org</a><br class="">
<a href="http://lists.opendev.org/cgi-bin/mailman/listinfo/rust-vmm" rel="noreferrer" target="_blank" class="">http://lists.opendev.org/cgi-bin/mailman/listinfo/rust-vmm</a><br class="">
</blockquote></div></div>
</div></blockquote></div><br class=""></div></body></html>