<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} P{margin-top:0;margin-bottom:0;}--></style>
</head>
<body dir="ltr" style="text-align:left; direction:ltr;">
<div>Hi Andreea,</div>
<div><br>
</div>
<div>On Tue, 2019-11-19 at 10:46 +0000, Florescu, Andreea wrote:</div>
<blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
<p>Hey everyone,</p>
<p><br>
</p>
<p>A couple of weeks ago we merged a trait for DeviceIo. This is very similar to what we have in CrosVM/Firecracker under the name IoBus and serves the same purpose. You can check the commit that introduced the trait for more context [1].<br>
</p>
<p><br>
</p>
<p>With this trait merged we can now implement simple legacy devices such as the serial console. I added a PR [2] for this, but it is still very much work in progress. This PR started another conversation regarding where to place the device emulation.</p>
<p><br>
</p>
<p>As far as I know we have two options:</p>
<p>- each device in its own crate/repository</p>
<p>- all commonly used devices in vm-device</p>
<p><br>
</p>
<p>We touched on this topic during the Bucharest rust-vmm meetup as well. Each of these options come with disadvantages. The one that I was mostly concerned about is bloating the vm-device with lots of devices that are not needed by all the VMMs using rust-vmm.
 There are ways to work around this problem, so during the meetup we agreed on adding device emulation in vm-device for now. If we get to the point where vm-device becomes unmanageable ( too many devices making the code hard to audit), we can move the device
 emulation out of the crate.</p>
<p><br>
</p>
<p>For people that didn't attend the meetup, what do you think about having the device emulation in vm-device?</p>
</blockquote>
<div><br>
</div>
<div>I am okay with this approach as we don't really want to end up with a million different crates eventually. And from a Rust perspective, I guess the use of Rust features will make it easy to compile in only the devices needed by each VMM implementation.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Sebastien</div>
<div><br>
</div>
<blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
<p><br>
</p>
<p>Andreea<br>
</p>
<p><br>
</p>
<p>[1] <a href="https://github.com/rust-vmm/vm-device/commit/21910a148a290fcebec98bf11df4410ef35662d1">
https://github.com/rust-vmm/vm-device/commit/21910a148a290fcebec98bf11df4410ef35662d1</a></p>
<p>[2] <a href="https://github.com/rust-vmm/vm-device/pull/15">https://github.com/rust-vmm/vm-device/pull/15</a><br>
</p>
<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>
<pre>_______________________________________________</pre>
<pre>Rust-vmm mailing list</pre>
<a href="mailto:Rust-vmm@lists.opendev.org">
<pre>Rust-vmm@lists.opendev.org</pre>
</a>
<pre><br></pre>
<a href="http://lists.opendev.org/cgi-bin/mailman/listinfo/rust-vmm">
<pre>http://lists.opendev.org/cgi-bin/mailman/listinfo/rust-vmm</pre>
</a>
<pre><br></pre>
</blockquote>
</body>
</html>