summaryrefslogtreecommitdiff
path: root/hw/i386/intel_iommu_internal.h
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2017-06-09 21:53:28 +0800
committerMichael S. Tsirkin <mst@redhat.com>2017-06-16 18:44:55 +0300
commitb9313021f3115e4052966f1975022e4db2df665b (patch)
treefeee795a9ee0a10bea56dd789978b3df7b1204d3 /hw/i386/intel_iommu_internal.h
parent7feb51b7093145e3ee16b0194099d77e00a18ddb (diff)
downloadqemu-b9313021f3115e4052966f1975022e4db2df665b.tar.gz
intel_iommu: cleanup vtd_{do_}iommu_translate()
First, let vtd_do_iommu_translate() return a status, so that we explicitly knows whether error occured. Meanwhile, we make sure that IOMMUTLBEntry is filled in in that. Then, cleanup vtd_iommu_translate a bit. So even with PT we'll get a log now. Also, remove useless assignments. 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>
Diffstat (limited to 'hw/i386/intel_iommu_internal.h')
-rw-r--r--hw/i386/intel_iommu_internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h
index 0e73a65bf2..f50ecd8b73 100644
--- a/hw/i386/intel_iommu_internal.h
+++ b/hw/i386/intel_iommu_internal.h
@@ -384,6 +384,7 @@ typedef struct VTDIOTLBPageInvInfo VTDIOTLBPageInvInfo;
/* Pagesize of VTD paging structures, including root and context tables */
#define VTD_PAGE_SHIFT 12
#define VTD_PAGE_SIZE (1ULL << VTD_PAGE_SHIFT)
+#define VTD_PAGE_MASK (VTD_PAGE_SIZE - 1)
#define VTD_PAGE_SHIFT_4K 12
#define VTD_PAGE_MASK_4K (~((1ULL << VTD_PAGE_SHIFT_4K) - 1))