mirror of https://github.com/xqemu/xqemu.git
intel_iommu: use IOMMU_ACCESS_FLAG()
We have that now, so why not use it. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
127ff5c356
commit
5a38cb5940
|
@ -1010,7 +1010,7 @@ out:
|
||||||
entry->iova = addr & page_mask;
|
entry->iova = addr & page_mask;
|
||||||
entry->translated_addr = vtd_get_slpte_addr(slpte) & page_mask;
|
entry->translated_addr = vtd_get_slpte_addr(slpte) & page_mask;
|
||||||
entry->addr_mask = ~page_mask;
|
entry->addr_mask = ~page_mask;
|
||||||
entry->perm = (writes ? 2 : 0) + (reads ? 1 : 0);
|
entry->perm = IOMMU_ACCESS_FLAG(reads, writes);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vtd_root_table_setup(IntelIOMMUState *s)
|
static void vtd_root_table_setup(IntelIOMMUState *s)
|
||||||
|
|
Loading…
Reference in New Issue