|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] IOMMU: simplify unmap-on-error in iommu_map()
commit 09e4ac7bc071ad0549adcb24d82d8a3c4e72d05c
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri May 20 12:21:49 2022 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri May 20 12:21:49 2022 +0200
IOMMU: simplify unmap-on-error in iommu_map()
As of 68a8aa5d7264 ("iommu: make map and unmap take a page count,
similar to flush") there's no need anymore to have a loop here.
Suggested-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
xen/drivers/passthrough/iommu.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 67ffe6635e..3762d0bd86 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -308,11 +308,9 @@ int iommu_map(struct domain *d, dfn_t dfn, mfn_t mfn,
d->domain_id, dfn_x(dfn_add(dfn, i)),
mfn_x(mfn_add(mfn, i)), rc);
- while ( i-- )
- /* if statement to satisfy __must_check */
- if ( iommu_call(hd->platform_ops, unmap_page, d, dfn_add(dfn, i),
- flush_flags) )
- continue;
+ /* while statement to satisfy __must_check */
+ while ( iommu_unmap(d, dfn, i, flush_flags) )
+ break;
if ( !is_hardware_domain(d) )
domain_crash(d);
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |