* [PATCH] Show registers and exit on unhandled errors
@ 2009-09-21 11:18 Mohammed Gamal
2009-09-21 11:29 ` Jan Kiszka
0 siblings, 1 reply; 7+ messages in thread
From: Mohammed Gamal @ 2009-09-21 11:18 UTC (permalink / raw)
To: avi; +Cc: mtosatti, kvm, Mohammed Gamal
Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
---
qemu-kvm.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/qemu-kvm.c b/qemu-kvm.c
index 0afdb56..c22c28a 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1015,6 +1015,8 @@ int kvm_run(kvm_vcpu_context_t vcpu, void *env)
switch (run->exit_reason) {
case KVM_EXIT_UNKNOWN:
r = handle_unhandled(run->hw.hardware_exit_reason);
+ kvm_show_regs(vcpu);
+ abort();
break;
case KVM_EXIT_FAIL_ENTRY:
r = handle_unhandled(run->fail_entry.hardware_entry_failure_reason);
--
1.6.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Show registers and exit on unhandled errors
2009-09-21 11:18 [PATCH] Show registers and exit on unhandled errors Mohammed Gamal
@ 2009-09-21 11:29 ` Jan Kiszka
2009-09-21 11:31 ` Mohammed Gamal
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2009-09-21 11:29 UTC (permalink / raw)
To: Mohammed Gamal; +Cc: avi, mtosatti, kvm
Mohammed Gamal wrote:
> Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
> ---
> qemu-kvm.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/qemu-kvm.c b/qemu-kvm.c
> index 0afdb56..c22c28a 100644
> --- a/qemu-kvm.c
> +++ b/qemu-kvm.c
> @@ -1015,6 +1015,8 @@ int kvm_run(kvm_vcpu_context_t vcpu, void *env)
> switch (run->exit_reason) {
> case KVM_EXIT_UNKNOWN:
> r = handle_unhandled(run->hw.hardware_exit_reason);
> + kvm_show_regs(vcpu);
> + abort();
> break;
> case KVM_EXIT_FAIL_ENTRY:
> r = handle_unhandled(run->fail_entry.hardware_entry_failure_reason);
Don't we currently suspend the VM on unknown exits? This is more useful
than aborting as it allows to
- disassemble the problematic code
- poke around in the RAM
- look at other VCPUs
- attach a debugger to qemu
- ...
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Show registers and exit on unhandled errors
2009-09-21 11:29 ` Jan Kiszka
@ 2009-09-21 11:31 ` Mohammed Gamal
2009-09-21 11:42 ` Jan Kiszka
2009-09-21 11:51 ` Avi Kivity
0 siblings, 2 replies; 7+ messages in thread
From: Mohammed Gamal @ 2009-09-21 11:31 UTC (permalink / raw)
To: Jan Kiszka; +Cc: avi, mtosatti, kvm
On Mon, Sep 21, 2009 at 1:29 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Mohammed Gamal wrote:
>> Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
>> ---
>> qemu-kvm.c | 2 ++
>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/qemu-kvm.c b/qemu-kvm.c
>> index 0afdb56..c22c28a 100644
>> --- a/qemu-kvm.c
>> +++ b/qemu-kvm.c
>> @@ -1015,6 +1015,8 @@ int kvm_run(kvm_vcpu_context_t vcpu, void *env)
>> switch (run->exit_reason) {
>> case KVM_EXIT_UNKNOWN:
>> r = handle_unhandled(run->hw.hardware_exit_reason);
>> + kvm_show_regs(vcpu);
>> + abort();
>> break;
>> case KVM_EXIT_FAIL_ENTRY:
>> r = handle_unhandled(run->fail_entry.hardware_entry_failure_reason);
>
> Don't we currently suspend the VM on unknown exits? This is more useful
> than aborting as it allows to
> - disassemble the problematic code
> - poke around in the RAM
> - look at other VCPUs
> - attach a debugger to qemu
> - ...
>
Good point. But at least we can still show registers, since that also
can give some diagnostic information, no?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Show registers and exit on unhandled errors
2009-09-21 11:31 ` Mohammed Gamal
@ 2009-09-21 11:42 ` Jan Kiszka
2009-09-21 11:47 ` Mohammed Gamal
2009-09-21 11:50 ` Mohammed Gamal
2009-09-21 11:51 ` Avi Kivity
1 sibling, 2 replies; 7+ messages in thread
From: Jan Kiszka @ 2009-09-21 11:42 UTC (permalink / raw)
To: Mohammed Gamal; +Cc: avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org
Mohammed Gamal wrote:
> On Mon, Sep 21, 2009 at 1:29 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> Mohammed Gamal wrote:
>>> Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
>>> ---
>>> qemu-kvm.c | 2 ++
>>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/qemu-kvm.c b/qemu-kvm.c
>>> index 0afdb56..c22c28a 100644
>>> --- a/qemu-kvm.c
>>> +++ b/qemu-kvm.c
>>> @@ -1015,6 +1015,8 @@ int kvm_run(kvm_vcpu_context_t vcpu, void *env)
>>> switch (run->exit_reason) {
>>> case KVM_EXIT_UNKNOWN:
>>> r = handle_unhandled(run->hw.hardware_exit_reason);
>>> + kvm_show_regs(vcpu);
>>> + abort();
>>> break;
>>> case KVM_EXIT_FAIL_ENTRY:
>>> r = handle_unhandled(run->fail_entry.hardware_entry_failure_reason);
>> Don't we currently suspend the VM on unknown exits? This is more useful
>> than aborting as it allows to
>> - disassemble the problematic code
>> - poke around in the RAM
>> - look at other VCPUs
>> - attach a debugger to qemu
>> - ...
>>
>
> Good point. But at least we can still show registers, since that also
> can give some diagnostic information, no?
No fundamental concerns. Just move the call into handle_unhandled.
And maybe some note like "kvm_run returned XX - VM stopped" in
kvm_cpu_exec() would clarify the situation a bit more.
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Show registers and exit on unhandled errors
2009-09-21 11:42 ` Jan Kiszka
@ 2009-09-21 11:47 ` Mohammed Gamal
2009-09-21 11:50 ` Mohammed Gamal
1 sibling, 0 replies; 7+ messages in thread
From: Mohammed Gamal @ 2009-09-21 11:47 UTC (permalink / raw)
To: Jan Kiszka; +Cc: avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org
On Mon, Sep 21, 2009 at 1:42 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Mohammed Gamal wrote:
>> On Mon, Sep 21, 2009 at 1:29 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>> Mohammed Gamal wrote:
>>>> Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
>>>> ---
>>>> qemu-kvm.c | 2 ++
>>>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/qemu-kvm.c b/qemu-kvm.c
>>>> index 0afdb56..c22c28a 100644
>>>> --- a/qemu-kvm.c
>>>> +++ b/qemu-kvm.c
>>>> @@ -1015,6 +1015,8 @@ int kvm_run(kvm_vcpu_context_t vcpu, void *env)
>>>> switch (run->exit_reason) {
>>>> case KVM_EXIT_UNKNOWN:
>>>> r = handle_unhandled(run->hw.hardware_exit_reason);
>>>> + kvm_show_regs(vcpu);
>>>> + abort();
>>>> break;
>>>> case KVM_EXIT_FAIL_ENTRY:
>>>> r = handle_unhandled(run->fail_entry.hardware_entry_failure_reason);
>>> Don't we currently suspend the VM on unknown exits? This is more useful
>>> than aborting as it allows to
>>> - disassemble the problematic code
>>> - poke around in the RAM
>>> - look at other VCPUs
>>> - attach a debugger to qemu
>>> - ...
>>>
>>
>> Good point. But at least we can still show registers, since that also
>> can give some diagnostic information, no?
>
> No fundamental concerns. Just move the call into handle_unhandled.
>
> And maybe some note like "kvm_run returned XX - VM stopped" in
> kvm_cpu_exec() would clarify the situation a bit more.
>
> Jan
That's already the case if we don't exit.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Show registers and exit on unhandled errors
2009-09-21 11:42 ` Jan Kiszka
2009-09-21 11:47 ` Mohammed Gamal
@ 2009-09-21 11:50 ` Mohammed Gamal
1 sibling, 0 replies; 7+ messages in thread
From: Mohammed Gamal @ 2009-09-21 11:50 UTC (permalink / raw)
To: Jan Kiszka; +Cc: avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org
>> Good point. But at least we can still show registers, since that also
>> can give some diagnostic information, no?
>
> No fundamental concerns. Just move the call into handle_unhandled.
>
handle_unhandled() doesn't get the vcpu passed to it, so it'd be
better we keep kvm_show_regs() at the caller.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Show registers and exit on unhandled errors
2009-09-21 11:31 ` Mohammed Gamal
2009-09-21 11:42 ` Jan Kiszka
@ 2009-09-21 11:51 ` Avi Kivity
1 sibling, 0 replies; 7+ messages in thread
From: Avi Kivity @ 2009-09-21 11:51 UTC (permalink / raw)
To: Mohammed Gamal; +Cc: Jan Kiszka, mtosatti, kvm
On 09/21/2009 02:31 PM, Mohammed Gamal wrote:
>
>> Don't we currently suspend the VM on unknown exits? This is more useful
>> than aborting as it allows to
>> - disassemble the problematic code
>> - poke around in the RAM
>> - look at other VCPUs
>> - attach a debugger to qemu
>> - ...
>>
>>
> Good point. But at least we can still show registers, since that also
> can give some diagnostic information, no?
>
There's 'info registers' for that.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-09-21 11:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-21 11:18 [PATCH] Show registers and exit on unhandled errors Mohammed Gamal
2009-09-21 11:29 ` Jan Kiszka
2009-09-21 11:31 ` Mohammed Gamal
2009-09-21 11:42 ` Jan Kiszka
2009-09-21 11:47 ` Mohammed Gamal
2009-09-21 11:50 ` Mohammed Gamal
2009-09-21 11:51 ` Avi Kivity
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).