Try reading block device. Share queues and buffers with host.
For now the host will be able to both read and write all parts of the
virtqueues, but the buffers themselves will be copied so the host can't
write over buffer it shouldn't.
Bug: 237250092
Bug: 261439403
Test: Ran pVM firmware manually with a block device
Change-Id: I38d965e92342e86e39b5cc8b9cf32ad3bc90417b
diff --git a/pvmfw/src/main.rs b/pvmfw/src/main.rs
index 9b14644..ada9a63 100644
--- a/pvmfw/src/main.rs
+++ b/pvmfw/src/main.rs
@@ -19,6 +19,8 @@
#![feature(default_alloc_error_handler)]
#![feature(ptr_const_cast)] // Stabilized in 1.65.0
+extern crate alloc;
+
mod avb;
mod config;
mod entry;
@@ -30,14 +32,14 @@
mod memory;
mod mmio_guard;
mod mmu;
-mod pci;
mod smccc;
+mod virtio;
use crate::{
avb::PUBLIC_KEY,
entry::RebootReason,
memory::MemoryTracker,
- pci::{find_virtio_devices, map_mmio},
+ virtio::pci::{find_virtio_devices, map_mmio},
};
use dice::bcc;
use fdtpci::{PciError, PciInfo};