summary refs log tree commit diff
path: root/x86_64
diff options
context:
space:
mode:
authorDylan Reid <dgreid@chromium.org>2018-06-07 15:42:41 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-07-09 17:59:23 -0700
commit228e4a6a91ea2972b2443d3959c14d862a23c358 (patch)
tree4b7fd7bf8249b7dde2fbd8b958d836bc0a12d420 /x86_64
parent20d71f8928e1e95f6554c87cfca12f24f9f652cf (diff)
downloadcrosvm-228e4a6a91ea2972b2443d3959c14d862a23c358.tar
crosvm-228e4a6a91ea2972b2443d3959c14d862a23c358.tar.gz
crosvm-228e4a6a91ea2972b2443d3959c14d862a23c358.tar.bz2
crosvm-228e4a6a91ea2972b2443d3959c14d862a23c358.tar.lz
crosvm-228e4a6a91ea2972b2443d3959c14d862a23c358.tar.xz
crosvm-228e4a6a91ea2972b2443d3959c14d862a23c358.tar.zst
crosvm-228e4a6a91ea2972b2443d3959c14d862a23c358.zip
Move gpu allocator to resources
Combine GPU buffer allocation with the system resource allocator making
life easier as only one allocator needs to get passed to the execute
function.

Change-Id: I199eb0fd6b99b629aaec1ae3295e8a1942da5309
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1099856
Diffstat (limited to 'x86_64')
-rw-r--r--x86_64/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/x86_64/src/lib.rs b/x86_64/src/lib.rs
index 1e13e77..c887baa 100644
--- a/x86_64/src/lib.rs
+++ b/x86_64/src/lib.rs
@@ -317,14 +317,14 @@ impl arch::LinuxArch for X8664arch {
     }
 
     /// Returns a system resource allocator.
-    fn get_resource_allocator(mem_size: u64) -> SystemAllocator {
+    fn get_resource_allocator(mem_size: u64, gpu_allocation: bool) -> SystemAllocator {
         const MMIO_BASE: u64 = 0xe0000000;
         let device_addr_start = Self::get_base_dev_pfn(mem_size) * sys_util::pagesize() as u64;
         AddressRanges::new()
            .add_io_addresses(0xc000, 0x10000)
            .add_mmio_addresses(MMIO_BASE, 0x10000)
            .add_device_addresses(device_addr_start, u64::max_value() - device_addr_start)
-           .create_allocator(X86_64_IRQ_BASE).unwrap()
+           .create_allocator(X86_64_IRQ_BASE, gpu_allocation).unwrap()
     }
 
     /// Sets up the IO bus for this platform