Skip to content

Commit

Permalink
Fix DMAR context allocations for the devices behind PCIe->PCI bridges
Browse files Browse the repository at this point in the history
after dmar driver was converted to use rids.  The bus component to
calculate context page must be taken from the requestor rid, which is
a bridge, and not from the device bus number.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
  • Loading branch information
kostikbel committed Jan 9, 2015
1 parent 85b15c1 commit 4a8a592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/x86/iommu/intel_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ dmar_get_ctx(struct dmar_unit *dmar, device_t dev, uint16_t rid, bool id_mapped,
* higher chance to succeed if the sleep is allowed.
*/
DMAR_UNLOCK(dmar);
dmar_ensure_ctx_page(dmar, bus);
dmar_ensure_ctx_page(dmar, PCI_RID2BUS(rid));
ctx1 = dmar_get_ctx_alloc(dmar, rid);

if (id_mapped) {
Expand Down

0 comments on commit 4a8a592

Please sign in to comment.