log level DPRINTK x86
PATCH v2 4/6 log level DPRINTK x86
This updates the x86 arch code to change the DPRINTKS to use the log levels.
Signed-off-by Steven Rostedt <[email protected]>
xen/arch/x86/domain.c +2 -1
@@ -564,7 +564,8 @@ static void load_segments(struct vcpu *n put_user(regs->r11, rsp-10) | put_user(regs->rcx, rsp-11) ) { -DPRINTK ("Error while creating failsafe callback frame.\n" ); +DPRINTK (XENLOG_G_ERR "Error while creating failsafe " +"callback frame.\n" );domain_crash (n->domain); }
xen/arch/x86/extable.c +1 -1
@@ -74,7 +74,7 @@ search_pre_exception_table(struct cpu_usunsigned long addr = (unsigned long )regs->eip;unsigned long fixup =search_one_table ( __start___pre_ex_table, __stop___pre_ex_table-1 , addr); -DPRINTK ("Pre-exception: %p -> %p\n" ,_p (addr),_p (fixup)); +DPRINTK (XENLOG_INFO "Pre-exception: %p -> %p\n" ,_p (addr),_p (fixup));#ifdef PERF_COUNTERS if ( fixup )perfc_incrc (exception_fixed);
xen/arch/x86/hvm/hvm.c +16 -11
@@ -194,7 +194,8 @@ void hvm_create_event_channels(struct vc p =get_vio (v->domain, o->vcpu_id); o->arch.hvm_vcpu.xen_port = p->vp_eport =alloc_unbound_xen_event_channel (o,0 ); -DPRINTK ("Allocated port %d for hvm.\n" , o->arch.hvm_vcpu.xen_port); +DPRINTK (XENLOG_INFO "Allocated port %d for hvm.\n" , + o->arch.hvm_vcpu.xen_port); } } }
@@ -352,7 +353,8 @@ static void hvm_vcpu_down(void)struct domain *d = v->domain;int online_count =0 ; -DPRINTK ("DOM%d/VCPU%d: going offline.\n" , d->domain_id, v->vcpu_id); +DPRINTK (XENLOG_G_INFO "DOM%d/VCPU%d: going offline.\n" , + d->domain_id, v->vcpu_id);/* Doesn't halt us immediately, but we'll never return to guest context. */ set_bit (_VCPUF_down, &v->vcpu_flags);
@@ -368,7 +370,8 @@ static void hvm_vcpu_down(void)/* ... Shut down the domain if not. */ if ( online_count ==0 ) { -DPRINTK ("DOM%d: all CPUs offline -- powering off.\n" , d->domain_id); +DPRINTK (XENLOG_G_INFO "DOM%d: all CPUs offline -- powering off.\n" , + d->domain_id);domain_shutdown (d, SHUTDOWN_poweroff); } }
@@ -508,7 +511,7 @@ void hvm_do_hypercall(struct cpu_user_reif ( (pregs->eax >= NR_hypercalls) || !hvm_hypercall_table[pregs->eax] ) { -DPRINTK ("HVM vcpu %d:%d did a bad hypercall %d.\n" , +DPRINTK (XENLOG_G_INFO "HVM vcpu %d:%d did a bad hypercall %d.\n" , current->domain->domain_id, current->vcpu_id, pregs->eax); pregs->eax = -ENOSYS ;
@@ -554,7 +557,7 @@ static long do_memory_op_compat32(int cm }default : -DPRINTK ("memory_op %d.\n" , cmd); +DPRINTK (XENLOG_G_INFO "memory_op %d.\n" , cmd); rc = -ENOSYS ;break ; }
@@ -587,7 +590,7 @@ void hvm_do_hypercall(struct cpu_user_re pregs->rax = (uint32_t )pregs->eax;/* mask in case compat32 caller */ if ( (pregs->rax >= NR_hypercalls) || !hvm_hypercall64_table[pregs->rax] ) { -DPRINTK ("HVM vcpu %d:%d did a bad hypercall %ld.\n" , +DPRINTK (XENLOG_G_INFO "HVM vcpu %d:%d did a bad hypercall %ld.\n" , current->domain->domain_id, current->vcpu_id, pregs->rax); pregs->rax = -ENOSYS ;
@@ -638,7 +641,7 @@ int hvm_bringup_ap(int vcpuid, int trampif ( bsp->vcpu_id !=0 ) { -DPRINTK ("Not calling hvm_bringup_ap from BSP context.\n" ); +DPRINTK (XENLOG_G_ERR "Not calling hvm_bringup_ap from BSP context.\n" );domain_crash_synchronous (); }
@@ -647,7 +650,8 @@ int hvm_bringup_ap(int vcpuid, int tramp if ( (ctxt = xmalloc(struct vcpu_guest_context)) == NULL ) { -DPRINTK ("Failed to allocate memory in hvm_bringup_ap.\n" ); +DPRINTK (XENLOG_G_INFO +"Failed to allocate memory in hvm_bringup_ap.\n" );return -ENOMEM ; }
@@ -661,13 +665,14 @@ int hvm_bringup_ap(int vcpuid, int trampif ( rc !=0 ) { -DPRINTK ("AP %d bringup failed in boot_vcpu %x.\n" , vcpuid, rc); +DPRINTK (XENLOG_G_INFO +"AP %d bringup failed in boot_vcpu %x.\n" , vcpuid, rc); goto out; }if (test_and_clear_bit (_VCPUF_down, &d->vcpu[vcpuid]->vcpu_flags) )vcpu_wake (d->vcpu[vcpuid]); -DPRINTK ("AP %d bringup suceeded.\n" , vcpuid); +DPRINTK (XENLOG_G_INFO "AP %d bringup suceeded.\n" , vcpuid); out:xfree (ctxt);
@@ -726,7 +731,7 @@ long do_hvm_op(unsigned long op, XEN_GUEdefault : { -DPRINTK ("Bad HVM op %ld.\n" , op); +DPRINTK (XENLOG_G_INFO "Bad HVM op %ld.\n" , op); rc = -ENOSYS ;break ; }
xen/arch/x86/hvm/instrlen.c +3 -2
@@ -317,7 +317,7 @@ done_prefixes:if ( modrm_mod ==3 ) { -DPRINTK ("Cannot parse ModRM.mod == 3.\n" ); +DPRINTK (XENLOG_G_WARNING "Cannot parse ModRM.mod == 3.\n" ); goto cannot_emulate; }
@@ -444,7 +444,8 @@ done:return length; cannot_emulate: -DPRINTK ("Cannot emulate %02x at address %lx (eip %lx, mode %d)\n" , +DPRINTK (XENLOG_G_WARNING +"Cannot emulate %02x at address %lx (eip %lx, mode %d)\n" , b, (unsigned long )_regs.eip, (unsigned long )regs->eip, mode);return -1 ; }
xen/arch/x86/hvm/svm/svm.c +1 -1
@@ -804,7 +804,7 @@ static void svm_final_setup_guest(structif ( !shadow_mode_external (d) ) { -DPRINTK ("Can't init HVM for dom %u vcpu %u: " +DPRINTK (XENLOG_G_ERR "Can't init HVM for dom %u vcpu %u: " "not in shadow external mode\n" , d->domain_id, v->vcpu_id);domain_crash (d); }
xen/arch/x86/hvm/vmx/vmcs.c +1 -1
@@ -145,7 +145,7 @@ static struct vmcs_struct *vmx_alloc_vmcif ( (vmcs =alloc_xenheap_page ()) ==NULL ) { -DPRINTK ("Failed to allocate VMCS.\n" ); +DPRINTK (XENLOG_G_WARNING "Failed to allocate VMCS.\n" );return NULL ; }
xen/arch/x86/hvm/vmx/vmx.c +9 -6
@@ -71,7 +71,7 @@ static int vmx_initialize_guest_resourceif ( !shadow_mode_external (d) ) { -DPRINTK ("Can't init HVM for dom %u vcpu %u: " +DPRINTK (XENLOG_ERR "Can't init HVM for dom %u vcpu %u: " "not in shadow external mode\n" , d->domain_id, v->vcpu_id);domain_crash (d);
@@ -83,7 +83,8 @@ static int vmx_initialize_guest_resourceif ( (rc =vmx_create_vmcs (vc)) !=0 ) { -DPRINTK ("Failed to create VMCS for vcpu %d: err=%d.\n" , +DPRINTK (XENLOG_WARNING +"Failed to create VMCS for vcpu %d: err=%d.\n" , vc->vcpu_id, rc);return 0 ; }
@@ -92,14 +93,16 @@ static int vmx_initialize_guest_resourceif ( (io_bitmap_a =alloc_xenheap_pages (IO_BITMAP_ORDER )) ==NULL ) { -DPRINTK ("Failed to allocate io bitmap b for vcpu %d.\n" , +DPRINTK (XENLOG_WARNING +"Failed to allocate io bitmap b for vcpu %d.\n" , vc->vcpu_id);return 0 ; }if ( (io_bitmap_b =alloc_xenheap_pages (IO_BITMAP_ORDER )) ==NULL ) { -DPRINTK ("Failed to allocate io bitmap b for vcpu %d.\n" , +DPRINTK (XENLOG_WARNING +"Failed to allocate io bitmap b for vcpu %d.\n" , vc->vcpu_id);return 0 ; }
@@ -936,7 +939,7 @@ static void vmx_do_cpuid(struct cpu_userunsigned long mfn =get_mfn_from_gpfn (value >>PAGE_SHIFT );char *p; -DPRINTK ("Input address is 0x%" PRIx64".\n" , value); +DPRINTK (XENLOG_G_INFO "Input address is 0x%" PRIx64".\n" , value);/* 8-byte aligned valid pseudophys address from vmxassist, please. */ if ( (value & 7) || (mfn == INVALID_MFN) ||
@@ -947,7 +950,7 @@ static void vmx_do_cpuid(struct cpu_user value = *((uint64_t *)(p + (value & (PAGE_SIZE -1 ))));unmap_domain_page (p); -DPRINTK ("Output value is 0x%" PRIx64".\n" , value); +DPRINTK (XENLOG_G_INFO "Output value is 0x%" PRIx64".\n" , value); ecx = (u32)(value >>0 ); edx = (u32)(value >>32 ); }
xen/arch/x86/io_apic.c +2 -1
@@ -1980,7 +1980,8 @@ int ioapic_guest_read(unsigned long phys } #define WARN_BOGUS_WRITE(f, a...) \ - DPRINTK("\n%s: apic=%d, pin=%d, old_irq=%d, new_irq=%d\n" \ + DPRINTK(XENLOG_INFO "\n%s: " \ + "apic=%d, pin=%d, old_irq=%d, new_irq=%d\n" \ "%s: old_entry=%08x, new_entry=%08x\n" \ "%s: " f, __FUNCTION__, apic, pin, old_irq, new_irq, \ __FUNCTION__, *(u32 *)&old_rte, *(u32 *)&new_rte, \
xen/arch/x86/irq.c +9 -4
@@ -432,7 +432,8 @@ int pirq_guest_bind(struct vcpu *v, int {if ( desc->action !=NULL ) { -DPRINTK ("Cannot bind IRQ %d to guest. In use by '%s'.\n" , +DPRINTK (XENLOG_G_INFO +"Cannot bind IRQ %d to guest. In use by '%s'.\n" , irq, desc->action->name); rc = -EBUSY ; goto out;
@@ -441,7 +442,9 @@ int pirq_guest_bind(struct vcpu *v, int action =xmalloc (irq_guest_action_t);if ( (desc->action = (struct irqaction *)action) ==NULL ) { -DPRINTK ("Cannot bind IRQ %d to guest. Out of memory.\n" , irq); +DPRINTK (XENLOG_G_INFO +"Cannot bind IRQ %d to guest. Out of memory.\n" , + irq); rc = -ENOMEM ; goto out; }
@@ -464,7 +467,8 @@ int pirq_guest_bind(struct vcpu *v, int }else if ( !will_share || !action->shareable ) { -DPRINTK ("Cannot bind IRQ %d to guest. Will not share with others.\n" , +DPRINTK (XENLOG_G_INFO "Cannot bind IRQ %d to guest. " +"Will not share with others.\n" , irq); rc = -EBUSY ; goto out;
@@ -484,7 +488,8 @@ int pirq_guest_bind(struct vcpu *v, intif ( action->nr_guests ==IRQ_MAX_GUESTS ) { -DPRINTK ("Cannot bind IRQ %d to guest. Already at max share.\n" , irq); +DPRINTK (XENLOG_G_INFO "Cannot bind IRQ %d to guest. " +"Already at max share.\n" , irq); rc = -EBUSY ; goto out; }
xen/arch/x86/mm.c +4 -2
@@ -2262,7 +2262,8 @@ int do_mmu_update( {if (shadow_mode_refcounts (d) ) { -DPRINTK ("mmu update on shadow-refcounted domain!" ); +DPRINTK (XENLOG_INFO +"mmu update on shadow-refcounted domain!" );break ; }
@@ -2626,7 +2627,8 @@ int steal_page( x = y;if (unlikely ((x & (PGC_count_mask|PGC_allocated)) != (1 | PGC_allocated)) ||unlikely (_nd != _d)) { - DPRINTK("gnttab_transfer: Bad page %p: ed=%p(%u), sd=%p," + DPRINTK(XENLOG_G_WARNING + "gnttab_transfer: Bad page %p: ed=%p(%u), sd=%p," " caf=%08x, taf=%" PRtype_info "\n", (void *) page_to_mfn(page), d, d->domain_id, unpickle_domptr(_nd), x,
xen/arch/x86/mm/shadow/common.c +1 -1
@@ -3072,7 +3072,7 @@ int shadow_domctl(struct domain *d,if (unlikely (d == current->domain) ) { -DPRINTK ("Don't try to do a shadow op on yourself!\n" ); +DPRINTK (XENLOG_G_INFO "Don't try to do a shadow op on yourself!\n" );return -EINVAL ; }
xen/arch/x86/platform_hypercall.c +1 -1
@@ -125,7 +125,7 @@ long do_platform_op(XEN_GUEST_HANDLE(xencase QUIRK_IOAPIC_GOOD_REGSEL :#ifndef sis_apic_bug sis_apic_bug = (quirk_id ==QUIRK_IOAPIC_BAD_REGSEL ); -DPRINTK ("Domain 0 says that IO-APIC REGSEL is %s\n" , +DPRINTK (XENLOG_INFO "Domain 0 says that IO-APIC REGSEL is %s\n" , sis_apic_bug ?"bad" :"good" );#else BUG_ON (sis_apic_bug != (quirk_id ==QUIRK_IOAPIC_BAD_REGSEL ));
xen/arch/x86/traps.c +18 -13
@@ -407,7 +407,8 @@ static inline int do_trap(int trapnr, chif (likely ((fixup =search_exception_table (regs->eip)) !=0 ) ) { -DPRINTK ("Trap %d: %p -> %p\n" , trapnr,_p (regs->eip),_p (fixup)); +DPRINTK (XENLOG_ERR "Trap %d: %p -> %p\n" , + trapnr,_p (regs->eip),_p (fixup)); regs->eip = fixup;return 0 ; }
@@ -475,7 +476,8 @@ int wrmsr_hypervisor_regs(if ( idx >0 ) { -DPRINTK ("Dom%d: Out of range index %u to MSR %08x\n" , +DPRINTK (XENLOG_G_WARNING +"Dom%d: Out of range index %u to MSR %08x\n" , d->domain_id, idx,0x40000000 );return 0 ; }
@@ -485,7 +487,8 @@ int wrmsr_hypervisor_regs(if ( !mfn_valid (mfn) || !get_page_and_type (mfn_to_page (mfn), d, PGT_writable_page) ) { -DPRINTK ("Dom%d: Bad GMFN %lx (MFN %lx) to MSR %08x\n" , +DPRINTK (XENLOG_G_WARNING +"Dom%d: Bad GMFN %lx (MFN %lx) to MSR %08x\n" , d->domain_id, gmfn, mfn,0x40000000 );return 0 ; }
@@ -832,17 +835,18 @@ static int __spurious_page_fault(return 0 ; spurious: -DPRINTK ("Spurious fault in domain %u:%u at addr %lx, e/c %04x\n" , +DPRINTK (XENLOG_WARNING "Spurious fault in domain %u:%u " +"at addr %lx, e/c %04x\n" , current->domain->domain_id, current->vcpu_id, addr, regs->error_code);#if CONFIG_PAGING_LEVELS >=4 -DPRINTK (" l4e = %" PRIpte"\n" ,l4e_get_intpte (l4e)); +DPRINTK (XENLOG_WARNING " l4e = %" PRIpte"\n" ,l4e_get_intpte (l4e));#endif #if CONFIG_PAGING_LEVELS >=3 -DPRINTK (" l3e = %" PRIpte"\n" ,l3e_get_intpte (l3e)); -#endif -DPRINTK (" l2e = %" PRIpte"\n" ,l2e_get_intpte (l2e)); -DPRINTK (" l1e = %" PRIpte"\n" ,l1e_get_intpte (l1e)); +DPRINTK (XENLOG_WARNING " l3e = %" PRIpte"\n" ,l3e_get_intpte (l3e)); +#endif +DPRINTK (XENLOG_WARNING " l2e = %" PRIpte"\n" ,l2e_get_intpte (l2e)); +DPRINTK (XENLOG_WARNING " l1e = %" PRIpte"\n" ,l1e_get_intpte (l1e));#ifndef NDEBUG show_registers (regs);#endif
@@ -1313,7 +1317,8 @@ static int emulate_privileged_op(structcase 0 :/* Write CR0 */ if ( (*reg ^read_cr0 ()) & ~X86_CR0_TS ) { -DPRINTK ("Attempt to change unmodifiable CR0 flags.\n" ); +DPRINTK (XENLOG_G_WARNING +"Attempt to change unmodifiable CR0 flags.\n" ); goto fail; } (void )do_fpu_taskswitch (!!(*reg &X86_CR0_TS ));
@@ -1333,7 +1338,7 @@ static int emulate_privileged_op(structcase 4 :if ( *reg != (read_cr4 () & ~(X86_CR4_PGE |X86_CR4_PSE )) ) { -DPRINTK ("Attempt to change CR4 flags.\n" ); +DPRINTK (XENLOG_G_WARNING "Attempt to change CR4 flags.\n" ); goto fail; }break ;
@@ -1381,7 +1386,7 @@ static int emulate_privileged_op(structif ( (rdmsr_safe (regs->ecx, l, h) !=0 ) || (regs->eax != l) || (regs->edx != h) ) -DPRINTK ("Domain attempted WRMSR %p from " +DPRINTK (XENLOG_G_WARNING "Domain attempted WRMSR %p from " "%08x:%08x to %08lx:%08lx.\n" ,_p (regs->ecx), h, l, (long )regs->edx, (long )regs->eax);break ;
@@ -1510,7 +1515,7 @@ asmlinkage int do_general_protection(strif (likely ((fixup =search_exception_table (regs->eip)) !=0 ) ) { -DPRINTK ("GPF (%04x): %p -> %p\n" , +DPRINTK (XENLOG_WARNING "GPF (%04x): %p -> %p\n" , regs->error_code,_p (regs->eip),_p (fixup)); regs->eip = fixup;return 0 ;
xen/arch/x86/x86_32/seg_fixup.c +26 -24
174 lines not on this page · raw message
xen/arch/x86/x86_64/traps.c +4 -2
@@ -206,7 +206,8 @@ unsigned long do_iret(void)if (unlikely (copy_from_user (&iret_saved, (void *)regs->rsp,sizeof (iret_saved))) ) { -DPRINTK ("Fault while reading IRET context from guest stack\n" ); +DPRINTK (XENLOG_G_ERR "Fault while reading IRET context from " +"guest stack\n" );domain_crash_synchronous (); }
@@ -215,7 +216,8 @@ unsigned long do_iret(void) {if (unlikely (pagetable_is_null (v->arch.guest_table_user)) ) { -DPRINTK ("Guest switching to user mode with no user page tables\n" ); +DPRINTK (XENLOG_G_ERR "Guest switching to user mode with no " +"user page tables\n" );domain_crash_synchronous (); }toggle_guest_mode (v);
xen/include/asm-x86/mm.h +2 -1
@@ -213,7 +213,8 @@ static inline int get_page(struct page_i unlikely(d != _domain) ) /* Wrong owner? */ {if ( !_shadow_mode_refcounts (domain) ) -DPRINTK ("Error pfn %lx: rd=%p, od=%p, caf=%08x, taf=%" +DPRINTK (XENLOG_G_INFO +"Error pfn %lx: rd=%p, od=%p, caf=%08x, taf=%" PRtype_info"\n" ,page_to_mfn (page), domain,unpickle_domptr (d), x, page->u.inuse.type_info);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel