diff options
author | kib <kib@FreeBSD.org> | 2015-03-31 00:55:12 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-03-31 00:55:12 +0000 |
commit | 2f3af4a1a441be2964714800c92797a067ba201b (patch) | |
tree | 2ead0cc28be2df59dcf8151933776d09b653dff4 /sys/x86 | |
parent | ec839daca29f4764970ab4a4985b0221bf5e0264 (diff) | |
download | FreeBSD-src-2f3af4a1a441be2964714800c92797a067ba201b.zip FreeBSD-src-2f3af4a1a441be2964714800c92797a067ba201b.tar.gz |
MFC r280434:
Assert that the mapping loop makes progress.
Diffstat (limited to 'sys/x86')
-rw-r--r-- | sys/x86/iommu/intel_idpgtbl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c index 8257974..5eac9f00 100644 --- a/sys/x86/iommu/intel_idpgtbl.c +++ b/sys/x86/iommu/intel_idpgtbl.c @@ -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, |