[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 23/29] migration/ram: Add a wrapper for fixed-ram shadow bitma
|
From: |
Fabiano Rosas |
|
Subject: |
[PATCH v2 23/29] migration/ram: Add a wrapper for fixed-ram shadow bitmap |
|
Date: |
Mon, 23 Oct 2023 17:36:02 -0300 |
We'll need to set the shadow_bmap bits from outside ram.c soon and
TARGET_PAGE_BITS is poisoned, so add a wrapper to it.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
migration/ram.c | 5 +++++
migration/ram.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/migration/ram.c b/migration/ram.c
index cea6971ab2..8e34c1b597 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3160,6 +3160,11 @@ static void ram_save_shadow_bmap(QEMUFile *f)
}
}
+void ramblock_set_shadow_bmap_atomic(RAMBlock *block, ram_addr_t offset)
+{
+ set_bit_atomic(offset >> TARGET_PAGE_BITS, block->shadow_bmap);
+}
+
/**
* ram_save_iterate: iterative stage for migration
*
diff --git a/migration/ram.h b/migration/ram.h
index 145c915ca7..1acadffb06 100644
--- a/migration/ram.h
+++ b/migration/ram.h
@@ -75,6 +75,7 @@ int ram_dirty_bitmap_reload(MigrationState *s, RAMBlock *rb);
bool ramblock_page_is_discarded(RAMBlock *rb, ram_addr_t start);
void postcopy_preempt_shutdown_file(MigrationState *s);
void *postcopy_preempt_thread(void *opaque);
+void ramblock_set_shadow_bmap_atomic(RAMBlock *block, ram_addr_t offset);
/* ram cache */
int colo_init_ram_cache(void);
--
2.35.3
- Re: [PATCH v2 19/29] migration/multifd: Add outgoing QIOChannelFile support, (continued)
- [PATCH v2 18/29] migration/multifd: Allow multifd without packets, Fabiano Rosas, 2023/10/23
- [PATCH v2 20/29] migration/multifd: Add incoming QIOChannelFile support, Fabiano Rosas, 2023/10/23
- [PATCH v2 24/29] migration/ram: Ignore multifd flush when doing fixed-ram migration, Fabiano Rosas, 2023/10/23
- [PATCH v2 21/29] migration/multifd: Add pages to the receiving side, Fabiano Rosas, 2023/10/23
- [PATCH v2 22/29] io: Add a pwritev/preadv version that takes a discontiguous iovec, Fabiano Rosas, 2023/10/23
- [PATCH v2 23/29] migration/ram: Add a wrapper for fixed-ram shadow bitmap,
Fabiano Rosas <=
- [PATCH v2 25/29] migration/multifd: Support outgoing fixed-ram stream format, Fabiano Rosas, 2023/10/23
- [PATCH v2 26/29] migration/multifd: Support incoming fixed-ram stream format, Fabiano Rosas, 2023/10/23
- [PATCH v2 27/29] tests/qtest: Add a multifd + fixed-ram migration test, Fabiano Rosas, 2023/10/23
- [PATCH v2 28/29] migration: Add direct-io parameter, Fabiano Rosas, 2023/10/23