Re: Where is the entry point of hypercalls in kvm

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

 




Am 26.06.2010 um 20:17 schrieb Balachandar <bala1486@xxxxxxxxx>:

On Sat, Jun 26, 2010 at 5:19 AM, Alexander Graf <agraf@xxxxxxx> wrote:

On 26.06.2010, at 03:17, Balachandar wrote:

Hello,
I am trying to understand the virtio mechanism in linux. I read that the kick function will notify the host side about the newly published buffers. I am looking especially at virtio_net.Once a packet is ready
for transmission the kick function is called. From here i where does
it go? Which code contains the backend driver of virtio. Where is the
code in the hypervisor which this kick will go to? Thank you...

Device emulation is in qemu. See hw/virtio*.c.

Alex


Thank you.. I got it. Is there any documentation on internals of
qemu-kvm? I searched but could not find it.

Ug, good question. I don't know :).

I have some newbiesh
questions. Is the qemu-kvm being executed in the userspace of the
host? So when a kick function is encountered, it exits the VM through
a hypercall into the hypervisor, then the hypervisor hand over to
qemu-kvm in host userspace. Next after doing required the needed
things, the qemu-kvm transits to the hypervisor and then the
hypervisor back to the VM.

Yes.

So it means there are two system calls one
from VM-->Hypervisor and qemu-kvm-->Hypervosor? Are these the steps
that take place or i am wrong?

The logic is as follows:

ioctl(VCPU_RUN)
<guest runs>
<guest issues mmio on virtio device>
<kvm traps it, goes back to userspace>
<qemu-kvm handles it>
ioctl(VCPU_RUN)

If there is any documentation about
these kind of stuff, please give me the link. Thank you very much...

I guess the closest is Documentation/kvm in the linux source tree.

Alex


--
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