HV: add DRHD index to pci_pdev

We add new member pci_pdev.drhd_idx associating the DRHD
(IOMMU) with this pdev, and a method to convert a pbdf of a device to
this index by searching the pdev list.

Partial patch: drhd_index initialization handled in subsequent patch.

Tracked-On: #4134
Signed-off-by: Alexander Merritt <alex.merritt@intel.com>
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Alexander Merritt
2019-10-31 23:58:27 -07:00
committed by wenlingz
parent 0b7bcd6408
commit ea131eea41
3 changed files with 38 additions and 0 deletions

View File

@@ -10,6 +10,8 @@
#include <pci.h>
#include <platform_acpi_info.h>
#define INVALID_DRHD_INDEX 0xFFFFFFFFU
/*
* Intel IOMMU register specification per version 1.0 public spec.
*/