[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Merge with ia64 tree.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1227698066 0 # Node ID ab0c1bdede53f3f839524c1884236b3765f231cc # Parent b3265ff6c61332dbb43660df43e5b0508b684ec7 # Parent 32aecede46269b640f765e08c17c753568b3d813 Merge with ia64 tree. --- xen/common/timer.c | 10 ++++++---- xen/drivers/char/console.c | 2 +- xen/drivers/passthrough/vtd/dmar.c | 26 ++++++++++++++++++++++---- xen/drivers/passthrough/vtd/dmar.h | 1 + xen/drivers/passthrough/vtd/iommu.c | 20 +++++++++++--------- xen/drivers/passthrough/vtd/iommu.h | 4 ++++ xen/drivers/passthrough/vtd/qinval.c | 23 ++++++++++++----------- 7 files changed, 57 insertions(+), 29 deletions(-) diff -r b3265ff6c613 -r ab0c1bdede53 xen/common/timer.c --- a/xen/common/timer.c Wed Nov 26 10:23:49 2008 +0900 +++ b/xen/common/timer.c Wed Nov 26 11:14:26 2008 +0000 @@ -494,12 +494,14 @@ static void dump_timerq(unsigned char ke for ( j = 1; j <= GET_HEAP_SIZE(ts->heap); j++ ) { t = ts->heap[j]; - printk (" %d : %p ex=0x%08X%08X %p\n", - j, t, (u32)(t->expires>>32), (u32)t->expires, t->data); + printk (" %d : %p ex=0x%08X%08X %p %p\n", + j, t, (u32)(t->expires>>32), (u32)t->expires, + t->data, t->function); } for ( t = ts->list, j = 0; t != NULL; t = t->list_next, j++ ) - printk (" L%d : %p ex=0x%08X%08X %p\n", - j, t, (u32)(t->expires>>32), (u32)t->expires, t->data); + printk (" L%d : %p ex=0x%08X%08X %p %p\n", + j, t, (u32)(t->expires>>32), (u32)t->expires, + t->data, t->function); spin_unlock_irqrestore(&ts->lock, flags); printk("\n"); } diff -r b3265ff6c613 -r ab0c1bdede53 xen/drivers/char/console.c --- a/xen/drivers/char/console.c Wed Nov 26 10:23:49 2008 +0900 +++ b/xen/drivers/char/console.c Wed Nov 26 11:14:26 2008 +0000 @@ -927,7 +927,7 @@ void panic(const char *fmt, ...) console_start_sync(); printk("\n****************************************\n"); printk("Panic on CPU %d:\n", smp_processor_id()); - printk(buf); + printk("%s", buf); printk("****************************************\n\n"); if ( opt_noreboot ) printk("Manual reset required ('noreboot' specified)\n"); diff -r b3265ff6c613 -r ab0c1bdede53 xen/drivers/passthrough/vtd/dmar.c --- a/xen/drivers/passthrough/vtd/dmar.c Wed Nov 26 10:23:49 2008 +0900 +++ b/xen/drivers/passthrough/vtd/dmar.c Wed Nov 26 11:14:26 2008 +0000 @@ -172,6 +172,28 @@ struct acpi_drhd_unit * acpi_find_matche return found ? found : include_all; } +struct acpi_atsr_unit * acpi_find_matched_atsr_unit(u8 bus, u8 devfn) +{ + struct acpi_atsr_unit *atsr; + struct acpi_atsr_unit *found = NULL, *include_all = NULL; + int i; + + list_for_each_entry ( atsr, &acpi_atsr_units, list ) + { + for (i = 0; i < atsr->scope.devices_cnt; i++) + if ( atsr->scope.devices[i] == PCI_BDF2(bus, devfn) ) + return atsr; + + if ( test_bit(bus, atsr->scope.buses) ) + found = atsr; + + if ( atsr->all_ports ) + include_all = atsr; + } + + return found ? found : include_all; +} + /* * Count number of devices in device scope. Do not include PCI sub * hierarchies. @@ -242,7 +264,6 @@ static int __init acpi_parse_dev_scope(v switch ( acpi_scope->dev_type ) { case ACPI_DEV_P2PBRIDGE: - { sec_bus = pci_conf_read8( bus, path->dev, path->fn, PCI_SECONDARY_BUS); sub_bus = pci_conf_read8( @@ -253,7 +274,6 @@ static int __init acpi_parse_dev_scope(v dmar_scope_add_buses(scope, sec_bus, sub_bus); break; - } case ACPI_DEV_MSI_HPET: dprintk(XENLOG_INFO VTDPREFIX, "found MSI HPET: bdf = %x:%x.%x\n", @@ -268,7 +288,6 @@ static int __init acpi_parse_dev_scope(v break; case ACPI_DEV_IOAPIC: - { dprintk(XENLOG_INFO VTDPREFIX, "found IOAPIC: bdf = %x:%x.%x\n", bus, path->dev, path->fn); @@ -288,7 +307,6 @@ static int __init acpi_parse_dev_scope(v scope->devices[didx++] = PCI_BDF(bus, path->dev, path->fn); break; } - } start += acpi_scope->length; } diff -r b3265ff6c613 -r ab0c1bdede53 xen/drivers/passthrough/vtd/dmar.h --- a/xen/drivers/passthrough/vtd/dmar.h Wed Nov 26 10:23:49 2008 +0900 +++ b/xen/drivers/passthrough/vtd/dmar.h Wed Nov 26 11:14:26 2008 +0000 @@ -80,6 +80,7 @@ struct acpi_atsr_unit { idx < rmrr->scope.devices_cnt; idx++) struct acpi_drhd_unit * acpi_find_matched_drhd_unit(u8 bus, u8 devfn); +struct acpi_atsr_unit * acpi_find_matched_atsr_unit(u8 bus, u8 devfn); void dmar_scope_add_buses(struct dmar_scope *scope, u16 sec, u16 sub); void dmar_scope_remove_buses(struct dmar_scope *scope, u16 sec, u16 sub); diff -r b3265ff6c613 -r ab0c1bdede53 xen/drivers/passthrough/vtd/iommu.c --- a/xen/drivers/passthrough/vtd/iommu.c Wed Nov 26 10:23:49 2008 +0900 +++ b/xen/drivers/passthrough/vtd/iommu.c Wed Nov 26 11:14:26 2008 +0000 @@ -714,22 +714,22 @@ static void iommu_fault_status(u32 fault if ( fault_status & DMA_FSTS_PFO ) dprintk(XENLOG_ERR VTDPREFIX, "iommu_fault_status: Fault Overflow\n"); - else if ( fault_status & DMA_FSTS_PPF ) + if ( fault_status & DMA_FSTS_PPF ) dprintk(XENLOG_ERR VTDPREFIX, "iommu_fault_status: Primary Pending Fault\n"); - else if ( fault_status & DMA_FSTS_AFO ) + if ( fault_status & DMA_FSTS_AFO ) dprintk(XENLOG_ERR VTDPREFIX, "iommu_fault_status: Advanced Fault Overflow\n"); - else if ( fault_status & DMA_FSTS_APF ) + if ( fault_status & DMA_FSTS_APF ) dprintk(XENLOG_ERR VTDPREFIX, "iommu_fault_status: Advanced Pending Fault\n"); - else if ( fault_status & DMA_FSTS_IQE ) + if ( fault_status & DMA_FSTS_IQE ) dprintk(XENLOG_ERR VTDPREFIX, "iommu_fault_status: Invalidation Queue Error\n"); - else if ( fault_status & DMA_FSTS_ICE ) + if ( fault_status & DMA_FSTS_ICE ) dprintk(XENLOG_ERR VTDPREFIX, "iommu_fault_status: Invalidation Completion Error\n"); - else if ( fault_status & DMA_FSTS_ITE ) + if ( fault_status & DMA_FSTS_ITE ) dprintk(XENLOG_ERR VTDPREFIX, "iommu_fault_status: Invalidation Time-out Error\n"); } @@ -754,10 +754,11 @@ static void iommu_page_fault(int vector, /* FIXME: ignore advanced fault log */ if ( !(fault_status & DMA_FSTS_PPF) ) - return; + goto clear_overflow; + fault_index = dma_fsts_fault_record_index(fault_status); reg = cap_fault_reg_offset(iommu->cap); - for ( ; ; ) + while (1) { u8 fault_reason; u16 source_id; @@ -797,8 +798,9 @@ static void iommu_page_fault(int vector, if ( fault_index > cap_num_fault_regs(iommu->cap) ) fault_index = 0; } - +clear_overflow: /* clear primary fault overflow */ + fault_status = readl(iommu->reg + DMAR_FSTS_REG); if ( fault_status & DMA_FSTS_PFO ) { spin_lock_irqsave(&iommu->register_lock, flags); diff -r b3265ff6c613 -r ab0c1bdede53 xen/drivers/passthrough/vtd/iommu.h --- a/xen/drivers/passthrough/vtd/iommu.h Wed Nov 26 10:23:49 2008 +0900 +++ b/xen/drivers/passthrough/vtd/iommu.h Wed Nov 26 11:14:26 2008 +0000 @@ -310,6 +310,10 @@ struct qinval_entry { struct qinval_entry { union { struct { + u64 lo; + u64 hi; + }val; + struct { struct { u64 type : 4, granu : 2, diff -r b3265ff6c613 -r ab0c1bdede53 xen/drivers/passthrough/vtd/qinval.c --- a/xen/drivers/passthrough/vtd/qinval.c Wed Nov 26 10:23:49 2008 +0900 +++ b/xen/drivers/passthrough/vtd/qinval.c Wed Nov 26 11:14:26 2008 +0000 @@ -34,13 +34,13 @@ static void print_qi_regs(struct iommu * u64 val; val = dmar_readq(iommu->reg, DMAR_IQA_REG); - printk("DMAR_IAQ_REG = %"PRIx64"\n", val); + printk("DMAR_IQA_REG = %"PRIx64"\n", val); val = dmar_readq(iommu->reg, DMAR_IQH_REG); - printk("DMAR_IAH_REG = %"PRIx64"\n", val); + printk("DMAR_IQH_REG = %"PRIx64"\n", val); val = dmar_readq(iommu->reg, DMAR_IQT_REG); - printk("DMAR_IAT_REG = %"PRIx64"\n", val); + printk("DMAR_IQT_REG = %"PRIx64"\n", val); } static int qinval_next_index(struct iommu *iommu) @@ -252,14 +252,15 @@ static int gen_dev_iotlb_inv_dsc(struct qinval_entry->q.dev_iotlb_inv_dsc.lo.res_3 = 0; qinval_entry->q.dev_iotlb_inv_dsc.hi.size = size; - qinval_entry->q.dev_iotlb_inv_dsc.hi.addr = addr; - - unmap_vtd_domain_page(qinval_entries); - spin_unlock_irqrestore(&qi_ctrl->qinval_lock, flags); - return 0; -} - -int queue_invalidate_device_iotlb(struct iommu *iommu, + qinval_entry->q.dev_iotlb_inv_dsc.hi.res_1 = 0; + qinval_entry->q.dev_iotlb_inv_dsc.hi.addr = addr >> PAGE_SHIFT_4K; + + unmap_vtd_domain_page(qinval_entries); + spin_unlock_irqrestore(&qi_ctrl->qinval_lock, flags); + return 0; +} + +int qinval_device_iotlb(struct iommu *iommu, u32 max_invs_pend, u16 sid, u16 size, u64 addr) { int ret = -1; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |