summaryrefslogtreecommitdiffstats
path: root/sys/x86/iommu/intel_dmar.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/x86/iommu/intel_dmar.h')
-rw-r--r--sys/x86/iommu/intel_dmar.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h
index 1f842d4..0b68024 100644
--- a/sys/x86/iommu/intel_dmar.h
+++ b/sys/x86/iommu/intel_dmar.h
@@ -74,7 +74,9 @@ RB_PROTOTYPE(dmar_gas_entries_tree, dmar_map_entry, rb_entry,
#define DMAR_MAP_ENTRY_TM 0x8000 /* Transient */
struct dmar_ctx {
- uint16_t rid; /* pci RID */
+ int bus; /* pci bus/slot/func */
+ int slot;
+ int func;
int domain; /* DID */
int mgaw; /* Real max address width */
int agaw; /* Adjusted guest address width */
@@ -267,11 +269,12 @@ void ctx_free_pgtbl(struct dmar_ctx *ctx);
struct dmar_ctx *dmar_instantiate_ctx(struct dmar_unit *dmar, device_t dev,
bool rmrr);
-struct dmar_ctx *dmar_get_ctx(struct dmar_unit *dmar, device_t dev,
- uint16_t rid, bool id_mapped, bool rmrr_init);
+struct dmar_ctx *dmar_get_ctx(struct dmar_unit *dmar, device_t dev,
+ int bus, int slot, int func, bool id_mapped, bool rmrr_init);
void dmar_free_ctx_locked(struct dmar_unit *dmar, struct dmar_ctx *ctx);
void dmar_free_ctx(struct dmar_ctx *ctx);
-struct dmar_ctx *dmar_find_ctx_locked(struct dmar_unit *dmar, uint16_t rid);
+struct dmar_ctx *dmar_find_ctx_locked(struct dmar_unit *dmar, int bus,
+ int slot, int func);
void dmar_ctx_unload_entry(struct dmar_map_entry *entry, bool free);
void dmar_ctx_unload(struct dmar_ctx *ctx,
struct dmar_map_entries_tailq *entries, bool cansleep);
OpenPOWER on IntegriCloud