| 489 | } |
| 490 | |
| 491 | static unsigned int convert_address(const struct region *to, const struct region *from, |
| 492 | unsigned int addr) |
| 493 | { |
| 494 | /* |
| 495 | * Calculate the offset in the "from" region and use that offset to calculate |
| 496 | * corresponding address in the "to" region. |
| 497 | */ |
| 498 | size_t offset = addr - region_offset(from); |
| 499 | return region_offset(to) + offset; |
| 500 | } |
| 501 | |
| 502 | enum mmap_addr_type { |
| 503 | HOST_SPACE_ADDR, |
no test coverage detected