Skip to content

Use ioeventfd instead of VMExit for syscalls #9

@MatiasVara

Description

@MatiasVara

This issue shall replace the current mechanism of trapping syscalls that is based on a heavy VMExit with ioeventfd. By using this mechanism, the VMM will be notified asynchronously that the app requires a syscall. This happens when the app writes to a specific mmio register. This is the mechanism used in vhost and for the virtqueue notification. This seems to perform better than user-space VMExits. The new mechanism would be:

  1. app guest writes to special mmio reg
  2. Event is triggered in the thread that processes eventfd
  3. The thread processes the request and tells the app guest that is done
  4. app guest resumes execution. Here I am sure how the VMM should tell the guest that the syscall is done.

[1] see virtio_mmio_init_ioeventfd() at https://github.com/clearlinux/kvmtool/blob/b5891a4337eb6744c8ac22cc02df3257961ae23e/virtio/mmio.c
[2] see ioeventfd__add_event() at https://github.com/clearlinux/kvmtool/blob/master/ioeventfd.c
[3] http://blog.allenx.org/2015/07/05/kvm-irqfd-and-ioeventfd

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions