From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMiNS-00081i-Qs for qemu-devel@nongnu.org; Thu, 19 Sep 2013 13:51:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMiNK-0001SZ-Rd for qemu-devel@nongnu.org; Thu, 19 Sep 2013 13:50:54 -0400 Received: from citadel.icyb.net.ua ([212.40.38.140]:3826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMiNK-0001SN-DZ for qemu-devel@nongnu.org; Thu, 19 Sep 2013 13:50:46 -0400 Message-ID: <523B393F.10203@FreeBSD.org> Date: Thu, 19 Sep 2013 20:49:51 +0300 From: Andriy Gapon MIME-Version: 1.0 References: <52383EED.6080602@FreeBSD.org> <52384BF6.5030302@suse.de> <52386855.7080106@FreeBSD.org> <20130917184954.GA5657@redhat.com> <523B0BE0.90102@FreeBSD.org> <523B2C06.3060309@redhat.com> In-Reply-To: <523B2C06.3060309@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] in_asm substitute for accel=kvm:tcg List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Gleb Natapov , qemu-devel@nongnu.org on 19/09/2013 19:53 Paolo Bonzini said the following: > Il 19/09/2013 16:36, Andriy Gapon ha scritto: >> Not sure how the code ends up at 0x9315 after that. > > Events are dropped, probably corresponding to more emulation. I've got a trace without dropped events between the last "normal" instruction and the loop (and also including a snippet where the same code is executed without a problem): ... qemu-system-x86-12024 [003] 278157.048876: kvm_emulate_insn: 0:9366:b1 10 (prot32) qemu-system-x86-12024 [003] 278157.048877: kvm_entry: vcpu 0 qemu-system-x86-12024 [003] 278157.048878: kvm_emulate_insn: 0:9368:8e d1 (prot32) qemu-system-x86-12024 [003] 278157.048880: kvm_entry: vcpu 0 qemu-system-x86-12024 [003] 278157.048882: kvm_exit: reason CR_ACCESS rip 0x9312 info 0 0 qemu-system-x86-12024 [003] 278157.048883: kvm_cr: cr_write 0 = 0x10 qemu-system-x86-12024 [003] 278157.048885: kvm_entry: vcpu 0 qemu-system-x86-12024 [003] 278157.048886: kvm_emulate_insn: 0:9315:ea 1a 93 00 00 (real) qemu-system-x86-12024 [003] 278157.048887: kvm_entry: vcpu 0 qemu-system-x86-12024 [003] 278157.048888: kvm_emulate_insn: 0:931a:31 c0 (real) ... ... qemu-system-x86-12024 [003] 278157.048990: kvm_set_irq: gsi 4 level 0 source 0 qemu-system-x86-12024 [003] 278157.048991: kvm_pic_set_irq: chip 0 pin 4 (edge|masked) qemu-system-x86-12024 [003] 278157.048992: kvm_ioapic_set_irq: pin 4 dst 0 vec=0 (Fixed|physical|edge|masked) qemu-system-x86-12024 [003] 278157.049001: kvm_entry: vcpu 0 qemu-system-x86-12024 [003] 278157.049002: kvm_exit: reason IO_INSTRUCTION rip 0x1e675 info 3fd0008 0 qemu-system-x86-12024 [003] 278157.049005: kvm_emulate_insn: a000:1e675:ec (prot32) qemu-system-x86-12024 [003] 278157.049005: kvm_pio: pio_read at 0x3fd size 1 count 1 qemu-system-x86-12024 [003] 278157.049006: kvm_userspace_exit: reason KVM_EXIT_IO (2) qemu-system-x86-12024 [003] 278157.049024: kvm_entry: vcpu 0 qemu-system-x86-12024 [003] 278157.049027: kvm_exit: reason CR_ACCESS rip 0x9312 info 0 0 qemu-system-x86-12024 [003] 278157.049028: kvm_cr: cr_write 0 = 0x10 qemu-system-x86-12024 [003] 278157.049030: kvm_entry: vcpu 0 qemu-system-x86-12024 [003] 278157.049031: kvm_emulate_insn: 0:9315: (real) qemu-system-x86-12024 [003] 278157.049033: kvm_emulate_insn: 0:9315: (real) qemu-system-x86-12024 [003] 278157.049034: kvm_emulate_insn: 0:9315: (real) ... It's strange that no instruction gets reported in those repeating "0:9315: (real)" lines. It's like kvm is somehow losing track of what should be executed and just loops over the same ip without actually doing anything. -- Andriy Gapon