Commit 22f04c31 authored by Aurelien Jarno's avatar Aurelien Jarno Committed by Richard Henderson

target/s390x: fix adj_len_to_page

adj_len_to_page doesn't return the correct result when the address
is already page aligned and the length is bigger than a page. Fix that.
Reviewed-by: 's avatarRichard Henderson <>
Signed-off-by: 's avatarAurelien Jarno <>
Message-Id: <>
Signed-off-by: 's avatarRichard Henderson <>
parent 5c2b48a8
......@@ -61,7 +61,7 @@ static inline uint32_t adj_len_to_page(uint32_t len, uint64_t addr)
if ((addr & ~TARGET_PAGE_MASK) + len - 1 >= TARGET_PAGE_SIZE) {
return -addr & ~TARGET_PAGE_MASK;
return -(addr | TARGET_PAGE_MASK);
return len;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment