KVM - The Linux Kernel-Based Virtual Machine
News, Blogs and Resources on the Linux (KVM) Kernel-Based Virtual Machine

A question regarding the KVM hypercall mechanism

No replies
eviatarkhen
Offline
Joined: Sep 5 2010
Points: 3

Hello all,
I'm not sure I understood the KVM hypercall mechanism(linux on x86).
I understood that a hypercall is preformed with the instruction:
.byte 0x0f,0x01,0xc1
after putting the hypercall index on a register.
I guess that this instruction would cause a trap to the kernel, but from there on I haven't understood what's going on. How does the OS knows to attach this instruction to the hypervisor(so he could know what was is the hypercall and preform it)?
With "usual" traps (like system calls) a register is being updated so the OS would know what was the request, but it doesn't seem the case here...
If someone could shortly clear this for me, it would be a great help. In addition I would love to know why this specific instruction is being used and not some other trapping instruction.

Thank you and best regards,

Evi

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.