qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Jordan Justen <jordan.l.justen@intel.com>,
	qemu-devel Developers <qemu-devel@nongnu.org>,
	Dunrong Huang <riegamaths@gmail.com>,
	Hannes Reinecke <hare@suse.de>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Jordan Justen <jljusten@gmail.com>
Subject: Re: [Qemu-devel] VM can not boot after commit 235e898
Date: Wed, 24 Jul 2013 19:17:42 +0300	[thread overview]
Message-ID: <20130724161742.GI6029@redhat.com> (raw)
In-Reply-To: <51EFF342.3090106@suse.de>

On Wed, Jul 24, 2013 at 05:31:14PM +0200, Alexander Graf wrote:
> On 07/24/2013 05:21 PM, Gleb Natapov wrote:
> >On Wed, Jul 24, 2013 at 05:16:09PM +0200, Paolo Bonzini wrote:
> >>Il 24/07/2013 11:58, Alexander Graf ha scritto:
> >>>>>No QEMU or kvm crashes, no error message printed, I mean it just hangs, even no BIOS information are printed.
> >>>>>And "top" shows QEMU consumes 100% cpu.
> >>>>>
> >>>>>When I define DEBUG_KVM in kvm-all.c, and run QEMU(this time I boot a normal OS disk),
> >>>>># x86_64-softmmu/qemu-system-x86_64 -enable-kvm -hda /mnt/nfs/Images/debian-append.img
> >>>>>kvm_init_vcpu
> >>>>>kvm_cpu_exec()
> >>>>>handle_io
> >>>>>handle_io
> >>>>>handle_io
> >>>>>handle_io
> >>>>>
> >>>>>Only 4 debug messages(handle_io) are printed, then nothing is shown, and "top" shows QEMU process uses 100% CPU.
> >>>After this we're running in an endless loop of:
> >>>
> >>>  qemu-system-x86-9298  [003] ...1 162090.918845: kvm_emulate_insn: f0000:c489:66 ea 91 c4 0f 00 08 00 (prot16)
> >>>  qemu-system-x86-9298  [003] d..2 162090.918846: kvm_entry: vcpu 0
> >>>
> >>>   (qemu) x /i $pc
> >>>   0x00000000000fc489:  ljmpl  $0x8,$0xfc491
> >>>
> >>>With current master, qemu-system-x86_64 -enable-kvm is broken on at least 3.7 kernels (openSUSE 12.3).
> >>>
> >>>Gleb, I don't remember all the glorious details of ljmpl, but would it have to raise an MMIO request for a read-only memory slot which it fails to do?
> >>The point of KVM_CAP_READONLY_MEM should be that it doesn't.
> >>
> >Yes, it should not. Can you provide complete trace of kvm and kvmmmu
> >event up until failure?
> 
> Sure! These are all trace events up to the loop that I was able to
> fetch from the "kvm" and "kvmmmu" event bucket in
> /sys/kernel/debug/tracing.
> 
You should start using trace-cmd :) It even disassembles for you.

>  qemu-system-x86-13150 [000] d..2 185370.441825: kvm_entry: vcpu 0
>  qemu-system-x86-13150 [000] d..2 185370.441826: kvm_exit: reason EXCEPTION_NMI rip 0xc486 info 0 80000b0d
>  qemu-system-x86-13150 [000] ...1 185370.441826: kvm_emulate_insn: f0000:c486:0f 22 c0 (real)
This mov CR0 that sets PE bit.

>  qemu-system-x86-13150 [000] d..2 185370.441829: kvm_entry: vcpu 0
>  qemu-system-x86-13150 [000] ...1 185370.441830: kvm_emulate_insn: f0000:c489:66 ea 91 c4 0f 00 08 00 (prot16)
Here jmp is emulated because vcpu state is invalid, but for some reason
emulation does not fail and does not succeed. Never saw such thing
before. Are you saying configuring BIOS memslot differently solves the
problem?
 
>  qemu-system-x86-13150 [000] d..2 185370.441833: kvm_entry: vcpu 0
>  qemu-system-x86-13150 [000] ...1 185370.441833: kvm_emulate_insn: f0000:c489:66 ea 91 c4 0f 00 08 00 (prot16)
>  qemu-system-x86-13150 [000] d..2 185370.441834: kvm_entry: vcpu 0
>  qemu-system-x86-13150 [000] ...1 185370.441835: kvm_emulate_insn: f0000:c489:66 ea 91 c4 0f 00 08 00 (prot16)
>  qemu-system-x86-13150 [000] d..2 185370.441835: kvm_entry: vcpu 0
>  qemu-system-x86-13150 [000] ...1 185370.441836: kvm_emulate_insn: f0000:c489:66 ea 91 c4 0f 00 08 00 (prot16)
>  qemu-system-x86-13150 [000] d..2 185370.441836: kvm_entry: vcpu 0

--
			Gleb.

  reply	other threads:[~2013-07-24 16:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04  3:47 [Qemu-devel] VM can not boot after commit 235e898 Dunrong Huang
2013-06-04  6:41 ` Jordan Justen
2013-06-04  7:46   ` Dunrong Huang
2013-06-04  6:47 ` Paolo Bonzini
2013-06-04  7:47   ` Dunrong Huang
2013-06-04  7:51     ` Gleb Natapov
2013-06-04  8:26       ` Dunrong Huang
2013-06-04 17:03         ` Jordan Justen
2013-06-05  2:44           ` Dunrong Huang
2013-06-05  7:34             ` Dunrong Huang
2013-07-24  9:58             ` Alexander Graf
2013-07-24 15:16               ` Paolo Bonzini
2013-07-24 15:21                 ` Gleb Natapov
2013-07-24 15:31                   ` Alexander Graf
2013-07-24 16:17                     ` Gleb Natapov [this message]
2013-07-24 16:26                       ` Alexander Graf
2013-07-24 16:53                         ` Gleb Natapov
2013-07-24 20:25                           ` Alexander Graf
2013-07-25 11:30                             ` Gleb Natapov
2013-07-24 20:34                           ` Andreas Färber

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=20130724161742.GI6029@redhat.com \
    --to=gleb@redhat.com \
    --cc=agraf@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=hare@suse.de \
    --cc=jljusten@gmail.com \
    --cc=jordan.l.justen@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riegamaths@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).