Date: Wed, 6 Jul 2022 17:05:10 GMT From: Doug Moore <dougm@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 01ebb5b8cf8f - stable/13 - iommu_gas: Fix a recent regression with IOMMU_MF_CANSPLIT Message-ID: <202207061705.266H5App083866@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=01ebb5b8cf8f55f1cf5a994d3927411c50aac7ca commit 01ebb5b8cf8f55f1cf5a994d3927411c50aac7ca Author: Alan Cox <alc@FreeBSD.org> AuthorDate: 2022-06-26 16:48:12 +0000 Commit: Doug Moore <dougm@FreeBSD.org> CommitDate: 2022-07-06 17:01:41 +0000 iommu_gas: Fix a recent regression with IOMMU_MF_CANSPLIT As of 19bb5a7244ff, the IOMMU_MF_CANSPLIT case in iommu_gas_match_one() must take into account the specified offset. Otherwise, the recently changed end calculation in iommu_gas_match_insert() could produce an end address that crosses the specified boundary by one page. Reviewed by: dougm MFC with: 19bb5a7244ff (cherry picked from commit 7b39a9bc1df37502e8186593f3427b7ff0e4cc71) --- sys/dev/iommu/iommu_gas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 23e603ef18dc..b6594af80cb9 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -350,7 +350,7 @@ iommu_gas_match_one(struct iommu_gas_match_args *a, iommu_gaddr_t beg, * the next entry, then we do not have gap. Ignore for now. */ if ((a->gas_flags & IOMMU_MF_CANSPLIT) != 0) { - a->size = bs - a->entry->start; + a->size = bs - a->entry->start - a->offset; return (true); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207061705.266H5App083866>