From: Gleb Natapov <gleb@redhat.com>
To: Stefan Pietsch <stefan.pietsch@lsexperts.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Ben Hutchings <ben@decadent.org.uk>,
kvm@vger.kernel.org, 707257@bugs.debian.org
Subject: Re: Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with "entry failed, hardware error 0x80000021"
Date: Mon, 24 Jun 2013 15:30:49 +0300 [thread overview]
Message-ID: <20130624123049.GH18508@redhat.com> (raw)
In-Reply-To: <51C834A6.7030609@sp.consulting.lsexperts.de>
On Mon, Jun 24, 2013 at 01:59:34PM +0200, Stefan Pietsch wrote:
> On 24.06.2013 13:47, Gleb Natapov wrote:
> > On Mon, Jun 24, 2013 at 01:43:26PM +0200, Stefan Pietsch wrote:
> >> On 23.06.2013 19:36, Gleb Natapov wrote:
> >>> On Sun, Jun 23, 2013 at 06:51:30PM +0200, Stefan Pietsch wrote:
> >>>> On 23.06.2013 09:51, Gleb Natapov wrote:
> >>>>> On Thu, Jun 20, 2013 at 07:01:49PM +0200, Stefan Pietsch wrote:
> >>>>>>> Can you provide the output of 25391454e73e3156202264eb3c473825afe4bc94
> >>>>>>> and emulate_invalid_guest_state=0. Also run "x/20i $pc-20" in qemu
> >>>>>>> monitor after the hang.
> >>>>>>
> >>>>>>
> >>>>>> 25391454e73e3156202264eb3c473825afe4bc94
> >>>>>> emulate_invalid_guest_state=0
> >>>>>>
> >>>>> Very interesting. Looks like somewhere during TPR access FS
> >>>>> register gets corrupted. Can you remove /usr/share/kvm/kvmvapic.bin
> >>>>> and try again? This will disable some code paths during TPR access and
> >>>>> will narrow down the issue.
> >>>>
> >>>>
> >>>> Doing this, qemu complains
> >>>> "Could not open option rom 'kvmvapic.bin': No such file or directory",
> >>>> but the virtual machine boots successful with
> >>>> emulate_invalid_guest_state=0 and emulate_invalid_guest_state=1.
> >>>>
> >>> Hmm, I think we ate close. Can you try with upstream qemu?
> >>>
> >>>> kvmvapic.bin comes with Debian package "seabios 1.7.2-3".
> >>
> >> I already tried this with the Debian package qemu-kvm 1.5.0+dfsg-4.
> > And it didn't work? Mind trying some debug kernel patches? I suspect
> > your CPU does something no CPU I have do, so I want to verify it.
>
>
> As soon as I remove "kvmvapic.bin" the virtual machine boots with
> qemu-kvm 1.5.0. I just verified this with Linux kernel 3.10.0-rc5.
> "emulate_invalid_guest_state=0" or "emulate_invalid_guest_state=1" make
> no difference.
>
> Please send your patches.
Here it is, run with it and kvmvapic.bin present. See what is printed in
dmesg after the failure.
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index f4a5b3f..65488a4 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3385,6 +3385,7 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
u32 ar;
+ unsigned long rip;
if (vmx->rmode.vm86_active && seg != VCPU_SREG_LDTR) {
*var = vmx->rmode.segs[seg];
@@ -3408,6 +3409,9 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
var->db = (ar >> 14) & 1;
var->g = (ar >> 15) & 1;
var->unusable = (ar >> 16) & 1;
+ rip = kvm_rip_read(vcpu);
+ if ((rip == 0xc101611c || rip == 0xc101611a) && seg == VCPU_SREG_FS)
+ printk("base=%p limit=%p selector=%x ar=%x\n", var->base, var->limit, var->selector, ar);
}
static u64 vmx_get_segment_base(struct kvm_vcpu *vcpu, int seg)
--
Gleb.
next prev parent reply other threads:[~2013-06-24 12:31 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <518A7323.7000302@sp.consulting.lsexperts.de>
[not found] ` <1368061686.4131.225.camel@deadeye.wl.decadent.org.uk>
[not found] ` <518BF14E.3070509@sp.consulting.lsexperts.de>
[not found] ` <5194C254.4000201@sp.consulting.lsexperts.de>
2013-05-19 1:00 ` Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with "entry failed, hardware error 0x80000021" Ben Hutchings
2013-05-19 12:32 ` Gleb Natapov
2013-05-29 15:05 ` Stefan Pietsch
2013-05-29 17:20 ` Ben Hutchings
2013-06-05 11:57 ` Stefan Pietsch
2013-06-05 12:10 ` Gleb Natapov
2013-06-05 12:51 ` Stefan Pietsch
2013-06-06 6:42 ` Gleb Natapov
2013-06-06 7:20 ` Gleb Natapov
2013-06-06 11:35 ` Stefan Pietsch
2013-06-06 11:40 ` Gleb Natapov
2013-06-06 12:10 ` Stefan Pietsch
2013-06-09 9:43 ` Gleb Natapov
2013-06-13 11:57 ` Stefan Pietsch
2013-06-13 13:42 ` Paolo Bonzini
2013-06-13 13:46 ` Paolo Bonzini
2013-06-13 14:59 ` Stefan Pietsch
2013-06-16 0:25 ` Stefan Pietsch
2013-06-17 16:07 ` Paolo Bonzini
2013-06-18 16:35 ` Stefan Pietsch
2013-06-19 13:41 ` Gleb Natapov
2013-06-19 14:12 ` Stefan Pietsch
2013-06-19 14:38 ` Gleb Natapov
2013-06-20 17:01 ` Stefan Pietsch
2013-06-23 7:51 ` Gleb Natapov
2013-06-23 16:51 ` Stefan Pietsch
2013-06-23 17:36 ` Gleb Natapov
2013-06-24 11:43 ` Stefan Pietsch
2013-06-24 11:47 ` Gleb Natapov
2013-06-24 11:59 ` Stefan Pietsch
2013-06-24 12:30 ` Gleb Natapov [this message]
2013-06-24 20:42 ` Stefan Pietsch
2013-06-26 10:47 ` Gleb Natapov
2013-06-27 14:09 ` Stefan Pietsch
2013-06-27 20:01 ` Gleb Natapov
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=20130624123049.GH18508@redhat.com \
--to=gleb@redhat.com \
--cc=707257@bugs.debian.org \
--cc=ben@decadent.org.uk \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=stefan.pietsch@lsexperts.de \
/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