Avi Kivity wrote:
I'll also reply to this mail with a sample userspace so people can see how it works.
Attached is the source for a small library (libkvm.a) and a small test harness (kvmctl) plus a few tests (test/*). The only test which will work now is sieve.flat (I haven't used the tests since we got a real OS booting, and had to scrub it up a bit). The tests are currently only for x86_64.
The library is also used in our qemu patch (not included). I'll post that later on.
Basically, the library adds function wrappers around the ioctl()s, and converts exit reasons to callbacks, so the user need not code that large switch.
To try it, compile it, modprobe kvm, and ./kvmctl test/bootstrap test/sieve.flat"bootstrap" is a bit of code to take the machine to 32-bit nonpaged mode. sieve.flat will go into long mode and tell you some uninteresting facts about prime numbers.
-- error compiling committee.c: too many arguments to function
Attachment:
kvm-sample-userspace.tar.gz
Description: GNU Zip compressed data
- References:
- [PATCH 0/7] KVM: Kernel-based Virtual Machine (v2)
- From: Avi Kivity <[email protected]>
- [PATCH 0/7] KVM: Kernel-based Virtual Machine (v2)
- Prev by Date: Re: [PATCH] Thaw userspace and kernel space separately.
- Next by Date: Re: 3.2GHz cpus with cpufreq become 2.8GHz
- Previous by thread: [PATCH 13/13] KVM: plumbing
- Next by thread: Re: [PATCH 0/13] KVM: qemu patch
- Index(es):