diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index b124d97d7c013e1a2fa01d8e26b8e5f91cdce0a4..febe519bbdfc97af6ee8d1204b25d1ddee4d790d 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -612,7 +612,8 @@ static void vhost_set_memory(MemoryListener *listener, static bool vhost_section(MemoryRegionSection *section) { - return memory_region_is_ram(section->mr); + return memory_region_is_ram(section->mr) && + !memory_region_is_rom(section->mr); } static void vhost_begin(MemoryListener *listener)