iommu/amd: Ignore page-mode 7 in free_sub_pt()
The page-mode 7 is a special one as it marks a final PTE to a page with an intermediary size. Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
Родитель
409afa44f9
Коммит
69be88520f
|
@ -1372,6 +1372,7 @@ static struct page *free_sub_pt(unsigned long root, int mode,
|
|||
{
|
||||
switch (mode) {
|
||||
case PAGE_MODE_NONE:
|
||||
case PAGE_MODE_7_LEVEL:
|
||||
break;
|
||||
case PAGE_MODE_1_LEVEL:
|
||||
freelist = free_pt_page(root, freelist);
|
||||
|
@ -1403,6 +1404,9 @@ static void free_pagetable(struct protection_domain *domain)
|
|||
unsigned long root = (unsigned long)domain->pt_root;
|
||||
struct page *freelist = NULL;
|
||||
|
||||
BUG_ON(domain->mode < PAGE_MODE_NONE ||
|
||||
domain->mode > PAGE_MODE_6_LEVEL);
|
||||
|
||||
free_sub_pt(root, domain->mode, freelist);
|
||||
|
||||
free_page_list(freelist);
|
||||
|
|
|
@ -269,6 +269,7 @@
|
|||
#define PAGE_MODE_4_LEVEL 0x04
|
||||
#define PAGE_MODE_5_LEVEL 0x05
|
||||
#define PAGE_MODE_6_LEVEL 0x06
|
||||
#define PAGE_MODE_7_LEVEL 0x07
|
||||
|
||||
#define PM_LEVEL_SHIFT(x) (12 + ((x) * 9))
|
||||
#define PM_LEVEL_SIZE(x) (((x) < 6) ? \
|
||||
|
|
Загрузка…
Ссылка в новой задаче