[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/10] exec: Rename qemu_ram_writeback() as qemu_ram_msync()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 01/10] exec: Rename qemu_ram_writeback() as qemu_ram_msync() |
Date: |
Thu, 7 May 2020 19:39:49 +0200 |
Rename qemu_ram_writeback() as qemu_ram_msync() to better
match what it does.
Suggested-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
include/exec/ram_addr.h | 4 ++--
exec.c | 2 +-
hw/block/nvme.c | 3 +--
memory.c | 2 +-
4 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 4e05292f91..7b5c24e928 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -136,12 +136,12 @@ 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);
+void qemu_ram_msync(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);
+ qemu_ram_msync(block, 0, block->used_length);
}
#define DIRTY_CLIENTS_ALL ((1 << DIRTY_MEMORY_NUM) - 1)
diff --git a/exec.c b/exec.c
index 2874bb5088..f5a8cdf370 100644
--- a/exec.c
+++ b/exec.c
@@ -2127,7 +2127,7 @@ int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize,
Error **errp)
* Otherwise no-op.
* @Note: this is supposed to be a synchronous op.
*/
-void qemu_ram_writeback(RAMBlock *block, ram_addr_t start, ram_addr_t length)
+void qemu_ram_msync(RAMBlock *block, ram_addr_t start, ram_addr_t length)
{
/* The requested range should fit in within the block range */
g_assert((start + length) <= block->used_length);
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 9b453423cf..21a199e53b 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -1207,8 +1207,7 @@ static uint64_t nvme_mmio_read(void *opaque, hwaddr addr,
unsigned size)
*/
if (addr == 0xE08 &&
(NVME_PMRCAP_PMRWBM(n->bar.pmrcap) & 0x02)) {
- qemu_ram_writeback(n->pmrdev->mr.ram_block,
- 0, n->pmrdev->size);
+ qemu_ram_msync(n->pmrdev->mr.ram_block, 0, n->pmrdev->size);
}
memcpy(&val, ptr + addr, size);
} else {
diff --git a/memory.c b/memory.c
index 601b749906..3e65e33ac4 100644
--- a/memory.c
+++ b/memory.c
@@ -2205,7 +2205,7 @@ void memory_region_do_writeback(MemoryRegion *mr, hwaddr
addr, hwaddr size)
* different types of memory regions
*/
if (mr->ram_block && mr->dirty_log_mask) {
- qemu_ram_writeback(mr->ram_block, addr, size);
+ qemu_ram_msync(mr->ram_block, addr, size);
}
}
--
2.21.3