[vmbase][pci] Decouple Hal impl from PciTransportIterator
This cl decouples the specific implementation of the
virtio_drivers::Hal trait from the PciTransportIterator struct,
enabling it to be used in a wider range of scenarios. This
also allows the iterator to be tested in the vmbase integration
test.
Test: m pvmfw_img
Test: atest vmbase_example.integration_test
Bug: 284462758
Change-Id: I0bee834e8db534cbdc49be84d5b4cdda30b8288a
diff --git a/pvmfw/src/gpt.rs b/pvmfw/src/gpt.rs
index b553705..892850c 100644
--- a/pvmfw/src/gpt.rs
+++ b/pvmfw/src/gpt.rs
@@ -24,9 +24,11 @@
use uuid::Uuid;
use virtio_drivers::device::blk::SECTOR_SIZE;
use vmbase::util::ceiling_div;
-use vmbase::virtio::pci::VirtIOBlk;
+use vmbase::virtio::{pci, HalImpl};
use zerocopy::FromBytes;
+type VirtIOBlk = pci::VirtIOBlk<HalImpl>;
+
pub enum Error {
/// VirtIO error during read operation.
FailedRead(virtio_drivers::Error),