dragonball: Fix compile error for aarch64

This is to fix a compile error raised for aarch64.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
This commit is contained in:
Hyounggyu Choi 2024-01-09 13:45:46 +01:00
parent 376941cf69
commit 610f878894
2 changed files with 4 additions and 3 deletions

View File

@ -25,6 +25,9 @@ use crate::{Error as VirtioError, Result as VirtioResult};
enum EndpointProtocolFlags {
ProtocolMq = 1,
#[allow(dead_code)]
#[cfg(feature = "vhost-user-blk")]
ProtocolBackend = 2,
}
pub(super) struct Listener {

View File

@ -1038,9 +1038,7 @@ impl DeviceManager {
pub fn get_pci_bus_resources(&self) -> Option<PciBusResources> {
let mut vfio_dev_mgr = self.vfio_manager.lock().unwrap();
let vfio_pci_mgr = vfio_dev_mgr.get_pci_manager();
if vfio_pci_mgr.is_none() {
return None;
}
vfio_pci_mgr.as_ref()?;
let pci_manager = vfio_pci_mgr.unwrap();
let ecam_space = pci_manager.get_ecam_space();
let bar_space = pci_manager.get_bar_space();