diff options
author | Peter Xu <peterx@redhat.com> | 2017-05-19 11:19:45 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2017-05-25 21:25:27 +0300 |
commit | 5a38cb5940f71254e7dcc4bce7ffca8c2102f0ec (patch) | |
tree | 4475988ada19c2474b736990dbf5b4b35f6e33c2 /hw/i386 | |
parent | 127ff5c356e1c2c1328ed2fbb582eb14e412b160 (diff) | |
download | qemu-5a38cb5940f71254e7dcc4bce7ffca8c2102f0ec.zip qemu-5a38cb5940f71254e7dcc4bce7ffca8c2102f0ec.tar.gz qemu-5a38cb5940f71254e7dcc4bce7ffca8c2102f0ec.tar.bz2 |
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/i386')
-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 b477143..3240e5d 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) |