Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1634555 > unrolled thread
| Started by | Andy Lutomirski <luto@kernel.org> |
|---|---|
| First post | 2017-05-02 20:00 +0200 |
| Last post | 2017-05-02 20:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] x86/xen: Improve failed hypercall debugging Andy Lutomirski <luto@kernel.org> - 2017-05-02 20:00 +0200
Re: [PATCH] x86/xen: Improve failed hypercall debugging Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-05-02 20:30 +0200
| From | Andy Lutomirski <luto@kernel.org> |
|---|---|
| Date | 2017-05-02 20:00 +0200 |
| Subject | [PATCH] x86/xen: Improve failed hypercall debugging |
| Message-ID | <tCKfD-1nA-1@gated-at.bofh.it> |
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 <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;
--
2.9.3
[toc] | [next] | [standalone]
| From | Boris Ostrovsky <boris.ostrovsky@oracle.com> |
|---|---|
| Date | 2017-05-02 20:30 +0200 |
| Message-ID | <tCKIF-1NJ-5@gated-at.bofh.it> |
| In reply to | #1634555 |
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;
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web