[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 00/10] exec: Shear 'exec/ram_addr.h' and make NVMe device tar
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH 00/10] exec: Shear 'exec/ram_addr.h' and make NVMe device target-agnostic |
Date: |
Fri, 8 May 2020 00:15:07 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 07/05/20 19:39, Philippe Mathieu-Daudé wrote:
> Stefan suggested to make qemu_ram_writeback() target agnostic,
> Paolo to add memory_region_msync(), and Peter to remove
> "exec/ram_addr.h" [*].
>
> I let a single function in this file,
> cpu_physical_memory_sync_dirty_bitmap(), to let the maintainer
> have the pleasure to remove this header definitively himself :)
I don't think this is a good idea. :)
"exec/ram_addr.h" is a good place for functions that work on ram-addr_t
and/or RAMBlock data. There should very few of these, since these are
mostly an internal concept that should only be used for live migration.
You could:
- figure out which files actually need to include exec/ram_addr.h.
There's already very few of them.
- move the large functions to a new .c file, ramblock.c. Figure out
which can be static, move the declarations for the others to ramblock.h
- kill ram_addr.h and include ramblock.h instead.
Not coincidentially, qemu_ram_writeback() takes a RAMBlock*, and it ends
up in ramblock.h.
Also, this is orthogonal to adding the wrapper memory_region_msync.
Thanks,
Paolo
- Re: [PATCH 07/10] exec: Move all RAMBlock functions to 'exec/ramblock.h', (continued)