exec: Relax range check in ram_block_discard_range()
commitdcdc460767ed0a650e06ff256fa2a52ff1b57047
authorDavid Hildenbrand <david@redhat.com>
Thu, 29 Apr 2021 11:27:03 +0000 (29 13:27 +0200)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 13 May 2021 17:21:13 +0000 (13 18:21 +0100)
treef514885e8adc6324babc1066f34e80960ed73a1c
parentc7c0e72408df5e7821c0e995122fb2fe0ac001f1
exec: Relax range check in ram_block_discard_range()

We want to make use of ram_block_discard_range() in the RAM block resize
callback when growing a RAM block, *before* used_length is changed.
Let's relax the check. As RAM blocks always mmap the whole max_length area,
we cannot corrupt unrelated data.

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210429112708.12291-6-david@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
softmmu/physmem.c