hw/sd/sdcard: Extract address_in_range() helper, log invalid accesses
commit66c152d7b45ae8bd2a021226bb7689424d872687
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 7 Jun 2021 13:32:06 +0000 (7 15:32 +0200)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 12 Jul 2021 10:27:38 +0000 (12 12:27 +0200)
tree685421cb11e50a6dd9d4c52a60307e84f1ecf110
parentc60b292106132f72c1a5afbbd9c55dbc341d1620
hw/sd/sdcard: Extract address_in_range() helper, log invalid accesses

Multiple commands have to check the address requested is valid.
Extract this code pattern as a new address_in_range() helper, and
log invalid accesses as guest errors.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Message-Id: <20210624142209.1193073-3-f4bug@amsat.org>
hw/sd/sd.c