Turn hypervisor backends module into a library
Break out the code in the hyp module of libvmbase
into its own library such that it can be used from
other contexts such as the Trusty kernel.
Update uses in guest/{pvmfw,rialto}.
Add Trusty build rules for the new library.
Test: atest
Test: build.py generic-x86_64-test
Change-Id: I68670549c8c8e1b3c8539c2c297e2ca1ba24edfb
diff --git a/guest/rialto/src/main.rs b/guest/rialto/src/main.rs
index ec9a76e..244010d 100644
--- a/guest/rialto/src/main.rs
+++ b/guest/rialto/src/main.rs
@@ -32,6 +32,7 @@
use core::num::NonZeroUsize;
use core::slice;
use diced_open_dice::{bcc_handover_parse, DiceArtifacts};
+use hypervisor_backends::get_mem_sharer;
use libfdt::FdtError;
use log::{debug, error, info};
use service_vm_comm::{ServiceVmRequest, VmType};
@@ -47,7 +48,6 @@
fdt::pci::PciInfo,
fdt::SwiotlbInfo,
generate_image_header,
- hyp::get_mem_sharer,
layout::{self, crosvm},
main,
memory::{MemoryTracker, PageTable, MEMORY, PAGE_SIZE, SIZE_128KB},