]> git.karo-electronics.de Git - karo-tx-linux.git/commit
iommu/vt-d, trivial: refine support of 64bit guest address
authorJiang Liu <jiang.liu@linux.intel.com>
Mon, 6 Jan 2014 06:18:12 +0000 (14:18 +0800)
committerJoerg Roedel <joro@8bytes.org>
Tue, 7 Jan 2014 16:16:41 +0000 (17:16 +0100)
commit5bce1b9711201abd906e3c41e0d4c38e536d016c
tree139148f26998833d8c9ea0e2e38c1053feab4733
parent7b26ed18f3c6e2d98a8ecbe94bfb1eca1438c0ce
iommu/vt-d, trivial: refine support of 64bit guest address

In Intel IOMMU driver, it calculate page table level from adjusted guest
address width as 'level = (agaw - 30) / 9', which assumes (agaw -30)
could be divided by 9. On the other hand, 64bit is a valid agaw and
(64 - 30) can't be divided by 9, so it needs special handling.

This patch enhances Intel IOMMU driver to correctly handle 64bit agaw.
It's mainly for code readability because there's no hardware supporting
64bit agaw yet.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
drivers/iommu/intel-iommu.c