qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

hw/sh4: Use memory_region_init_rom() with read-only regions

This commit was produced with the Coccinelle script
scripts/coccinelle/memory-region-housekeeping.cocci.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

authored by

Philippe Mathieu-Daudé and committed by
Paolo Bonzini
5ccc751e cc588b2a

+1 -2
+1 -2
hw/sh4/shix.c
··· 53 53 cpu = SUPERH_CPU(cpu_create(machine->cpu_type)); 54 54 55 55 /* Allocate memory space */ 56 - memory_region_init_ram(rom, NULL, "shix.rom", 0x4000, &error_fatal); 57 - memory_region_set_readonly(rom, true); 56 + memory_region_init_rom(rom, NULL, "shix.rom", 0x4000, &error_fatal); 58 57 memory_region_add_subregion(sysmem, 0x00000000, rom); 59 58 memory_region_init_ram(&sdram[0], NULL, "shix.sdram1", 0x01000000, 60 59 &error_fatal);