+ if (ret) {
+ /* Could be a mapping attempt resulted in memory getting populated. */
+ ret2 = ram_block_discard_range(vmem->memdev->mr.ram_block, offset,
+ size);
+ if (ret2) {
+ error_report("Unexpected error discarding RAM: %s",
+ strerror(-ret2));
Not a blocker, but it's good to include the RAMBlock/offset/size in
errors like these.
Having a second look, ram_block_discard_range() already properly prints
errors including details. I think I can drop this error_report
completely (all errors when discarding are unexpected).
--
Thanks,
David / dhildenb