mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-20 10:20:39 +00:00
runtime-rs: refactor getting the vfio device guest pci path
Fixes: #8748 Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
This commit is contained in:
parent
d795fcfc2f
commit
d2080fd221
@ -137,13 +137,10 @@ impl DragonballInner {
|
|||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
let guest_dev_id = if let Some(pci_path) = primary_device.guest_pci_path {
|
// It's safe to unwrap the guest_pci_path and get device slot,
|
||||||
// safe here, dragonball's pci device directly connects to root bus.
|
// As it has been assigned in vfio device manager.
|
||||||
// usually, it has been assigned in vfio device manager.
|
let pci_path = primary_device.guest_pci_path.unwrap();
|
||||||
pci_path.get_device_slot().unwrap().0
|
let guest_dev_id = pci_path.get_device_slot().unwrap().0;
|
||||||
} else {
|
|
||||||
0
|
|
||||||
};
|
|
||||||
|
|
||||||
info!(
|
info!(
|
||||||
sl!(),
|
sl!(),
|
||||||
|
Loading…
Reference in New Issue
Block a user