On Tue, Jul 14, 2026 at 07:45:42PM +0530, Aadeshveer Singh wrote:
> +static void ramblock_pending_bmap_init(void)
> +{
> + RAMBlock *rb;
> +
> + RAMBLOCK_FOREACH_NOT_IGNORED(rb) {
> + assert(!rb->pending_bmap);
> + size_t size = rb->max_length >> qemu_target_page_bits();
I forgot one thing here: I think it should use qemu_ram_pagesize(), for
huge pages when the fault thread or eager load thread want to figure how
who to do the work, it should always be in host psize, not guest-psize,
because that's the granule userfaultfd's UFFDIO_COPY/ZEROPAGE uses.
> + rb->pending_bmap = bitmap_new(size);
> + bitmap_set(rb->pending_bmap, 0, size);
> + }
> +}
--
Peter Xu