Wildcard mmio eventfd use zero size, but it will lead abort() since it was illegal in adjust_endianness(). Fix this by allowing zero size.
Cc: Greg Kurz <gk...@linux.vnet.ibm.com> Cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Jason Wang <jasow...@redhat.com> --- memory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/memory.c b/memory.c index 4eb138a..134aa57 100644 --- a/memory.c +++ b/memory.c @@ -353,6 +353,7 @@ static void adjust_endianness(MemoryRegion *mr, uint64_t *data, unsigned size) { if (memory_region_wrong_endianness(mr)) { switch (size) { + case 0: case 1: break; case 2: -- 2.1.4