|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/5] iommu/x86: fix IVMD/RMRR range checker loop increment
mfn_add() doesn't store the incremented value in the parameter, and instead
returns it to the caller. As a result, the loop in iommu_unity_region_ok()
didn't make progress. Fix it by storing the incremented value.
Fixes: e45801dea17b ('iommu/x86: introduce a generic IVMD/RMRR range validity
helper')
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
xen/drivers/passthrough/x86/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/drivers/passthrough/x86/iommu.c
b/xen/drivers/passthrough/x86/iommu.c
index 1c8cf3271a09..a3fa0aef7c37 100644
--- a/xen/drivers/passthrough/x86/iommu.c
+++ b/xen/drivers/passthrough/x86/iommu.c
@@ -804,7 +804,7 @@ bool __init iommu_unity_region_ok(const char *prefix, mfn_t
start, mfn_t end)
"%s: [%#" PRI_mfn " ,%#" PRI_mfn "] is not (entirely) in reserved
memory\n",
prefix, mfn_x(start), mfn_x(end));
- for ( addr = start; mfn_x(addr) <= mfn_x(end); mfn_add(addr, 1) )
+ for ( addr = start; mfn_x(addr) <= mfn_x(end); addr = mfn_add(addr, 1) )
{
unsigned int type = page_get_ram_type(addr);
--
2.43.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |