diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-09-02 15:38:40 +0200 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-09-03 16:03:46 +0200 |
commit | 50020fb6324465e478d6c8cdbf3c695f0a60358d (patch) | |
tree | 42f46535b247d54bb2282fa1a61b1cba4d8a6ac0 /arch/x86/include/asm/amd_iommu_types.h | |
parent | 04bfdd8406099fca2e6b8844748c4d6c5eba8c8d (diff) | |
download | linux-3.10-50020fb6324465e478d6c8cdbf3c695f0a60358d.tar.gz linux-3.10-50020fb6324465e478d6c8cdbf3c695f0a60358d.tar.bz2 linux-3.10-50020fb6324465e478d6c8cdbf3c695f0a60358d.zip |
x86/amd-iommu: Introduce increase_address_space function
This function will be used to increase the address space
size of a protection domain.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/include/asm/amd_iommu_types.h')
-rw-r--r-- | arch/x86/include/asm/amd_iommu_types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/include/asm/amd_iommu_types.h b/arch/x86/include/asm/amd_iommu_types.h index 97f3d09d3be..1b4b3d6c9f0 100644 --- a/arch/x86/include/asm/amd_iommu_types.h +++ b/arch/x86/include/asm/amd_iommu_types.h @@ -160,6 +160,10 @@ ((1ULL << PM_LEVEL_SHIFT((x))) - 1): \ (0xffffffffffffffffULL)) #define PM_LEVEL_INDEX(x, a) (((a) >> PM_LEVEL_SHIFT((x))) & 0x1ffULL) +#define PM_LEVEL_ENC(x) (((x) << 9) & 0xe00ULL) +#define PM_LEVEL_PDE(x, a) ((a) | PM_LEVEL_ENC((x)) | \ + IOMMU_PTE_P | IOMMU_PTE_IR | IOMMU_PTE_IW) + #define IOMMU_PTE_L2_INDEX(address) (((address) >> 30) & 0x1ffULL) #define IOMMU_PTE_L1_INDEX(address) (((address) >> 21) & 0x1ffULL) |