Contributing to KVM



I’m a computer engineering PhD student and I have the opportunity to
contribute something to KVM as a class project. I found a few
interesting items on the KVM TODO list ( that I could do. If I choose to
do this I would start immediately and have about 2 months to finish. I
wouldn’t choose this project if I thought I would have to rely on the
help of you guys, but I think my biggest challenge will be diving in and
getting started. Hopefully you can help with that.

My focus is on computer architecture so the x86 topics really interested
me. Here are the specific ones that I think I could do. I would start by
implementing one, and if that ends up not being substantial enough for a
final project, I’d do another.

  1. Improve mmu page eviction algorithm (currently FIFO, change to
    approximate LRU).
  2. On-demand register access, really, copying all registers all the
    time is gross.
  3. Implement mmx and sse memory move instructions; useful for guests
    that use multimedia extensions for accessing vga (partially done)
  4. Implement an operation queue for the emulator. The emulator often
    calls userspace to perform a read or a write, but due to inversion
    of control it actually restarts instead of continuing. The queue
    would allow it to replay all previous operations until it reaches
    the point it last stopped.
  5. convert more instructions to direct dispatch (function pointer in
    decode table)
  6. move init_emulate_ctxt() into x86_decode_insn() and other emulator
    entry points

I have some questions to help me get an idea for what each of these will
entail. Any other information you could share would be useful as well.

Have any of these already been implemented?

Which would you suggest as a feasible project?

Is using virt-test alone sufficient for testing?

What is “On-demand register access” and/or where is it implemented?

What’s been “partially done” for item 3?

What’s “direct dispatch” and/or where is it implemented?