<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} p
        {margin-top:0px;
        margin-bottom:0px}--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,</p>
<p><br>
</p>
<p>I also started a "research" so to say about what crates we can share. I am working on a proposal and should have something ready in a few days.</p>
<p>For the device models, I think a better approach would be to also include virtio devices, but export each of them individually using rust features (like we are currently doing in Firecracker with the vsock device).</p>
<p><br>
</p>
<p>One question I have is where would we host the crates? An organization on GitHub with all these crates would be super cool. Something like "rust-vmm" maybe?
</p>
<p><br>
Andreea<br>
</p>
<p><br>
</p>
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Liguori, Anthony <aliguori@amazon.com><br>
<b>Sent:</b> Tuesday, December 18, 2018 1:30 AM<br>
<b>To:</b> rust-vmm@lists.opendev.org<br>
<b>Subject:</b> [UNVERIFIED SENDER] [Rust-vmm] Goals for this list</font>
<div> </div>
</div>
<div>
<p>Hi!<br>
</p>
<p><br>
</p>
<p>Very excited about this list and eager to begin discussions.  I wanted to start with what I see as the low hanging fruit and I what I see as the goal of this effort.<br>
</p>
<p><br>
</p>
<p>I'd like to build a set of crates, preferrably with a common name, that make it really easy to write VMMs in Rust.  I think Rust is an ideal language for building VMMs and that if the right primitives are there, a lot of interesting VMMs will emerge.<br>
</p>
<p><br>
</p>
<p>Some ideas I have for what would make good core creates:<br>
</p>
<p><br>
</p>
<p>1) KVM bindgen bindings.  Right now, there is an issue with bindgen misgenerating code when encountering empty trailing arrays which are used in KVM.  Both crosvm and Firecracker get around this by modifying the headers by hand and then committing the results
 of bindgen.  Dylan also mentioned that they were unhappy about bindgen performance but this seems like an eventual optimization to me.<br>
</p>
<p><br>
</p>
<p>As a side note, I think having OS X hypervisor framework bindings and whatever the new Windows thing is would be pretty cool.  Maybe there's room for a wrapper around the three but it's not something that interesting to me in the near term.<br>
</p>
<p><br>
</p>
<p>2) The crosvm data_model crate.  This one is super critical but easy to misunderstand as it allows for safe access to volatile memory.  Somewhat related is the mmap() bits from sys_util.  Not sure how the crosvm folks feel but I think there is some refactoring
 here that could be useful to build a memory crate.<br>
</p>
<p><br>
</p>
<p>3) Some traits for device model implementations.  It's easy to really bike shed here so I reckon it's best to start with a concrete device model like a UART, work through what is required for interfaces, and then iterate from there.<br>
</p>
<p><br>
</p>
<p>4) Common device models with only a single implementation (i.e. 16650A).  Not sure about virtio, maybe.<br>
</p>
<p><br>
</p>
<p>Curious what other people think here too.  I've got a couple weeks off coming up so I'd love to have some projects to have on here.<br>
</p>
<p><br>
</p>
<p>Regards,<br>
</p>
<p><br>
</p>
<p>Anthony Liguori<br>
</p>
</div>
</div>
<p></p>

<p><br>
Amazon Development Center (Romania) S.R.L. registered office: 27A Sf. Lazar Street, UBC5, floor 2, Iasi, Iasi County, 700045, Romania. Registered in Romania. Registration number J22/2621/2005.</p>
</body>
</html>