On 9/2/19 3:26 AM, Tony Nguyen wrote: > Existing read rejecting validator was mistakenly cleared. > > Reads dispatched to io_mem_notdirty then segfaults as there is no read > handler. > > Signed-off-by: Tony Nguyen <tony.ngu...@bt.com> > --- > exec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/exec.c b/exec.c > index 1df966d17a..05d664541f 100644 > --- a/exec.c > +++ b/exec.c > @@ -2796,12 +2796,12 @@ static bool notdirty_mem_accepts(void *opaque, hwaddr > addr, > > static const MemoryRegionOps notdirty_mem_ops = { > .write = notdirty_mem_write, > - .valid.accepts = notdirty_mem_accepts, > .endianness = DEVICE_NATIVE_ENDIAN, > .valid = { > .min_access_size = 1, > .max_access_size = 8, > .unaligned = false, > + .accepts = notdirty_mem_accepts,
I'm surprised the compiler doesn't emit any warning... > }, > .impl = { > .min_access_size = 1, > mcayland provided a verbose backtrace running Solaris, can we amend it to this commit? Thread 4 "qemu-system-spa" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff1d44700 (LWP 23749)] 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in () #1 0x00005555557eae4c in memory_region_read_with_attrs_accessor (mr=0x55555633d360 <io_mem_notdirty>, addr=531677168, value=0x7ffff1d42eb8, size=4, shift=0, mask=4294967295, attrs=...) at /home/build/src/qemu/git/qemu/memory.c:461 #2 0x00005555557eb1c4 in access_with_adjusted_size (addr=531677168, value=0x7ffff1d42eb8, size=4, access_size_min=1, access_size_max=8, access_fn= 0x5555557eadf0 <memory_region_read_with_attrs_accessor>, mr=0x55555633d360 <io_mem_notdirty>, attrs=...) at /home/build/src/qemu/git/qemu/memory.c:559 #3 0x00005555557edeb0 in memory_region_dispatch_read1 (mr=0x55555633d360 <io_mem_notdirty>, addr=531677168, pval=0x7ffff1d42eb8, size=4, attrs=...) at /home/build/src/qemu/git/qemu/memory.c:1429 #4 0x00005555557edf47 in memory_region_dispatch_read (mr=0x55555633d360 <io_mem_notdirty>, addr=531677168, pval=0x7ffff1d42eb8, op=MO_32, attrs=...) at /home/build/src/qemu/git/qemu/memory.c:1451 #5 0x0000555555803846 in io_readx (env=0x5555564b15c0, iotlbentry=0x7fffe831e190, mmu_idx=2, addr=1880588272, retaddr=140736889685638, access_type=MMU_DATA_LOAD, op=MO_32) at /home/build/src/qemu/git/qemu/accel/tcg/cputlb.c:923 #6 0x00005555558063ca in load_helper (full_load=0x555555805ffb <full_be_ldul_mmu>, code_read=false, op=MO_BEUL, retaddr=140736889685638, oi=162, addr=1880588272, env=0x5555564b15c0) at /home/build/src/qemu/git/qemu/accel/tcg/cputlb.c:1346 #7 0x00005555558063ca in full_be_ldul_mmu (env=0x5555564b15c0, addr=1880588272, oi=162, retaddr=140736889685638) at /home/build/src/qemu/git/qemu/accel/tcg/cputlb.c:1469 #8 0x0000555555806665 in helper_be_ldul_mmu (env=0x5555564b15c0, addr=1880588272, oi=162, retaddr=140736889685638) at /home/build/src/qemu/git/qemu/accel/tcg/cputlb.c:1476 #9 0x00007fffdc5106cd in code_gen_buffer () #10 0x00005555558280da in cpu_tb_exec (cpu=0x5555564a8820, itb=0x7fffdc50f7c0 <code_gen_buffer+5306259>) at /home/build/src/qemu/git/qemu/accel/tcg/cpu-exec.c:172 #11 0x0000555555828ec7 in cpu_loop_exec_tb (cpu=0x5555564a8820, tb=0x7fffdc50f7c0 <code_gen_buffer+5306259>, last_tb=0x7ffff1d43598, tb_exit=0x7ffff1d43590) at /home/build/src/qemu/git/qemu/accel/tcg/cpu-exec.c:620 #12 0x00005555558291d5 in cpu_exec (cpu=0x5555564a8820) at /home/build/src/qemu/git/qemu/accel/tcg/cpu-exec.c:731 #13 0x00005555557dc460 in tcg_cpu_exec (cpu=0x5555564a8820) at /home/build/src/qemu/git/qemu/cpus.c:1445 #14 0x00005555557dc76b in qemu_tcg_rr_cpu_thread_fn (arg=0x5555564a8820) at /home/build/src/qemu/git/qemu/cpus.c:1547 #15 0x0000555555c562d4 in qemu_thread_start (args=0x5555564c8020) at /home/build/src/qemu/git/qemu/util/qemu-thread-posix.c:502 #16 0x00007ffff6296fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486 #17 0x00007ffff61c74cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 (gdb) Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com>