MFC r280434:

Assert that the mapping loop makes progress.
This commit is contained in:
kib 2015-03-31 00:55:12 +00:00
parent ec839daca2
commit 2f3af4a1a4

View File

@ -464,6 +464,7 @@ ctx_map_buf_locked(struct dmar_ctx *ctx, dmar_gaddr_t base, dmar_gaddr_t size,
KASSERT(size >= pg_sz,
("mapping loop overflow %p %jx %jx %jx", ctx,
(uintmax_t)base, (uintmax_t)size, (uintmax_t)pg_sz));
KASSERT(pg_sz > 0, ("pg_sz 0 lvl %d", lvl));
pte = ctx_pgtbl_map_pte(ctx, base, lvl, flags, &idx, &sf);
if (pte == NULL) {
KASSERT((flags & DMAR_PGF_WAITOK) == 0,