gdbstub runstate check follow-ups
cover gdbstub runstate check follow-ups
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(-)
Signature · 1 line
1.8.1.4
PATCH 1/2 gdbstub: fix for commit 87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc
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.
--- gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
gdbstub.c +1 -1
@@ -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
Signature · 1 line
1.8.1.4
PATCH 2/2 gdbstub: let the debugger resume from guest panicked state
In reply to Paolo BonziniWhile 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.
--- gdbstub.c | 3 +++ vl.c | 1 + 2 files changed, 4 insertions(+)
gdbstub.c +3 -0
@@ -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 (); }
vl.c +1 -0
@@ -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 }, };
Signature · 1 line
1.8.1.4
Quoted 2 lines · On Mon, 3 Jun 2013 17:06:53 +0200 Paolo Bonzini <[email protected]> wrote:
My patch committed at
87f25c12bfeaaa0c41fb857713bbc7e8a9b757dcwas broken. These patches fix the problem in a better way.
Looks good to me:
Am 03.06.2013 17:06, schrieb Paolo Bonzini:
Quoted 8 lines
My patch committed at
87f25c12bfeaaa0c41fb857713bbc7e8a9b757dcwas broken. These patches fix the problem in a better way.Paolo
Paolo Bonzini (2):
gdbstub: fix for commit87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc
gdbstub: let the debugger resume from guest panicked state
Andreas
Quoted 3 lines
gdbstub.c | 5 ++++- vl.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-)
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Anthony Liguori
AppliedApplied. Thanks.
Regards,
Anthony Liguori