mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
spapr_iommu: pass device to spapr_tce_new_table and use it to set owner
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
5cb022a1bf
commit
84af6d9f97
4 changed files with 7 additions and 5 deletions
|
@ -116,7 +116,7 @@ static MemoryRegionIOMMUOps spapr_iommu_ops = {
|
|||
.translate = spapr_tce_translate_iommu,
|
||||
};
|
||||
|
||||
sPAPRTCETable *spapr_tce_new_table(uint32_t liobn, size_t window_size)
|
||||
sPAPRTCETable *spapr_tce_new_table(DeviceState *owner, uint32_t liobn, size_t window_size)
|
||||
{
|
||||
sPAPRTCETable *tcet;
|
||||
|
||||
|
@ -151,7 +151,7 @@ sPAPRTCETable *spapr_tce_new_table(uint32_t liobn, size_t window_size)
|
|||
"table @ %p, fd=%d\n", tcet, liobn, tcet->table, tcet->fd);
|
||||
#endif
|
||||
|
||||
memory_region_init_iommu(&tcet->iommu, NULL, &spapr_iommu_ops,
|
||||
memory_region_init_iommu(&tcet->iommu, OBJECT(owner), &spapr_iommu_ops,
|
||||
"iommu-spapr", UINT64_MAX);
|
||||
|
||||
QLIST_INSERT_HEAD(&spapr_tce_tables, tcet, list);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue