summary refs log tree commit diff
path: root/src/linux.rs
diff options
context:
space:
mode:
authorLepton Wu <lepton@chromium.org>2019-12-09 10:19:54 -0800
committerCommit Bot <commit-bot@chromium.org>2019-12-10 19:14:40 +0000
commit84be74727c7510d48d516de89c88374db78e71b3 (patch)
tree8b42a753f1b12b666f62454ec42db12054ace41b /src/linux.rs
parentbb30b2f7cf2721b32da71adfa7f7482bfce7b915 (diff)
downloadcrosvm-84be74727c7510d48d516de89c88374db78e71b3.tar
crosvm-84be74727c7510d48d516de89c88374db78e71b3.tar.gz
crosvm-84be74727c7510d48d516de89c88374db78e71b3.tar.bz2
crosvm-84be74727c7510d48d516de89c88374db78e71b3.tar.lz
crosvm-84be74727c7510d48d516de89c88374db78e71b3.tar.xz
crosvm-84be74727c7510d48d516de89c88374db78e71b3.tar.zst
crosvm-84be74727c7510d48d516de89c88374db78e71b3.zip
Remove render node forward code
We don't use it for ARCVM now.
BUG=None
TEST=`emerge-eve crosvm`
Change-Id: I14343a2eb24c24a0216950b7c4eeb56ac482973e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1958569
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Lepton Wu <lepton@chromium.org>
Auto-Submit: Lepton Wu <lepton@chromium.org>
Diffstat (limited to 'src/linux.rs')
-rw-r--r--src/linux.rs46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/linux.rs b/src/linux.rs
index f692ea0..006af42 100644
--- a/src/linux.rs
+++ b/src/linux.rs
@@ -69,11 +69,6 @@ use aarch64::AArch64 as Arch;
 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
 use x86_64::X8664arch as Arch;
 
-#[cfg(feature = "gpu-forward")]
-use render_node_forward::*;
-#[cfg(not(feature = "gpu-forward"))]
-type RenderNodeHost = ();
-
 #[sorted]
 #[derive(Debug)]
 pub enum Error {
@@ -1493,45 +1488,6 @@ pub fn run_config(cfg: Config) -> Result<()> {
     )
     .map_err(Error::BuildVm)?;
 
-    let _render_node_host = ();
-    #[cfg(feature = "gpu-forward")]
-    let (_render_node_host, linux) = {
-        // Rebinds linux as mutable.
-        let mut linux = linux;
-
-        // Reserve memory range for GPU buffer allocation in advance to bypass region count
-        // limitation. We use mremap/MAP_FIXED later to make sure GPU buffers fall into this range.
-        let gpu_mmap =
-            MemoryMapping::new_protection(RENDER_NODE_HOST_SIZE as usize, Protection::none())
-                .map_err(Error::ReserveGpuMemory)?;
-
-        // 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::High)
-            .allocate(
-                RENDER_NODE_HOST_SIZE,
-                Alloc::GpuRenderNode,
-                "gpu_render_node".to_string(),
-            )
-            .map_err(|_| Error::AllocateGpuDeviceAddress)?;
-
-        let host = RenderNodeHost::start(&gpu_mmap, gpu_addr, linux.vm.get_memory().clone());
-
-        // Makes the gpu memory accessible at allocated address.
-        linux
-            .vm
-            .add_mmio_memory(
-                GuestAddress(gpu_addr),
-                gpu_mmap,
-                /* read_only = */ false,
-                /* log_dirty_pages = */ false,
-            )
-            .map_err(Error::AddGpuDeviceMemory)?;
-        (host, linux)
-    };
-
     run_control(
         linux,
         control_server_socket,
@@ -1540,7 +1496,6 @@ pub fn run_config(cfg: Config) -> Result<()> {
         &disk_host_sockets,
         usb_control_socket,
         sigchld_fd,
-        _render_node_host,
         sandbox,
     )
 }
@@ -1553,7 +1508,6 @@ fn run_control(
     disk_host_sockets: &[DiskControlRequestSocket],
     usb_control_socket: UsbControlSocket,
     sigchld_fd: SignalFd,
-    _render_node_host: RenderNodeHost,
     sandbox: bool,
 ) -> Result<()> {
     // Paths to get the currently available memory and the low memory threshold.