From owner-svn-src-stable-10@FreeBSD.ORG Tue Mar 31 00:55:13 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3FF81C4; Tue, 31 Mar 2015 00:55:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F070394; Tue, 31 Mar 2015 00:55:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2V0tDZP033260; Tue, 31 Mar 2015 00:55:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V0tDWH033259; Tue, 31 Mar 2015 00:55:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503310055.t2V0tDWH033259@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 31 Mar 2015 00:55:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r280873 - stable/10/sys/x86/iommu X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2015 00:55:13 -0000 Author: kib Date: Tue Mar 31 00:55:12 2015 New Revision: 280873 URL: https://svnweb.freebsd.org/changeset/base/280873 Log: MFC r280434: Assert that the mapping loop makes progress. Modified: stable/10/sys/x86/iommu/intel_idpgtbl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_idpgtbl.c ============================================================================== --- stable/10/sys/x86/iommu/intel_idpgtbl.c Tue Mar 31 00:18:00 2015 (r280872) +++ stable/10/sys/x86/iommu/intel_idpgtbl.c Tue Mar 31 00:55:12 2015 (r280873) @@ -464,6 +464,7 @@ ctx_map_buf_locked(struct dmar_ctx *ctx, 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,