[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [qemu-xen staging-4.13] memory: Provide an equality function for MemoryRegionSections
commit 42b6571357a083f721a27daa6dfdc69e4bd516bd Author: Dr. David Alan Gilbert <dgilbert@xxxxxxxxxx> AuthorDate: Wed Aug 14 18:55:34 2019 +0100 Commit: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx> CommitDate: Tue Nov 12 16:23:54 2019 -0600 memory: Provide an equality function for MemoryRegionSections Provide a comparison function that checks all the fields are the same. Signed-off-by: Dr. David Alan Gilbert <dgilbert@xxxxxxxxxx> Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> Message-Id: <20190814175535.2023-3-dgilbert@xxxxxxxxxx> Reviewed-by: Michael S. Tsirkin <mst@xxxxxxxxxx> Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx> (cherry picked from commit 9366cf02e4e31c2a8128904d4d8290a0fad5f888) Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx> --- include/exec/memory.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index e28d79cc59..611a89122d 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -496,6 +496,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; +} + /** * memory_region_init: Initialize a memory region * -- generated by git-patchbot for /home/xen/git/qemu-xen.git#staging-4.13
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |