Lines Matching refs:mr

245     return (!memory_region_is_ram(section->mr) &&  in vfio_listener_skipped_section()
246 !memory_region_is_iommu(section->mr)) || in vfio_listener_skipped_section()
247 memory_region_is_protected(section->mr) || in vfio_listener_skipped_section()
387 vaddr = memory_region_get_ram_ptr(section->mr) + start; in vfio_ram_discard_notify_populate()
403 RamDiscardManager *rdm = memory_region_get_ram_discard_manager(section->mr); in vfio_register_ram_discard_listener()
414 vrdl->mr = section->mr; in vfio_register_ram_discard_listener()
418 section->mr); in vfio_register_ram_discard_listener()
477 RamDiscardManager *rdm = memory_region_get_ram_discard_manager(section->mr); in vfio_unregister_ram_discard_listener()
481 if (vrdl->mr == section->mr && in vfio_unregister_ram_discard_listener()
499 MemoryRegion *mr = section->mr; in vfio_known_safe_misalignment() local
501 if (!TPM_IS_CRB(mr->owner)) { in vfio_known_safe_misalignment()
506 trace_vfio_known_safe_misalignment(memory_region_name(mr), in vfio_known_safe_misalignment()
531 __func__, memory_region_name(section->mr), in vfio_listener_valid_section()
584 if (memory_region_is_ram_device(section->mr)) { in vfio_listener_region_add()
586 memory_region_name(section->mr), in vfio_listener_region_add()
598 memory_region_ref(section->mr); in vfio_listener_region_add()
600 if (memory_region_is_iommu(section->mr)) { in vfio_listener_region_add()
602 IOMMUMemoryRegion *iommu_mr = IOMMU_MEMORY_REGION(section->mr); in vfio_listener_region_add()
605 trace_vfio_listener_region_add_iommu(section->mr->name, iova, end); in vfio_listener_region_add()
628 ret = memory_region_register_iommu_notifier(section->mr, &giommu->n, in vfio_listener_region_add()
647 if (memory_region_has_ram_discard_manager(section->mr)) { in vfio_listener_region_add()
652 vaddr = memory_region_get_ram_ptr(section->mr) + in vfio_listener_region_add()
660 if (memory_region_is_ram_device(section->mr)) { in vfio_listener_region_add()
665 memory_region_name(section->mr), in vfio_listener_region_add()
680 if (memory_region_is_ram_device(section->mr)) { in vfio_listener_region_add()
691 if (memory_region_is_ram_device(section->mr)) { in vfio_listener_region_add()
704 memory_region_name(section->mr)); in vfio_listener_region_add()
728 if (memory_region_is_iommu(section->mr)) { in vfio_listener_region_del()
731 trace_vfio_listener_region_del_iommu(section->mr->name); in vfio_listener_region_del()
733 if (MEMORY_REGION(giommu->iommu_mr) == section->mr && in vfio_listener_region_del()
735 memory_region_unregister_iommu_notifier(section->mr, in vfio_listener_region_del()
761 if (memory_region_is_ram_device(section->mr)) { in vfio_listener_region_del()
766 } else if (memory_region_has_ram_discard_manager(section->mr)) { in vfio_listener_region_del()
796 memory_region_unref(section->mr); in vfio_listener_region_del()
823 owner = memory_region_owner(section->mr); in vfio_section_is_vfio_pci()
1255 const ram_addr_t ram_addr = memory_region_get_ram_addr(section->mr) + in vfio_ram_discard_get_dirty_bitmap()
1277 RamDiscardManager *rdm = memory_region_get_ram_discard_manager(section->mr); in vfio_sync_ram_discard_listener_dirty_bitmap()
1281 if (vrdl->mr == section->mr && in vfio_sync_ram_discard_listener_dirty_bitmap()
1311 if (MEMORY_REGION(giommu->iommu_mr) == section->mr && in vfio_sync_iommu_dirty_bitmap()
1343 if (memory_region_is_iommu(section->mr)) { in vfio_sync_dirty_bitmap()
1345 } else if (memory_region_has_ram_discard_manager(section->mr)) { in vfio_sync_dirty_bitmap()
1356 ram_addr = memory_region_get_ram_addr(section->mr) + in vfio_sync_dirty_bitmap()