VT-d support for PV guests (V2)
PATCH 2/5 VT-d support for PV guests (V2)
Improve page table debug output
Ignore 'current' domain when dumping VT-d page tables. Also add page type summary for domain pages output.
Signed-off-by Espen Skoglund <[email protected]>
xen/arch/x86/domain.c +7 -0
@@ -127,12 +127,15 @@void dump_pageframe_info (struct domain *d) {struct page_info *page; +int cnt[8 ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 };printk ("Memory pages belonging to domain %u:\n" , d->domain_id);if ( d->tot_pages >=10 ) {printk (" DomPage list too long to display\n" ); +list_for_each_entry ( page, &d->page_list, list ) + cnt[(page->u.inuse.type_info >> 29) & 0x7]++; }else {
@@ -141,8 +144,12 @@printk (" DomPage %p: caf=%08x, taf=%" PRtype_info"\n" ,_p (page_to_mfn (page)), page->count_info, page->u.inuse.type_info); + cnt[(page->u.inuse.type_info >>29 ) &0x7 ]++; } } +printk (" TypeCnt " +"{ none %d, L1 %d, L2 %d, L3 %d, L4 %d, seg %d, rw %d }\n" , + cnt[0 ], cnt[1 ], cnt[2 ], cnt[3 ], cnt[4 ], cnt[5 ], cnt[7 ]); list_for_each_entry ( page, &d->xenpage_list, list ) {
xen/drivers/passthrough/vtd/extern.h +1 -2
@@ -27,8 +27,7 @@extern struct ir_ctrl *ir_ctrl;void print_iommu_regs (struct acpi_drhd_unit *drhd); -void print_vtd_entries (struct domain *d,struct iommu *iommu, -int bus,int devfn,unsigned long gmfn); +void print_vtd_entries (struct iommu *iommu,int bus,int devfn,u64 gmfn);void pdev_flr (u8 bus,u8 devfn);int qinval_setup (struct iommu *iommu);
xen/drivers/passthrough/vtd/iommu.c +6 -4
@@ -777,16 +777,17 @@static struct iommu *vector_to_iommu[NR_VECTORS ];static int iommu_page_fault_do_one (struct iommu *iommu,int type, -u8 fault_reason,u16 source_id,u32 addr) +u8 fault_reason,u16 source_id,u64 addr) { dprintk(XENLOG_WARNING VTDPREFIX, -"iommu_fault:%s: %x:%x.%x addr %x REASON %x iommu->reg = %p\n" , +"iommu_fault:%s: %x:%x.%x addr %" PRIx64" REASON %x " +"iommu->reg = %p\n" , (type ?"DMA Read" :"DMA Write" ), (source_id >>8 ),PCI_SLOT (source_id &0xFF ),PCI_FUNC (source_id &0xFF ), addr, fault_reason, iommu->reg);if ( fault_reason <0x20 ) -print_vtd_entries (current->domain, iommu, (source_id >>8 ), +print_vtd_entries (iommu, (source_id >>8 ), (source_id &0xff ), (addr >>PAGE_SHIFT ));return 0 ;
@@ -844,7 +845,8 @@ {u8 fault_reason;u16 source_id; -u32 guest_addr, data; +u32 data; +u64 guest_addr;int type;/* highest 32 bits */
xen/drivers/passthrough/vtd/utils.c +67 -79
176 lines not on this page · raw message
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel