summary refs log tree commit diff
path: root/src/linux.rs
diff options
context:
space:
mode:
authorXiong Zhang <xiong.y.zhang@intel.corp-partner.google.com>2019-10-30 14:59:26 +0800
committerCommit Bot <commit-bot@chromium.org>2019-11-10 06:39:34 +0000
commit383b3b520a76a921be17a12640b24fba1419dbbb (patch)
tree1aea1553c2534aab73b265929cf462c0d8999a67 /src/linux.rs
parent87a3b44d9e6caa82ab521a5dd9bafdb56e8b6ed1 (diff)
downloadcrosvm-383b3b520a76a921be17a12640b24fba1419dbbb.tar
crosvm-383b3b520a76a921be17a12640b24fba1419dbbb.tar.gz
crosvm-383b3b520a76a921be17a12640b24fba1419dbbb.tar.bz2
crosvm-383b3b520a76a921be17a12640b24fba1419dbbb.tar.lz
crosvm-383b3b520a76a921be17a12640b24fba1419dbbb.tar.xz
crosvm-383b3b520a76a921be17a12640b24fba1419dbbb.tar.zst
crosvm-383b3b520a76a921be17a12640b24fba1419dbbb.zip
resource: Rename device memory to mmio
Since unified allocator is used to allocate mmio, this patch remove the
device memory name, and rename device to mmio.

BUG=chromium:992270
TEST=this patch doesn't change function, run build_test

Change-Id: I234b0db4b3c5de8cfee372ace5212a980564d0c7
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1895234
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Diffstat (limited to 'src/linux.rs')
-rw-r--r--src/linux.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/linux.rs b/src/linux.rs
index 2816d55..24ef5ec 100644
--- a/src/linux.rs
+++ b/src/linux.rs
@@ -784,7 +784,7 @@ fn create_pmem_device(
     };
 
     let mapping_address = resources
-        .mmio_allocator(MmioType::Device)
+        .mmio_allocator(MmioType::High)
         .allocate_with_align(
             image_size,
             Alloc::PmemDevice(index),
@@ -794,7 +794,7 @@ fn create_pmem_device(
         )
         .map_err(Error::AllocatePmemDeviceAddress)?;
 
-    vm.add_device_memory(
+    vm.add_mmio_memory(
         GuestAddress(mapping_address),
         memory_mapping,
         /* read_only = */ disk.read_only,
@@ -1420,11 +1420,11 @@ pub fn run_config(cfg: Config) -> Result<()> {
             MemoryMapping::new_protection(RENDER_NODE_HOST_SIZE as usize, Protection::none())
                 .map_err(Error::ReserveGpuMemory)?;
 
-        // Put the non-accessible memory map into device memory so that no other devices use that
+        // Put the non-accessible memory map into high mmio so that no other devices use that
         // guest address space.
         let gpu_addr = linux
             .resources
-            .mmio_allocator(MmioType::Device)
+            .mmio_allocator(MmioType::High)
             .allocate(
                 RENDER_NODE_HOST_SIZE,
                 Alloc::GpuRenderNode,
@@ -1437,7 +1437,7 @@ pub fn run_config(cfg: Config) -> Result<()> {
         // Makes the gpu memory accessible at allocated address.
         linux
             .vm
-            .add_device_memory(
+            .add_mmio_memory(
                 GuestAddress(gpu_addr),
                 gpu_mmap,
                 /* read_only = */ false,