int rc;
unsigned long pt_mfn[7];
- if ( iommu_use_hap_pt(d) )
- return 0;
-
memset(pt_mfn, 0, sizeof(pt_mfn));
spin_lock(&hd->arch.mapping_lock);
unsigned long pt_mfn[7];
struct domain_iommu *hd = dom_iommu(d);
- if ( iommu_use_hap_pt(d) )
- return 0;
-
memset(pt_mfn, 0, sizeof(pt_mfn));
spin_lock(&hd->arch.mapping_lock);
return rt;
}
-/* Share p2m table with iommu. */
-void amd_iommu_share_p2m(struct domain *d)
-{
- struct domain_iommu *hd = dom_iommu(d);
- struct page_info *p2m_table;
- mfn_t pgd_mfn;
-
- pgd_mfn = pagetable_get_mfn(p2m_get_pagetable(p2m_get_hostp2m(d)));
- p2m_table = mfn_to_page(pgd_mfn);
-
- if ( hd->arch.root_table != p2m_table )
- {
- free_amd_iommu_pgtable(hd->arch.root_table);
- hd->arch.root_table = p2m_table;
-
- /* When sharing p2m with iommu, paging mode = 4 */
- hd->arch.paging_mode = 4;
- AMD_IOMMU_DEBUG("Share p2m table with iommu: p2m table = %#lx\n",
- mfn_x(pgd_mfn));
- }
-}
-
/*
* Local variables:
* mode: C
{
struct domain_iommu *hd = dom_iommu(d);
- if ( iommu_use_hap_pt(d) )
- return;
-
spin_lock(&hd->arch.mapping_lock);
if ( hd->arch.root_table )
{
.setup_hpet_msi = amd_setup_hpet_msi,
.suspend = amd_iommu_suspend,
.resume = amd_iommu_resume,
- .share_p2m = amd_iommu_share_p2m,
.crash_shutdown = amd_iommu_crash_shutdown,
.dump_p2m_table = amd_dump_p2m_table,
};
unsigned int flush_flags);
int __must_check amd_iommu_flush_iotlb_all(struct domain *d);
-/* Share p2m table with iommu */
-void amd_iommu_share_p2m(struct domain *d);
-
/* device table functions */
int get_dma_requestor_id(uint16_t seg, uint16_t bdf);
void amd_iommu_set_intremap_table(struct amd_iommu_dte *dte,