All of lore.kernel.org
 help / color / mirror / Atom feed
* QEMU KVM tracing and KVM toggling
@ 2014-03-13 19:27 Michał Matoga
  2014-03-15 17:00 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Matoga @ 2014-03-13 19:27 UTC (permalink / raw)
  To: kvm

Hi,

I'm working on system calls tracing using QEMU KVM.

1. Is it possible to force emulation of instructions when VM is running? 
Then I might be able to enable/disable KVM acceleration whenever I want to.

2. I know I can get full trace from QEMU without KVM (log in_asm). For 
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 collect 
KVM events (https://www.dropbox.com/s/nhvtztzilvepwt0/kvm.log) but KVM 
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?

Regards,
Michał


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: QEMU KVM tracing and KVM toggling
  2014-03-13 19:27 QEMU KVM tracing and KVM toggling Michał Matoga
@ 2014-03-15 17:00 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2014-03-15 17:00 UTC (permalink / raw)
  To: Michał Matoga, kvm

Il 13/03/2014 20:27, Michał 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 running?
> Then I might be able to enable/disable KVM acceleration whenever I want to.
>
> 2. I know I can get full trace from QEMU without KVM (log in_asm). For
> 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 collect
> KVM events (https://www.dropbox.com/s/nhvtztzilvepwt0/kvm.log) but KVM
> 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 
running would be hundreds of times slower than execution on the actual 
processor.  It's simply too slow.

If you run QEMU with "-cpu host", you can use "perf" in the guest to see 
what's happening.  Of course it will only be a statistical profile, not 
the full trace.

Paolo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-15 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-13 19:27 QEMU KVM tracing and KVM toggling Michał Matoga
2014-03-15 17:00 ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.