Lines Matching refs:dom
158 struct domain *dom;
162 SLIST_FOREACH(dom, &domhead, next) {
163 if (dom->id == id)
166 if (dom == NULL)
439 struct domain *dom = arg;
444 KASSERT(dom != NULL, ("domain is NULL"));
448 pt_paddr = vtophys(dom->ptp);
465 ctxp[idx + 1] = dom->addrwidth | (dom->id << 8);
518 struct domain *dom;
522 dom = arg;
528 KASSERT(gpa + len <= dom->maxaddr, ("%s: gpa range %#lx/%#lx beyond "
529 "domain maxaddr %#lx", __func__, gpa, len, dom->maxaddr));
551 if ((dom->spsmask & (1 << i)) != 0 &&
560 ptp = dom->ptp;
561 nlevels = dom->pt_levels;
618 vtd_invalidate_tlb(void *dom)
636 struct domain *dom;
691 dom = malloc(sizeof(struct domain), M_VTD, M_ZERO | M_WAITOK);
692 dom->pt_levels = pt_levels;
693 dom->addrwidth = addrwidth;
694 dom->id = domain_id();
695 dom->maxaddr = maxaddr;
696 dom->ptp = malloc(PAGE_SIZE, M_VTD, M_ZERO | M_WAITOK);
697 if ((uintptr_t)dom->ptp & PAGE_MASK)
698 panic("vtd_create_domain: ptp (%p) not page aligned", dom->ptp);
715 dom->spsmask = ~0;
719 dom->spsmask &= VTD_CAP_SPS(vtdmap->cap);
723 SLIST_INSERT_HEAD(&domhead, dom, next);
725 return (dom);
752 struct domain *dom;
754 dom = arg;
756 SLIST_REMOVE(&domhead, dom, domain, next);
757 vtd_free_ptp(dom->ptp, dom->pt_levels);
758 free(dom, M_VTD);