* Where are vmentry failure caugth?
@ 2008-01-10 10:19 Guillaume Thouvenin
2008-01-10 14:26 ` Guillaume Thouvenin
0 siblings, 1 reply; 7+ messages in thread
From: Guillaume Thouvenin @ 2008-01-10 10:19 UTC (permalink / raw)
To: kvm-devel
Hello,
When a vmentry failure occurs, where is it caught? I see that
VMX_EXIT_REASONS_FAILED_VMENTRY is defined but I don't see where it is
used. Shouldn't there be something in handle_excetion() like:
static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run
*kvm_run) {
struct vcpu_vmx *vmx = to_vmx(vcpu);
u32 intr_info, error_code, exit_reason;
unsigned long cr2, rip;
u32 vect_info;
enum emulation_result er;
vect_info = vmx->idt_vectoring_info;
intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
exit_reason = vmcs_readl(VM_EXIT_REASON);
if (unlikely(exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY))
/* check why and do something */
...
}
I tried but it didn't catch any vmentry failures (and I know that
there is at least one during the test).
The idea is to find failure due to invalid guest state (like with old
gfxboot bug) and emulate the code until the guest recovers a valid
state.
Regards,
Guillaume
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Where are vmentry failure caugth?
2008-01-10 10:19 Where are vmentry failure caugth? Guillaume Thouvenin
@ 2008-01-10 14:26 ` Guillaume Thouvenin
2008-01-10 15:32 ` Avi Kivity
0 siblings, 1 reply; 7+ messages in thread
From: Guillaume Thouvenin @ 2008-01-10 14:26 UTC (permalink / raw)
To: kvm-devel
On Thu, 10 Jan 2008 11:19:58 +0100
Guillaume Thouvenin <guillaume.thouvenin-Z51IpKcfGtLk1uMJSBkQmQ@public.gmane.org> wrote:
> I tried but it didn't catch any vmentry failures (and I know that
> there is at least one during the test).
I think that there is a vmentry failure because qemu-system-x86_64
crashes with following error:
"exception 13 (33)"
I interpreted this as a vmentry failure because 33 is the exit reason
for a vmentry failure. The problem is that I don't find how to catch it
in kvm. I thought that something like:
static int
kvm_handle_exit(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
{
u32 exit_reason = vmcs_read32(VM_EXIT_REASON);
struct vcpu_vmx *vmx = to_vmx(vcpu);
u32 vectoring_info = vmx->idt_vectoring_info;
if ( unlikely(exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY) )
// I should get it here no?
...
}
but exit_reason is never equal to VMX_EXIT_REASONS_FAILED_VMENTRY. Does
it mean that what I interpret as a vmentry failure due to invalid guest
state is in fact due to something else.
Any hints to catch the vmentry failure due to invalid guest state in
kvm?
Thanks,
Guillaume
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Where are vmentry failure caugth?
2008-01-10 14:26 ` Guillaume Thouvenin
@ 2008-01-10 15:32 ` Avi Kivity
[not found] ` <47863A93.2030707-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Avi Kivity @ 2008-01-10 15:32 UTC (permalink / raw)
To: Guillaume Thouvenin; +Cc: kvm-devel
Guillaume Thouvenin wrote:
> On Thu, 10 Jan 2008 11:19:58 +0100
> Guillaume Thouvenin <guillaume.thouvenin-Z51IpKcfGtLk1uMJSBkQmQ@public.gmane.org> wrote:
>
>
>> I tried but it didn't catch any vmentry failures (and I know that
>> there is at least one during the test).
>>
>
> I think that there is a vmentry failure because qemu-system-x86_64
> crashes with following error:
> "exception 13 (33)"
>
> I interpreted this as a vmentry failure because 33 is the exit reason
> for a vmentry failure. The problem is that I don't find how to catch it
> in kvm. I thought that something like:
>
I think 33 is the error code, which means we got a general protection
fault while accessing segment 0x33.
What guest code is running when this happens? The dump sometimes
includes the current code.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Where are vmentry failure caugth?
[not found] ` <47863A93.2030707-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2008-01-11 7:44 ` Guillaume Thouvenin
2008-01-12 20:12 ` Avi Kivity
0 siblings, 1 reply; 7+ messages in thread
From: Guillaume Thouvenin @ 2008-01-11 7:44 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm-devel
On Thu, 10 Jan 2008 17:32:35 +0200
Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
> I think 33 is the error code, which means we got a general protection
> fault while accessing segment 0x33.
>
> What guest code is running when this happens? The dump sometimes
> includes the current code.
When it happened I started an openSUSE-10.3 installation. Here is the complete dump:
[guill]$ ./qemu-system-x86_64 -hda ~/disk_images/openSUSE-10.3.qcow2 -cdrom ~/iso_images/openSUSE-10.3-GM-x86_64-mini.iso -boot d -m 1024
exception 13 (33)
rax 0000000000000671 rbx 0000000000800000 rcx 0000000000000000 rdx 00000000000013ca
rsi 0000000000055e1c rdi 0000000000055e1d rsp 00000000fffa0080 rbp 000000000000200b
r8 0000000000000000 r9 0000000000000000 r10 0000000000000000 r11 0000000000000000
r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 0000000000000000
rip 000000000000b071 rflags 00033096
cs 4004 (00040040/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ds 4004 (00040040/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
es 00ff (00000ff0/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ss ff11 (000ff110/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
fs 3002 (00030020/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
tr 0000 (fffbd000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
gdt 40920/47
idt 0/ffff
cr0 60000010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
code: 17 06 29 4b 01 18 eb 18 a8 25 aa 19 28 4c 01 28 4d 01 01 17 --> 0f 17 0f 01 17 0f 17 12 01 17 2c 25 4b 19 21 00 02 17 1a 94 0a 76 67 61 3d 30 78 25 78 20
Aborted
In the console I got:
[86955.117391] handle_exception: unexpected, vectoring info 0x80000306 intr info 0x80000b0d
[86955.193194] pending exception: not handled yet
[86955.219948] pending exception: not handled yet
--
Guillaume Thouvenin
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Where are vmentry failure caugth?
2008-01-11 7:44 ` Guillaume Thouvenin
@ 2008-01-12 20:12 ` Avi Kivity
[not found] ` <47891F36.1080903-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Avi Kivity @ 2008-01-12 20:12 UTC (permalink / raw)
To: Guillaume Thouvenin; +Cc: kvm-devel
Guillaume Thouvenin wrote:
> On Thu, 10 Jan 2008 17:32:35 +0200
> Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
>
>
>> I think 33 is the error code, which means we got a general protection
>> fault while accessing segment 0x33.
>>
>> What guest code is running when this happens? The dump sometimes
>> includes the current code.
>>
>
> When it happened I started an openSUSE-10.3 installation. Here is the complete dump:
>
> [guill]$ ./qemu-system-x86_64 -hda ~/disk_images/openSUSE-10.3.qcow2 -cdrom ~/iso_images/openSUSE-10.3-GM-x86_64-mini.iso -boot d -m 1024
> exception 13 (33)
> rax 0000000000000671 rbx 0000000000800000 rcx 0000000000000000 rdx 00000000000013ca
> rsi 0000000000055e1c rdi 0000000000055e1d rsp 00000000fffa0080 rbp 000000000000200b
> r8 0000000000000000 r9 0000000000000000 r10 0000000000000000 r11 0000000000000000
> r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 0000000000000000
> rip 000000000000b071 rflags 00033096
> cs 4004 (00040040/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> ds 4004 (00040040/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> es 00ff (00000ff0/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> ss ff11 (000ff110/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> fs 3002 (00030020/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> tr 0000 (fffbd000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
> ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
> gdt 40920/47
> idt 0/ffff
> cr0 60000010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
> code: 17 06 29 4b 01 18 eb 18 a8 25 aa 19 28 4c 01 28 4d 01 01 17 --> 0f 17 0f 01 17 0f 17 12 01 17 2c 25 4b 19 21 00 02 17 1a 94 0a 76 67 61 3d 30 78 25 78 20
> Aborted
>
> In the console I got:
> [86955.117391] handle_exception: unexpected, vectoring info 0x80000306 intr info 0x80000b0d
> [86955.193194] pending exception: not handled yet
> [86955.219948] pending exception: not handled yet
>
We probably need to understand the first handle_exception message;
things have probably gone very wrong afterwards.
--
Any sufficiently difficult bug is indistinguishable from a feature.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Where are vmentry failure caugth?
[not found] ` <47891F36.1080903-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2008-01-12 20:34 ` Anthony Liguori
[not found] ` <47892444.2070903-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Anthony Liguori @ 2008-01-12 20:34 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm-devel, Guillaume Thouvenin
Avi Kivity wrote:
> Guillaume Thouvenin wrote:
>
>> On Thu, 10 Jan 2008 17:32:35 +0200
>> Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
>>
>>
>>
>>> I think 33 is the error code, which means we got a general protection
>>> fault while accessing segment 0x33.
>>>
>>> What guest code is running when this happens? The dump sometimes
>>> includes the current code.
>>>
>>>
>> When it happened I started an openSUSE-10.3 installation. Here is the complete dump:
>>
What version of gfxboot does openSUSE 10.3 use? gfxboot was broken for
KVM until very recently. This is probably what you're seeing.
Regards,
Anthony Liguori
>> [guill]$ ./qemu-system-x86_64 -hda ~/disk_images/openSUSE-10.3.qcow2 -cdrom ~/iso_images/openSUSE-10.3-GM-x86_64-mini.iso -boot d -m 1024
>> exception 13 (33)
>> rax 0000000000000671 rbx 0000000000800000 rcx 0000000000000000 rdx 00000000000013ca
>> rsi 0000000000055e1c rdi 0000000000055e1d rsp 00000000fffa0080 rbp 000000000000200b
>> r8 0000000000000000 r9 0000000000000000 r10 0000000000000000 r11 0000000000000000
>> r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 0000000000000000
>> rip 000000000000b071 rflags 00033096
>> cs 4004 (00040040/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> ds 4004 (00040040/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> es 00ff (00000ff0/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> ss ff11 (000ff110/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> fs 3002 (00030020/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> tr 0000 (fffbd000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
>> ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
>> gdt 40920/47
>> idt 0/ffff
>> cr0 60000010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
>> code: 17 06 29 4b 01 18 eb 18 a8 25 aa 19 28 4c 01 28 4d 01 01 17 --> 0f 17 0f 01 17 0f 17 12 01 17 2c 25 4b 19 21 00 02 17 1a 94 0a 76 67 61 3d 30 78 25 78 20
>> Aborted
>>
>> In the console I got:
>> [86955.117391] handle_exception: unexpected, vectoring info 0x80000306 intr info 0x80000b0d
>> [86955.193194] pending exception: not handled yet
>> [86955.219948] pending exception: not handled yet
>>
>>
>
> We probably need to understand the first handle_exception message;
> things have probably gone very wrong afterwards.
>
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Where are vmentry failure caugth?
[not found] ` <47892444.2070903-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
@ 2008-01-14 7:11 ` Guillaume Thouvenin
0 siblings, 0 replies; 7+ messages in thread
From: Guillaume Thouvenin @ 2008-01-14 7:11 UTC (permalink / raw)
To: Anthony Liguori; +Cc: kvm-devel, Avi Kivity
On Sat, 12 Jan 2008 14:34:12 -0600
Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org> wrote:
> What version of gfxboot does openSUSE 10.3 use? gfxboot was broken for
> KVM until very recently. This is probably what you're seeing.
I don't know what version it is but do you talk about the bug due to
the wrong RPL value in the SS selector that produces a VMentry failure?
Because my problem is here. I thought that I could catch the VMentry
failure by added a test like "if (unlikely(exit_reason &
VMX_EXIT_REASONS_FAILED_VMENTRY))" in kvm_handle_exit(). Thus I tried
to start the openSUSE 10.3 with the "old" gfxboot to test the VMentry
failure but I cannot catch it and that's why I'm a little lost.
I will try to understand the first handle_exception message as
suggested by Avi.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-01-14 7:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-10 10:19 Where are vmentry failure caugth? Guillaume Thouvenin
2008-01-10 14:26 ` Guillaume Thouvenin
2008-01-10 15:32 ` Avi Kivity
[not found] ` <47863A93.2030707-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-11 7:44 ` Guillaume Thouvenin
2008-01-12 20:12 ` Avi Kivity
[not found] ` <47891F36.1080903-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-12 20:34 ` Anthony Liguori
[not found] ` <47892444.2070903-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2008-01-14 7:11 ` Guillaume Thouvenin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox