I am using libvirt with qemu-kvm to manage virtual machines. The guest makes a vmcall which I want to be notified of, e.g. via a callback function. I know it's possible with 'pure' KVM, but does the libvirt API provide functions to handle a vmcall (or other vm exits)?


1 Answer 1


A 'vmcall' is a low level instruction for a guest to trap into the hypervisor and as such will always be handled by KVM and/or QEMU. It is not visible to mgmt software like libvirt or anything above that. If you want the guest to interact with mgmt software on the host it is better to use a higher level communications channel. Assuming networking is not an option, then virtio-serial provides a simple stream for apps to use. This is what guest services like the QEMU guest agent, and SPICE agent use to talk to the host.

  • Thanks, I thought so. Are the virtio-serial ports secure tough? But yes you are correct, I need a way to talk to the host. Apr 23, 2018 at 9:04
  • Anyways I am using virtio now. Thanks for the pointer Apr 23, 2018 at 9:58
  • A virtio-serial device is secure - only the guest to which it is assigned can use it, and of course the host. Nothing off-host, nor other guests can see it. So to snoop on it you would have to be root in the host, which is already a privileged account.
    – DanielB
    May 3, 2018 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.