[PATCH 4/9] allow intersecting region to be on the boundary.

Glauber Costa
2008-08-13T00:50:47Z

libkvm/libkvm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
index eb85445..33f00b7 100644
--- a/libkvm/libkvm.c
+++ b/libkvm/libkvm.c
@@ -134,8 +134,8 @@ int get_intersecting_slot(unsigned long phys_addr)
int i;

for (i = 0; i < KVM_MAX_NUM_MEM_REGIONS ; ++i)
- if (slots[i].len && slots[i].phys_addr < phys_addr &&
- (slots[i].phys_addr + slots[i].len) > phys_addr)
+ if (slots[i].len && slots[i].phys_addr <= phys_addr &&
+ (slots[i].phys_addr + slots[i].len) >= phys_addr)
return i;
return -1;
}
--
1.5.5.1