On Thu, Sep 02, 2021 at 03:14:30PM +0200, David Hildenbrand wrote: > diff --git a/migration/migration.c b/migration/migration.c > index bb909781b7..ae97c2c461 100644 > --- a/migration/migration.c > +++ b/migration/migration.c > @@ -391,7 +391,7 @@ int > migrate_send_rp_message_req_pages(MigrationIncomingState *mis, > int migrate_send_rp_req_pages(MigrationIncomingState *mis, > RAMBlock *rb, ram_addr_t start, uint64_t haddr) > { > - void *aligned = (void *)(uintptr_t)(haddr & (-qemu_ram_pagesize(rb))); > + void *aligned = (void *)QEMU_ALIGN_DOWN(haddr, qemu_ram_pagesize(rb));
Is uintptr_t still needed? I thought it would generate a warning otherwise but not sure. Also, maybe ROUND_DOWN() is better? QEMU_ALIGN_DOWN is the slow version for arbitrary numbers. -- Peter Xu