mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
Memory: Enable writeback for given memory region
Add an option to trigger memory writeback to sync given memory region with the corresponding backing store, case one is available. This extends the support for persistent memory, allowing syncing on-demand. Signed-off-by: Beata Michalska <beata.michalska@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20191121000843.24844-3-beata.michalska@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
9e70492b43
commit
61c490e25e
6 changed files with 101 additions and 0 deletions
|
@ -174,6 +174,14 @@ void qemu_ram_free(RAMBlock *block);
|
|||
|
||||
int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize, Error **errp);
|
||||
|
||||
void qemu_ram_writeback(RAMBlock *block, ram_addr_t start, ram_addr_t length);
|
||||
|
||||
/* Clear whole block of mem */
|
||||
static inline void qemu_ram_block_writeback(RAMBlock *block)
|
||||
{
|
||||
qemu_ram_writeback(block, 0, block->used_length);
|
||||
}
|
||||
|
||||
#define DIRTY_CLIENTS_ALL ((1 << DIRTY_MEMORY_NUM) - 1)
|
||||
#define DIRTY_CLIENTS_NOCODE (DIRTY_CLIENTS_ALL & ~(1 << DIRTY_MEMORY_CODE))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue