All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Andy Lutomirski <luto@kernel.org>, xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/xen: Improve failed hypercall debugging
Date: Tue, 2 May 2017 14:28:54 -0400	[thread overview]
Message-ID: <bd5e18dd-415c-26cf-f88f-eb437a3731fc__3824.69740366123$1493749824$gmane$org@oracle.com> (raw)
In-Reply-To: <1eda2acc5ed68b41f24ba7ab2672976fd92a7f9e.1493747901.git.luto@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 <jgross@suse.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Signed-off-by: Andy Lutomirski <luto@kernel.org>
> ---
>  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;


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-05-02 18:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-02 17:59 [PATCH] x86/xen: Improve failed hypercall debugging Andy Lutomirski
2017-05-02 18:28 ` Boris Ostrovsky
2017-05-02 18:28 ` Boris Ostrovsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-05-02 17:59 Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='bd5e18dd-415c-26cf-f88f-eb437a3731fc__3824.69740366123$1493749824$gmane$org@oracle.com' \
    --to=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.