From a3411eaac1ad3d51d5282d1462d6764ad539ce13 Mon Sep 17 00:00:00 2001 From: Jakub Staron Date: Wed, 24 Apr 2019 10:55:25 -0700 Subject: crosvm: virtio-pmem device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds support for virtio-pmem device as an alternative for virtio-blk. Exposing disk image to guest as virtio-blk device results in both guest and host independently caching the disk I/O. Using virtio-pmem device allows to mount disk image as direct access (DAX) in the guest and thus bypass the guest cache. This will reduce memory foodprint of the VMs. BUG=None TEST=cargo test TEST=Boot patched termina kernel in crosvm; mount virtio-pmem device as DAX and run xfstests. Change-Id: I935fc8fc7527f79e5169f07ec7927e4ea4fa6027 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1605517 Tested-by: kokoro Reviewed-by: Zach Reizner Commit-Queue: Jakub StaroĊ„ --- resources/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'resources/src/lib.rs') diff --git a/resources/src/lib.rs b/resources/src/lib.rs index a49f998..c10608e 100644 --- a/resources/src/lib.rs +++ b/resources/src/lib.rs @@ -33,6 +33,8 @@ pub enum Alloc { PciBar { bus: u8, dev: u8, bar: u8 }, /// GPU render node region. GpuRenderNode, + /// Pmem device region with associated device index. + PmemDevice(usize), } #[derive(Debug, Eq, PartialEq)] -- cgit 1.4.1