From patchwork Tue May 2 17:59:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Lutomirski X-Patchwork-Id: 9708439 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D49B360349 for ; Tue, 2 May 2017 18:02:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB6751FF15 for ; Tue, 2 May 2017 18:02:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF53D20072; Tue, 2 May 2017 18:02:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7555E1FF15 for ; Tue, 2 May 2017 18:02:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5c5O-0007GK-FR; Tue, 02 May 2017 17:59:42 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5c5M-0007GE-Pk for xen-devel@lists.xenproject.org; Tue, 02 May 2017 17:59:40 +0000 Received: from [85.158.139.211] by server-4.bemta-5.messagelabs.com id DC/5F-02181-C09C8095; Tue, 02 May 2017 17:59:40 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrELMWRWlGSWpSXmKPExsVybKJshy7XSY5 Ig+3vFSy+b5nM5MDocfjDFZYAxijWzLyk/IoE1ozpU1vZC7bzVKy+MY+5gfE6ZxcjF4eQwFRG id8tV1khnP+MEn0XJrJ1MXJwsAmoS7R0+nYxcnKICChJ3Fs1mQmkhlngOqPE35l72UFqhAVsJ DYfKwKpYRFQlXjwbzo7iM0rECrRMeETmC0hICdxadsXZgg7Q2JezxxWCNtLYtGNS1C2msTVc5 uYJzDyLGBkWMWoUZxaVJZapGtkoZdUlJmeUZKbmJmja2hgqpebWlycmJ6ak5hUrJecn7uJEej 3egYGxh2Mfav8DjFKcjApifKqv2KPFOJLyk+pzEgszogvKs1JLT7EKMPBoSTBy3mCI1JIsCg1 PbUiLTMHGIAwaQkOHiURXlOQNG9xQWJucWY6ROoUo6KUOG/dcaCEAEgiozQPrg0W9JcYZaWEe RkZGBiEeApSi3IzS1DlXzGKczAqCfPKgIznycwrgZv+CmgxE9DiZlmwxSWJCCmpBsYCwfrNv5 fvWZK+uPrwy5uTHvy9sGJxks5tPf+Paisi7iZ4RgVev3v7GkP88ydlHZ0BWd3PJGYGxBrNq2P 8cT6j/F698ZdHV8uD7LZskJgQ+rzV/U33neVJ0jXt9149uTxnA2dA1pJDDesMFX9O+h1294T3 9LCqvJWT12yY0VLE1a+z1u4mR0y1EktxRqKhFnNRcSIAUeFMfHUCAAA= X-Env-Sender: luto@kernel.org X-Msg-Ref: server-9.tower-206.messagelabs.com!1493747977!96171111!1 X-Originating-IP: [198.145.29.136] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30802 invoked from network); 2 May 2017 17:59:38 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-9.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 2 May 2017 17:59:38 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D6B720125; Tue, 2 May 2017 17:59:35 +0000 (UTC) Received: from localhost (unknown [198.217.64.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9752320123; Tue, 2 May 2017 17:59:33 +0000 (UTC) From: Andy Lutomirski To: xen-devel@lists.xenproject.org Date: Tue, 2 May 2017 10:59:22 -0700 Message-Id: <1eda2acc5ed68b41f24ba7ab2672976fd92a7f9e.1493747901.git.luto@kernel.org> X-Mailer: git-send-email 2.9.3 X-Virus-Scanned: ClamAV using ClamSMTP Cc: Juergen Gross , x86@kernel.org, linux-kernel@vger.kernel.org, Andy Lutomirski , Boris Ostrovsky Subject: [Xen-devel] [PATCH] x86/xen: Improve failed hypercall debugging X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP When fiddling with xen_exit_mmap(), I noticed that failed multicall debugging doesn't work if the multicall is just one call. Fix it. 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;