>> /* we can only map whole pages */
>> -size = QEMU_ALIGN_UP(size, pagesize);
>> +old_size = QEMU_ALIGN_UP(old_size, pagesize);
>> +new_size = QEMU_ALIGN_UP(new_size, pagesize);
>
> Shouldn't we just assert old_size and new_size are aligned with
> pagesize?
>
Already reworked :
Hello, David.
On Monday, February 3, 2020 3:31:21 PM -03 David Hildenbrand wrote:
> Implement resizable mmaps. For now, the actual resizing is not wired up.
> Introduce qemu_ram_mmap_resizable() and qemu_ram_mmap_resize(). Make
> qemu_ram_mmap() a wrapper of qemu_ram_mmap_resizable().
>
> Cc: "Mic
On 06.02.20 14:22, David Hildenbrand wrote:
> On 06.02.20 13:08, Richard Henderson wrote:
>> On 2/3/20 6:31 PM, David Hildenbrand wrote:
>>> +void *qemu_ram_mmap_resize(void *ptr, int fd, size_t old_size, size_t
>>> new_size,
>>> + bool shared, bool is_pmem)
>>> {
>>>
On 06.02.20 13:08, Richard Henderson wrote:
> On 2/3/20 6:31 PM, David Hildenbrand wrote:
>> +void *qemu_ram_mmap_resize(void *ptr, int fd, size_t old_size, size_t
>> new_size,
>> + bool shared, bool is_pmem)
>> {
>> const size_t pagesize = mmap_pagesize(fd);
>>
>
On 2/3/20 6:31 PM, David Hildenbrand wrote:
> +void *qemu_ram_mmap_resize(void *ptr, int fd, size_t old_size, size_t
> new_size,
> + bool shared, bool is_pmem)
> {
> const size_t pagesize = mmap_pagesize(fd);
>
> /* we can only map whole pages */
> -size
Implement resizable mmaps. For now, the actual resizing is not wired up.
Introduce qemu_ram_mmap_resizable() and qemu_ram_mmap_resize(). Make
qemu_ram_mmap() a wrapper of qemu_ram_mmap_resizable().
Cc: "Michael S. Tsirkin"
Cc: Greg Kurz
Cc: Murilo Opsfelder Araujo
Cc: Eduardo Habkost
Cc: "Dr.