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:
Peter Xu 2017-05-19 11:19:45 +08:00 committed by Michael S. Tsirkin
parent 127ff5c356
commit 5a38cb5940
1 changed files with 1 additions and 1 deletions

View File

@ -1010,7 +1010,7 @@ out:
entry->iova = addr & page_mask;
entry->translated_addr = vtd_get_slpte_addr(slpte) & 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)