From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751420AbdEBS3P (ORCPT ); Tue, 2 May 2017 14:29:15 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:23168 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbdEBS3N (ORCPT ); Tue, 2 May 2017 14:29:13 -0400 Subject: Re: [PATCH] x86/xen: Improve failed hypercall debugging To: Andy Lutomirski , xen-devel@lists.xenproject.org References: <1eda2acc5ed68b41f24ba7ab2672976fd92a7f9e.1493747901.git.luto@kernel.org> Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Juergen Gross , Konrad Rzeszutek Wilk From: Boris Ostrovsky Message-ID: Date: Tue, 2 May 2017 14:28:54 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1eda2acc5ed68b41f24ba7ab2672976fd92a7f9e.1493747901.git.luto@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/02/2017 01:59 PM, Andy Lutomirski wrote: > When fiddling with xen_exit_mmap(), I noticed that failed multicall > debugging doesn't work if the multicall is just one call. Fix it. That wouldn't be a multicall though, we'll end up making the desired hypercall directly. Besides, b->debug[] is not initialized in this case. -boris > > Cc: Juergen Gross > Cc: Konrad Rzeszutek Wilk > Cc: Boris Ostrovsky > Signed-off-by: Andy Lutomirski > --- > arch/x86/xen/multicalls.c | 26 +++++++++++++------------- > 1 file changed, 13 insertions(+), 13 deletions(-) > > diff --git a/arch/x86/xen/multicalls.c b/arch/x86/xen/multicalls.c > index ea54a08d8301..b6b3f024d342 100644 > --- a/arch/x86/xen/multicalls.c > +++ b/arch/x86/xen/multicalls.c > @@ -96,23 +96,23 @@ void xen_mc_flush(void) > for (i = 0; i < b->mcidx; i++) > if (b->entries[i].result < 0) > ret++; > + } > > #if MC_DEBUG > - if (ret) { > - printk(KERN_ERR "%d multicall(s) failed: cpu %d\n", > - ret, smp_processor_id()); > - dump_stack(); > - for (i = 0; i < b->mcidx; i++) { > - printk(KERN_DEBUG " call %2d/%d: op=%lu arg=[%lx] result=%ld\t%pF\n", > - i+1, b->mcidx, > - b->debug[i].op, > - b->debug[i].args[0], > - b->entries[i].result, > - b->caller[i]); > - } > + if (ret) { > + printk(KERN_ERR "%d multicall(s) failed: cpu %d\n", > + ret, smp_processor_id()); > + dump_stack(); > + for (i = 0; i < b->mcidx; i++) { > + printk(KERN_DEBUG " call %2d/%d: op=%lu arg=[%lx] result=%ld\t%pF\n", > + i+1, b->mcidx, > + b->debug[i].op, > + b->debug[i].args[0], > + b->entries[i].result, > + b->caller[i]); > } > -#endif > } > +#endif > > b->mcidx = 0; > b->argidx = 0;