Re: Tracing KVM with Systemtap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 22, 2010 at 1:11 PM, Rayson Ho <rho@xxxxxxxxxx> wrote:
> On Tue, 2010-09-21 at 14:33 +0100, Stefan Hajnoczi wrote:
>> > I will see what other probes are useful for the end users. Also, are
>> > there developer documentations for KVM? (I googled but found a lot of
>> > presentations about KVM but not a lot of info about the internals.)
>>
>> Not really.  I suggest grabbing the source and following vl.c:main()
>> to the main KVM execution code.
>
> I was looking for the hardware interfacing code earlier this morning --
> QEMU has the hardware specific directories (e.g. target-i386/ ,
> target-ppc/ ), and I was trying to understand the execution environment
> when the host and guest are running on the same architecture.
>
> I believe cpu_gen_code() and other related functions are what I should
> dig into...

KVM does not generate code.  Almost all the "emulation" code in the
source tree is part of the Tiny Code Generator (TCG) used when KVM is
not enabled (e.g. to emulate an ARM board on an x86-64 host).

If you follow the life-cycle in vl.c it will take you through cpus.c
and into kvm-all.c:kvm_cpu_exec().  Note that the details differ
slightly between qemu.git and qemu-kvm.git, and I have described
qemu.git.

Stefan
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux