From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNdCQ-0006TZ-Md for qemu-devel@nongnu.org; Sun, 22 Sep 2013 02:31:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VNdCK-00080V-ON for qemu-devel@nongnu.org; Sun, 22 Sep 2013 02:31:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNdCK-000809-HL for qemu-devel@nongnu.org; Sun, 22 Sep 2013 02:31:12 -0400 Date: Sun, 22 Sep 2013 09:31:03 +0300 From: Gleb Natapov Message-ID: <20130922063103.GA25202@redhat.com> 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> <523B393F.10203@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <523B393F.10203@FreeBSD.org> Subject: Re: [Qemu-devel] in_asm substitute for accel=kvm:tcg List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andriy Gapon Cc: Paolo Bonzini , Andreas =?utf-8?Q?F=C3=A4rber?= , qemu-devel@nongnu.org On Thu, Sep 19, 2013 at 08:49:51PM +0300, Andriy Gapon wrote: > 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): Which kernel version is this? What BSD version? > ... > 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 -- Gleb.