]> rtime.felk.cvut.cz Git - jailhouse.git/commit
x86: Unify AMD page tables for CPU and IOMMU
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 1 Mar 2016 22:31:31 +0000 (23:31 +0100)
committerJan Kiszka <jan.kiszka@siemens.com>
Wed, 16 Mar 2016 08:23:53 +0000 (09:23 +0100)
commit9ec2510ed3b723cda2043b700d7c3ddd7dfd88d6
treebc78222f9d64bfcc7f3cf5ffc6e2e7db7c353c9a
parenta3ebc341186e03e70ee1362f1a2163a3ce33eb9d
x86: Unify AMD page tables for CPU and IOMMU

This exploits AMD's architecture feature that you can reuse the nested
page tables also for the IOMMU.

Both tables have the same depth (4), share the same address fields, the
valid bit - but all other bits are separate. Therefore, we need to
enhance the NPT paging handlers so that they fold both bit sets into an
entry.

The rewards are saving of several lines of code as well as a bunch of
hypervisor pages (typically some dozen).

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/x86/amd_iommu.c
hypervisor/arch/x86/include/asm/amd_iommu.h
hypervisor/arch/x86/include/asm/cell.h
hypervisor/arch/x86/include/asm/svm.h
hypervisor/arch/x86/svm.c