From: Jan Kiszka <jan.kiszka@siemens.com>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: Re: WARN_ON in kvm_queue_exception_e triggers
Date: Tue, 29 Apr 2008 12:34:37 +0200 [thread overview]
Message-ID: <4816F9BD.3050603@siemens.com> (raw)
In-Reply-To: <20080429100109.GY6567@amd.com>
Joerg Roedel wrote:
> On Tue, Apr 29, 2008 at 10:38:41AM +0200, Jan Kiszka wrote:
>> Joerg Roedel wrote:
>>> Hmm, seems we have to check for DF and triple faults in the
>>> kvm_queue_exception functions too. Does the attached patch fix the
>>> problem (patch is against kvm-66).
>> Thanks, it indeed fixes the warnings (*) and makes KVM issue a reset. But
>> then is stumbles and falls probably over some inconsistent system state:
>>
>> exception 13 (43)
>> rax 0000000000000000 rbx 0000000000000000 rcx 0000000000000000 rdx 0000000000000633
>> rsi 0000000000000000 rdi 0000000000000000 rsp 0000000000000000 rbp 0000000000000000
>> r8 0000000000000000 r9 0000000000000000 r10 0000000000000000 r11 0000000000000000
>> r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 0000000000000000
>> rip 000000000000fff0 rflags 00033002
>> cs f000 (000f0000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> ds 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> es 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> fs 0000 (00000000/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 0178 (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 0/ffff
>> idt 0/ffff
>> cr0 60000010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
>> code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 --> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>
>> Looks like trying to execute the first instruction after reset is
>> already unsuccessful. As the tr selector is non-zero here, I already
>> tried a kvm_arch_reset_cpu-hack along the line that sets
>> KVM_REQ_TRIPLE_FAULT, but without success. Any idea what to check?
>
> Its weird to me what triggers the taskswitch. What guest operating
It is the guest, looking for a soft-restart (after it detected some
other error - now our main problem).
> system are you running and what is the qemu/kvm command line to start
> the guest?
Well, the guest is a proprietary OS of our customer, running in 16-bit
protected mode with a lot of segment shuffling. Due to this and also
some special hardware emulations, the current test case is not portable.
So I'm looking for input on where to dig and what to try.
Note that I ran the very same test with -no-kvm, and here we do not get
those post-reset GPF (provided that some reset-on-triple-fault patch is
applied to avoid the abort(), e.g. [1]).
>
>> Note that this does not happen when I raise a reset via the monitor.
>>
>> BTW, kvm_show_code() does not seem to provide correct informations,
>> even when I add it right before the first kvm_run().
>
> When the guest state is messed up the information may be incorrect.
I don't expect the guest state to be messed up right before the very
first guest code execution (that's where kvm_show_code() also reported
zeros)... :->
>
>> (*) There is just a bit noise left behind in the syslog:
>>
>> kvm_handle_exit: unexpected, valid vectoring info and exit reason is 0x9
>
> Reason 0x9 is the taskswitch intercept.
>
>> kvm: inject_page_fault: double fault
>
> This is expected from the patch I sent you.
For sure. I would just suggest to rethink if a final version should
still issue such warnings. We basically had the same discussion on
qemu-devel around the reset-on-triple-fault patch (which is
unfortunately still not finalized :-/).
Jan
[1] http://permalink.gmane.org/gmane.comp.emulators.qemu/24475
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
prev parent reply other threads:[~2008-04-29 10:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-28 17:35 WARN_ON in kvm_queue_exception_e triggers Jan Kiszka
2008-04-28 20:37 ` Joerg Roedel
2008-04-29 8:38 ` Jan Kiszka
2008-04-29 10:01 ` Joerg Roedel
2008-04-29 10:34 ` Jan Kiszka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4816F9BD.3050603@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=joerg.roedel@amd.com \
--cc=kvm-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox