diff --git a/qemu/include/exec/memory.h b/qemu/include/exec/memory.h index a270f4f4..ac16c787 100644 --- a/qemu/include/exec/memory.h +++ b/qemu/include/exec/memory.h @@ -271,6 +271,18 @@ struct MemoryRegionSection { bool nonvolatile; }; +static inline bool MemoryRegionSection_eq(MemoryRegionSection *a, + MemoryRegionSection *b) +{ + return a->mr == b->mr && + a->fv == b->fv && + a->offset_within_region == b->offset_within_region && + a->offset_within_address_space == b->offset_within_address_space && + int128_eq(a->size, b->size) && + a->readonly == b->readonly && + a->nonvolatile == b->nonvolatile; +} + static inline MemoryRegionSection MemoryRegionSection_make(MemoryRegion *mr, FlatView *fv, hwaddr offset_within_region, Int128 size, hwaddr offset_within_address_space, bool readonly) {