pci: Enable GSI routing (MSI type) for AArch64

In this commit we saved the BDF of a PCI device and set it to "devid"
in GSI routing entry, because this field is mandatory for GICv3-ITS.

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
Michael Zhao
2020-06-17 21:58:15 +08:00
committed by Rob Bradford
parent 82a0e29c7a
commit cce6237536
9 changed files with 32 additions and 6 deletions

View File

@@ -336,6 +336,7 @@ impl VirtioPciDevice {
msix_num: u16,
iommu_mapping_cb: Option<Arc<VirtioIommuRemapping>>,
interrupt_manager: &Arc<dyn InterruptManager<GroupConfig = MsiIrqGroupConfig>>,
pci_device_bdf: u32,
) -> Result<Self> {
let device_clone = device.clone();
let locked_device = device_clone.lock().unwrap();
@@ -364,6 +365,7 @@ impl VirtioPciDevice {
let msix_config = Arc::new(Mutex::new(MsixConfig::new(
msix_num,
interrupt_source_group.clone(),
pci_device_bdf,
)));
let msix_config_clone = msix_config.clone();
(Some(msix_config), Some(msix_config_clone))