amd-iommu: use correct constants in amd_iommu_get_next_table_from_pte()
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 26 Sep 2018 13:44:07 +0000 (14:44 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 15 Oct 2018 13:34:53 +0000 (14:34 +0100)
commitd74d2f53c1aa78ebe27f088f63a2020807d75164
tree613911b75bff3f13ce3a44e6f6c46bfba2968b40
parentfbc2bbdca38021109590d436c3e5099ff1a5b50d
amd-iommu: use correct constants in amd_iommu_get_next_table_from_pte()

...and change the name to amd_iommu_get_address_from_pte() since the
address read is not necessarily the address of a next level page table.
(If the 'next level' field is not 1 - 6 then the address is a page
address).

The constants in use prior to this patch relate to device table entries
rather than page table entries. Although they do have the same value, it
makes the code confusing to read.

This patch also changes the PDE/PTE pointer argument to void *, and
removes any u32/uint32_t casts in the call sites. Unnecessary casts
surrounding call sites are also removed.

No functional change.

NOTE: The patch also adds emacs boilerplate to iommu_map.c

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewd-by: Brian Woods <brian.woods@amd.com>
xen/drivers/passthrough/amd/iommu_map.c
xen/drivers/passthrough/amd/pci_amd_iommu.c
xen/include/asm-x86/hvm/svm/amd-iommu-proto.h