qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups
@ 2013-06-03 15:06 Paolo Bonzini
  2013-06-03 15:06 ` [Qemu-devel] [PATCH 1/2] gdbstub: fix for commit 87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc Paolo Bonzini
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Paolo Bonzini @ 2013-06-03 15:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: lersek, lcapitulino

My patch committed at 87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc
was broken.  These patches fix the problem in a better way.

Paolo

Paolo Bonzini (2):
  gdbstub: fix for commit 87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc
  gdbstub: let the debugger resume from guest panicked state

 gdbstub.c | 5 ++++-
 vl.c      | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PATCH 1/2] gdbstub: fix for commit 87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc
  2013-06-03 15:06 [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups Paolo Bonzini
@ 2013-06-03 15:06 ` Paolo Bonzini
  2013-06-03 15:06 ` [Qemu-devel] [PATCH 2/2] gdbstub: let the debugger resume from guest panicked state Paolo Bonzini
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2013-06-03 15:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: lersek, lcapitulino

This commit used the wrong check to prevent an assertion failure.
After this commit, you need to start a guest in the monitor, you
cannot use anymore the "c" command in the debugger.  This is
undesirable.  The commit's aim was to prevent a restart
after a KVM internal error or something like that; use
runstate_needs_reset() for that.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 gdbstub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdbstub.c b/gdbstub.c
index 90e54cb..e8541f3 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -371,7 +371,7 @@ static inline void gdb_continue(GDBState *s)
 #ifdef CONFIG_USER_ONLY
     s->running_state = 1;
 #else
-    if (runstate_check(RUN_STATE_DEBUG)) {
+    if (!runstate_needs_reset()) {
         vm_start();
     }
 #endif
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PATCH 2/2] gdbstub: let the debugger resume from guest panicked state
  2013-06-03 15:06 [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups Paolo Bonzini
  2013-06-03 15:06 ` [Qemu-devel] [PATCH 1/2] gdbstub: fix for commit 87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc Paolo Bonzini
@ 2013-06-03 15:06 ` Paolo Bonzini
  2013-06-03 15:26 ` [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups Luiz Capitulino
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2013-06-03 15:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: lersek, lcapitulino

While in general we forbid a "continue" from the guest panicked
state, it makes sense to have an exception for that when continuing
in the debugger.  Perhaps the guest entered that state due to a bug,
for example, and we want to continue no matter what.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 gdbstub.c | 3 +++
 vl.c      | 1 +
 2 files changed, 4 insertions(+)

diff --git a/gdbstub.c b/gdbstub.c
index e8541f3..94c78ce 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -371,6 +371,9 @@ static inline void gdb_continue(GDBState *s)
 #ifdef CONFIG_USER_ONLY
     s->running_state = 1;
 #else
+    if (runstate_check(RUN_STATE_GUEST_PANICKED)) {
+        runstate_set(RUN_STATE_DEBUG);
+    }
     if (!runstate_needs_reset()) {
         vm_start();
     }
diff --git a/vl.c b/vl.c
index 510d2c2..9fcf543 100644
--- a/vl.c
+++ b/vl.c
@@ -610,6 +610,7 @@ static const RunStateTransition runstate_transitions_def[] = {
 
     { RUN_STATE_GUEST_PANICKED, RUN_STATE_PAUSED },
     { RUN_STATE_GUEST_PANICKED, RUN_STATE_FINISH_MIGRATE },
+    { RUN_STATE_GUEST_PANICKED, RUN_STATE_DEBUG },
 
     { RUN_STATE_MAX, RUN_STATE_MAX },
 };
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups
  2013-06-03 15:06 [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups Paolo Bonzini
  2013-06-03 15:06 ` [Qemu-devel] [PATCH 1/2] gdbstub: fix for commit 87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc Paolo Bonzini
  2013-06-03 15:06 ` [Qemu-devel] [PATCH 2/2] gdbstub: let the debugger resume from guest panicked state Paolo Bonzini
@ 2013-06-03 15:26 ` Luiz Capitulino
  2013-06-07 23:33 ` Andreas Färber
  2013-06-10 21:48 ` Anthony Liguori
  4 siblings, 0 replies; 6+ messages in thread
From: Luiz Capitulino @ 2013-06-03 15:26 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: lersek, qemu-devel

On Mon,  3 Jun 2013 17:06:53 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:

> My patch committed at 87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc
> was broken.  These patches fix the problem in a better way.

Looks good to me:

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups
  2013-06-03 15:06 [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups Paolo Bonzini
                   ` (2 preceding siblings ...)
  2013-06-03 15:26 ` [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups Luiz Capitulino
@ 2013-06-07 23:33 ` Andreas Färber
  2013-06-10 21:48 ` Anthony Liguori
  4 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2013-06-07 23:33 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: lersek, qemu-devel, Anthony Liguori, lcapitulino

Am 03.06.2013 17:06, schrieb Paolo Bonzini:
> My patch committed at 87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc
> was broken.  These patches fix the problem in a better way.
> 
> Paolo
> 
> Paolo Bonzini (2):
>   gdbstub: fix for commit 87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc
>   gdbstub: let the debugger resume from guest panicked state

Tested-by: Andreas Färber <afaerber@suse.de>

Andreas

>  gdbstub.c | 5 ++++-
>  vl.c      | 1 +
>  2 files changed, 5 insertions(+), 1 deletion(-)

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups
  2013-06-03 15:06 [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups Paolo Bonzini
                   ` (3 preceding siblings ...)
  2013-06-07 23:33 ` Andreas Färber
@ 2013-06-10 21:48 ` Anthony Liguori
  4 siblings, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2013-06-10 21:48 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: lersek, Anthony Liguori, lcapitulino

Applied.  Thanks.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-06-10 21:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-03 15:06 [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups Paolo Bonzini
2013-06-03 15:06 ` [Qemu-devel] [PATCH 1/2] gdbstub: fix for commit 87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc Paolo Bonzini
2013-06-03 15:06 ` [Qemu-devel] [PATCH 2/2] gdbstub: let the debugger resume from guest panicked state Paolo Bonzini
2013-06-03 15:26 ` [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups Luiz Capitulino
2013-06-07 23:33 ` Andreas Färber
2013-06-10 21:48 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).