Skip to content

Commit

Permalink
ioport: use INT64_MAX for IO ranges
Browse files Browse the repository at this point in the history
Expression UINT64_MAX + 1 will make the range bigger than
what can be represented with a 64 bit type. This would
trigger an assert in int128_get64() after the next patch.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
blueswirl authored and avikivity committed Mar 19, 2012
1 parent 5bd33de commit 4200872
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ioport.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ static void portio_list_add_1(PortioList *piolist,
* rather than an offset relative to to start + off_low.
*/
memory_region_init_io(region, ops, piolist->opaque, piolist->name,
UINT64_MAX);
INT64_MAX);
memory_region_init_alias(alias, piolist->name,
region, start + off_low, off_high - off_low);
memory_region_add_subregion(piolist->address_space,
Expand Down

0 comments on commit 4200872

Please sign in to comment.