On 19.02.20 23:50, Peter Xu wrote:
> On Wed, Feb 12, 2020 at 02:42:49PM +0100, David Hildenbrand wrote:
>> @@ -178,13 +183,15 @@ void *qemu_ram_mmap(int fd,
>> size_t offset, total;
>> void *ptr, *guardptr;
>>
>> +g_assert(QEMU_IS_ALIGNED(size, pagesize));
>
> (NOTE: assertion is f
On Wed, Feb 12, 2020 at 02:42:49PM +0100, David Hildenbrand wrote:
> @@ -178,13 +183,15 @@ void *qemu_ram_mmap(int fd,
> size_t offset, total;
> void *ptr, *guardptr;
>
> +g_assert(QEMU_IS_ALIGNED(size, pagesize));
(NOTE: assertion is fine, but as I mentioned in previous patch, I
When shrinking a mmap we want to re-reserve the already populated area.
When growing a memory region, we want to populate starting with a given
fd_offset. Prepare by allowing to pass these parameters.
Also, let's make sure we always process full pages, to avoid
unmapping/remapping pages that are a