qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] memory: allow zero size for adjust_endianness()
@ 2015-08-26 10:04 Jason Wang
  2015-08-26 10:04 ` [Qemu-devel] [PATCH 2/2] pci: test-dev: try to test fast mmio bus for wildcard mmio event Jason Wang
  2015-08-26 14:21 ` [Qemu-devel] [PATCH 1/2] memory: allow zero size for adjust_endianness() Peter Maydell
  0 siblings, 2 replies; 18+ messages in thread
From: Jason Wang @ 2015-08-26 10:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Jason Wang, Greg Kurz, mst

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 <gkurz@linux.vnet.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jason Wang <jasowang@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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-08-28  2:23 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26 10:04 [Qemu-devel] [PATCH 1/2] memory: allow zero size for adjust_endianness() Jason Wang
2015-08-26 10:04 ` [Qemu-devel] [PATCH 2/2] pci: test-dev: try to test fast mmio bus for wildcard mmio event Jason Wang
2015-08-27 10:28   ` Michael S. Tsirkin
2015-08-26 14:21 ` [Qemu-devel] [PATCH 1/2] memory: allow zero size for adjust_endianness() Peter Maydell
2015-08-26 14:51   ` Greg Kurz
2015-08-27  4:50     ` Jason Wang
2015-08-27 10:49       ` Peter Maydell
2015-08-27 10:53         ` Michael S. Tsirkin
2015-08-27 11:04           ` Peter Maydell
2015-08-27 11:08             ` Michael S. Tsirkin
2015-08-27 12:12               ` Peter Maydell
2015-08-27 12:17                 ` Michael S. Tsirkin
2015-08-27 12:20                   ` Peter Maydell
2015-08-27 12:25                     ` Michael S. Tsirkin
2015-08-27 12:27                       ` Peter Maydell
2015-08-27 12:30                         ` Michael S. Tsirkin
2015-08-27 13:10                           ` Greg Kurz
2015-08-28  2:23                             ` Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).