/* we only care about RAM */
if (!memory_region_is_ram(section->mr) ||
- memory_region_is_ram_device(section->mr)) {
+ memory_region_is_ram_device(section->mr) ||
+ memory_region_is_nonvolatile(section->mr)) {
return;
}
if (!QTAILQ_EMPTY(&g->list->head)) {
hwaddr predecessor_size;
- predecessor = QTAILQ_LAST(&g->list->head, GuestPhysBlockHead);
+ predecessor = QTAILQ_LAST(&g->list->head);
predecessor_size = predecessor->target_end - predecessor->target_start;
/* the memory API guarantees monotonically increasing traversal */