Re: [PATCH] system/physmem: Where we assume we have a RAM MR, assert it

2024-07-23 Thread David Hildenbrand
On 23.07.24 19:05, Peter Maydell wrote: In the functions invalidate_and_set_dirty() and cpu_physical_memory_snapshot_and_clear_dirty(), we assume that we are dealing with RAM memory regions. In this case we know that memory_region_get_ram_addr() will succeed. Assert this before we use the

Re: [PATCH] system/physmem: Where we assume we have a RAM MR, assert it

2024-07-23 Thread Peter Xu
On Tue, Jul 23, 2024 at 06:05:13PM +0100, Peter Maydell wrote: > In the functions invalidate_and_set_dirty() and > cpu_physical_memory_snapshot_and_clear_dirty(), we assume that we > are dealing with RAM memory regions. In this case we know that > memory_region_get_ram_addr() will succeed. Assert

[PATCH] system/physmem: Where we assume we have a RAM MR, assert it

2024-07-23 Thread Peter Maydell
In the functions invalidate_and_set_dirty() and cpu_physical_memory_snapshot_and_clear_dirty(), we assume that we are dealing with RAM memory regions. In this case we know that memory_region_get_ram_addr() will succeed. Assert this before we use the returned ram_addr_t in arithmetic. This makes