Skip to content

KVM userspace interface updates for 2.6.21

Avi Kivity kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6KVM: Add internal filesystem for generating inodesdrivers/kvm/kvm_main.c+32 -10 replies
2/6KVM: Create an inode per virtual machinedrivers/kvm/kvm_main.c include/linux/kvm.h+180 -420 replies
3/6KVM: Rename some kvm_dev_ioctl_*() functions to kvm_vm_ioctl_*()drivers/kvm/kvm_main.c+24 -240 replies
4/6KVM: Move kvm_vm_ioctl_create_vcpu() arounddrivers/kvm/kvm_main.c+51 -510 replies
5/6KVM: Per-vcpu inodesdrivers/kvm/kvm.h drivers/kvm/kvm_main.c drivers/kvm/svm.c +2 more+170 -1400 replies
6/6KVM: Bump API versioninclude/linux/kvm.h+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] KVM userspace interface updates for 2.6.21

The following patchset moves the kvm userspace interface from having a single fd, to having three types of file descriptors:

- one fd returned by open("/dev/kvm") is used for generic access to the kvm driver, for example to get the API version and to create virtual machines
- when you create a virtual machine, you get back an fd that can be used to control vm-wide aspects, like guest memory configuratio
- when you create a virtual cpu, you get an fd that can be used to control the vcpu, for example getting and setting registers, and if you're really serious, running the guest

The motivation for this change is twofold:
- prevent having a 'struct inode' and 'struct file' with different file operation callbacks
- prevent cacheline bouncing of the 'struct file' when we support guest smp (by giving each vcpu its own file structure)

A side effect is that the code becomes somewhat cleaner, due to the vcpu number not being passed around and validated.

The change was discussed on kvm-devel some time ago. Thanks to Arnd Bergmann for useful suggestions and to the epoll code for inspiration.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV