From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: QEMU KVM tracing and KVM toggling Date: Sat, 15 Mar 2014 18:00:19 +0100 Message-ID: <53248723.1010701@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE To: =?UTF-8?B?TWljaGHFgiBNYXRvZ2E=?= , kvm@vger.kernel.org Return-path: Received: from mail-ee0-f53.google.com ([74.125.83.53]:42942 "EHLO mail-ee0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754478AbaCORA3 (ORCPT ); Sat, 15 Mar 2014 13:00:29 -0400 Received: by mail-ee0-f53.google.com with SMTP id b57so1878589eek.12 for ; Sat, 15 Mar 2014 10:00:27 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Il 13/03/2014 20:27, Micha=C5=82 Matoga ha scritto: > > I'm working on system calls tracing using QEMU KVM. > > 1. Is it possible to force emulation of instructions when VM is runni= ng? > Then I might be able to enable/disable KVM acceleration whenever I wa= nt to. > > 2. I know I can get full trace from QEMU without KVM (log in_asm). Fo= r > example during booting kernel I collected log > (https://www.dropbox.com/s/ho7ykw1rc2tl4eb/qemu.log). Of course, when= I > enable KVM, this method will not work. I used trace-cmd tool to colle= ct > KVM events (https://www.dropbox.com/s/nhvtztzilvepwt0/kvm.log) but KV= M > log contains only functions emulated by QEMU. Is there a possibility = to > know what functions are executed natively in CPU when KVM is enabled = to > get something like "full" log from QEMU without KVM? No, neither is possible. Consider that forcing emulation while KVM is=20 running would be hundreds of times slower than execution on the actual=20 processor. It's simply too slow. If you run QEMU with "-cpu host", you can use "perf" in the guest to se= e=20 what's happening. Of course it will only be a statistical profile, not= =20 the full trace. Paolo