Re: [Xen-devel] [RFC][PATCH] xen/apic: refactor error_interrupt

2015-05-05 Thread Andrew Cooper
On 05/05/2015 05:46, Chen, Tiejun wrote: A better approach might be: printk(KERN_DEBUG APIC error on CPU%u: %02lx(%02lx), ...) for ( i = (17); i; i = 1 ) if ( v1 i ) printk(, %s, apic_fault_reasons[i]); I guess this should be apic_fault_reasons[ffs(i) - 1]. Indeed.

Re: [Xen-devel] [RFC][PATCH] xen/apic: refactor error_interrupt

2015-05-05 Thread Andrew Cooper
On 05/05/2015 07:28, Chen, Tiejun wrote: On 2015/5/5 14:02, Andrew Cooper wrote: On 05/05/2015 05:46, Chen, Tiejun wrote: A better approach might be: printk(KERN_DEBUG APIC error on CPU%u: %02lx(%02lx), ...) for ( i = (17); i; i = 1 ) if ( v1 i ) printk(, %s,

Re: [Xen-devel] [RFC][PATCH] xen/apic: refactor error_interrupt

2015-05-05 Thread Chen, Tiejun
On 2015/5/5 14:02, Andrew Cooper wrote: On 05/05/2015 05:46, Chen, Tiejun wrote: A better approach might be: printk(KERN_DEBUG APIC error on CPU%u: %02lx(%02lx), ...) for ( i = (17); i; i = 1 ) if ( v1 i ) printk(, %s, apic_fault_reasons[i]); I guess this should be

Re: [Xen-devel] [RFC][PATCH] xen/apic: refactor error_interrupt

2015-05-04 Thread Jan Beulich
On 04.05.15 at 04:03, tiejun.c...@intel.com wrote: --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -1319,28 +1319,37 @@ out: ; * This interrupt should never happen with our APIC/SMP architecture */ +static const char *apic_fault_reasons[] = If at all, then this should be

Re: [Xen-devel] [RFC][PATCH] xen/apic: refactor error_interrupt

2015-05-04 Thread Chen, Tiejun
On 2015/5/4 16:25, Andrew Cooper wrote: On 04/05/2015 03:03, Tiejun Chen wrote: Just make this readable while debug. debugging Fixed. Signed-off-by: Tiejun Chen tiejun.c...@intel.com In principle, I fully agree with the change. (I had an item on my todo list to make a change like

Re: [Xen-devel] [RFC][PATCH] xen/apic: refactor error_interrupt

2015-05-04 Thread Chen, Tiejun
On 2015/5/4 16:07, Jan Beulich wrote: On 04.05.15 at 04:03, tiejun.c...@intel.com wrote: --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -1319,28 +1319,37 @@ out: ; * This interrupt should never happen with our APIC/SMP architecture */ +static const char *apic_fault_reasons[] =

[Xen-devel] [RFC][PATCH] xen/apic: refactor error_interrupt

2015-05-03 Thread Tiejun Chen
Just make this readable while debug. Signed-off-by: Tiejun Chen tiejun.c...@intel.com --- xen/arch/x86/apic.c | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 3217bdf..0b21ed1 100644 ---