[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 16/17] VT-d: show permissions during page table walks
Besides the addresses this is the next crucial bit of information one might be after. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -2822,10 +2822,12 @@ static void vtd_dump_page_table_level(pa vtd_dump_page_table_level(dma_pte_addr(*pte), next_level, address, indent + 1); else - printk("%*sdfn: %08lx mfn: %08lx\n", + printk("%*sdfn: %08lx mfn: %08lx %c%c\n", indent, "", (unsigned long)(address >> PAGE_SHIFT_4K), - (unsigned long)(dma_pte_addr(*pte) >> PAGE_SHIFT_4K)); + (unsigned long)(dma_pte_addr(*pte) >> PAGE_SHIFT_4K), + dma_pte_read(*pte) ? 'r' : '-', + dma_pte_write(*pte) ? 'w' : '-'); } unmap_vtd_domain_page(pt_vaddr); --- a/xen/drivers/passthrough/vtd/utils.c +++ b/xen/drivers/passthrough/vtd/utils.c @@ -159,14 +159,11 @@ void print_vtd_entries(struct vtd_iommu l_index = get_level_index(gmfn, level); pte.val = l[l_index]; unmap_vtd_domain_page(l); - printk(" l%u[%03x] = %"PRIx64"\n", level, l_index, pte.val); + printk(" l%u[%03x] = %"PRIx64" %c%c\n", level, l_index, pte.val, + dma_pte_read(pte) ? 'r' : '-', + dma_pte_write(pte) ? 'w' : '-'); - if ( !dma_pte_present(pte) ) - { - printk(" l%u[%03x] not present\n", level, l_index); - break; - } - if ( dma_pte_superpage(pte) ) + if ( !dma_pte_present(pte) || dma_pte_superpage(pte) ) break; val = dma_pte_addr(pte); } while ( --level );
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |