[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v1 21/26] migration/ram: Add a wrapper for fixed-ram shadow b
From: |
Fabiano Rosas |
Subject: |
[RFC PATCH v1 21/26] migration/ram: Add a wrapper for fixed-ram shadow bitmap |
Date: |
Thu, 30 Mar 2023 15:03:31 -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 | 9 +++++++++
migration/ram.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/migration/ram.c b/migration/ram.c
index 1666ce6d5f..e9b28c16da 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3359,6 +3359,15 @@ static void ram_save_shadow_bmap(QEMUFile *f)
}
}
+void ramblock_set_shadow_bmap(RAMBlock *block, ram_addr_t offset, bool set)
+{
+ if (set) {
+ set_bit(offset >> TARGET_PAGE_BITS, block->shadow_bmap);
+ } else {
+ clear_bit(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 81cbb0947c..8d8258fee1 100644
--- a/migration/ram.h
+++ b/migration/ram.h
@@ -98,6 +98,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(RAMBlock *block, ram_addr_t offset, bool set);
/* ram cache */
int colo_init_ram_cache(void);
--
2.35.3
- Re: [RFC PATCH v1 10/26] migration/ram: Introduce 'fixed-ram' migration stream capability, (continued)
- [RFC PATCH v1 11/26] migration: Refactor precopy ram loading code, Fabiano Rosas, 2023/03/30
- [RFC PATCH v1 12/26] migration: Add support for 'fixed-ram' migration restore, Fabiano Rosas, 2023/03/30
- [RFC PATCH v1 13/26] tests/qtest: migration-test: Add tests for fixed-ram file-based migration, Fabiano Rosas, 2023/03/30
- [RFC PATCH v1 15/26] migration/multifd: Remove direct "socket" references, Fabiano Rosas, 2023/03/30
- [RFC PATCH v1 14/26] migration: Add completion tracepoint, Fabiano Rosas, 2023/03/30
- [RFC PATCH v1 16/26] migration/multifd: Allow multifd without packets, Fabiano Rosas, 2023/03/30
- [RFC PATCH v1 17/26] migration/multifd: Add outgoing QIOChannelFile support, Fabiano Rosas, 2023/03/30
- [RFC PATCH v1 19/26] migration/multifd: Add pages to the receiving side, Fabiano Rosas, 2023/03/30
- [RFC PATCH v1 18/26] migration/multifd: Add incoming QIOChannelFile support, Fabiano Rosas, 2023/03/30
- [RFC PATCH v1 21/26] migration/ram: Add a wrapper for fixed-ram shadow bitmap,
Fabiano Rosas <=
- [RFC PATCH v1 22/26] migration/multifd: Support outgoing fixed-ram stream format, Fabiano Rosas, 2023/03/30
- [RFC PATCH v1 20/26] io: Add a pwritev/preadv version that takes a discontiguous iovec, Fabiano Rosas, 2023/03/30
- [RFC PATCH v1 23/26] migration/multifd: Support incoming fixed-ram stream format, Fabiano Rosas, 2023/03/30
- [RFC PATCH v1 25/26] migration: Add direct-io parameter, Fabiano Rosas, 2023/03/30
- [RFC PATCH v1 24/26] tests/qtest: Add a multifd + fixed-ram migration test, Fabiano Rosas, 2023/03/30
- [RFC PATCH v1 26/26] tests/migration/guestperf: Add file, fixed-ram and direct-io support, Fabiano Rosas, 2023/03/30
- Re: [RFC PATCH v1 00/26] migration: File based migration with multifd and fixed-ram, Peter Xu, 2023/03/30