mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-27 15:05:24 +00:00
08604ac6a8
As we try to keep track of every PCI device related to the VM, we don't want to have separate lists depending on the concrete type associated with the PciDevice trait. Also, we want to be able to cast the actual type into any trait or concrete type. The most efficient way to solve all these issues is to store every device as an Arc<dyn Any + Send + Sync>. This gives the ability to downcast into the appropriate concrete type, and then to cast back into any trait that we might need. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>