diff options
author | Peter Xu | 2017-05-19 05:19:45 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2017-05-25 20:25:27 +0200 |
commit | 5a38cb5940f71254e7dcc4bce7ffca8c2102f0ec (patch) | |
tree | 4475988ada19c2474b736990dbf5b4b35f6e33c2 /hw | |
parent | intel_iommu: provide vtd_ce_get_type() (diff) | |
download | qemu-5a38cb5940f71254e7dcc4bce7ffca8c2102f0ec.tar.gz qemu-5a38cb5940f71254e7dcc4bce7ffca8c2102f0ec.tar.xz qemu-5a38cb5940f71254e7dcc4bce7ffca8c2102f0ec.zip |
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/i386/intel_iommu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index b4771430e0..3240e5de37 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -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) |