* Implement smp_call_function_mask() on x86_64 and use it in kvm_flush_remote_tlbs()

* Implement smp_call_function_mask() on x86_64 and use it in kvm_flush_remote_tlbs()

* Add "guest time" accounting to the scheduler. Currently guest time is accounted as system time.

* Add "guest time" accounting to the scheduler. Currently guest time is accounted as system time.

+

** tip: count guest time as both system time and guest time so that an unmodified 'top(1)' will show guest time as system time. A modified 'top(1)' can subtract guest time from system time to get the correct value.

* vmx_load_host_state() bundles fs, gs, ldt, and tss reloading into one in the hope that it is infrequent. With smp guests, fs reloading is frequent and the separate reloads should be unbundled.

* vmx_load_host_state() bundles fs, gs, ldt, and tss reloading into one in the hope that it is infrequent. With smp guests, fs reloading is frequent and the separate reloads should be unbundled.

Revision as of 11:32, 5 August 2007

TODO

The following items need some love. Please post to the list if you are interested in helping out:

Real mode support: VT support for real mode is terrible, so we need to do it in software. This means extending the x86 emulator (x86_emulate.c) to handle more instructions, and changing the execution loop to call the emulator for real mode (in progress).

Move the apic/ioapic/pic/pit emulation into the kernel. This will simplify in-kernel paravirtualized devices (as there is no need to exit to userspace to inject an interrupt) and guest SMP (in progress).

Implement smp_call_function_mask() on x86_64 and use it in kvm_flush_remote_tlbs()

Add "guest time" accounting to the scheduler. Currently guest time is accounted as system time.

tip: count guest time as both system time and guest time so that an unmodified 'top(1)' will show guest time as system time. A modified 'top(1)' can subtract guest time from system time to get the correct value.

vmx_load_host_state() bundles fs, gs, ldt, and tss reloading into one in the hope that it is infrequent. With smp guests, fs reloading is frequent and the separate reloads should be unbundled.

The following smaller scale tasks can be a nice entry point to someone wishing to get involved:

The spinlock->mutex conversion exposes many possiblities of code simplifications, where previously atomic context is now regular code.

Store command line options in an empty snapshot in a qcow2 format image file. This allows an image file to be self contained: qemu file.img should be enough to launch a fully configured virtual machine.

Allow all cpuid features supported by kvm to be passed to the guest; add a command line option to specifiy the cpuid explicitly to allow migration in a heterogeneous server farm.

MMU related:

Attach kvm memory to a Linux address_space so that guest memory can be paged out (patch exists for alternative approach to guest paging).

Support large pages (in conjunction with the item above) so that if the guest uses a large page mapping and the guest memory is backed by hugetlbfs, a large-page pte is created.

Currently, the emulator is called twice for each instruction that reads mmio memory: once to fetch the operand

and once to execute. Split the emulator into two functions: one to decode into the emulation context, and
the other to actually execute the instruction.

Interactivity improvements:

If for several frames in a row a large proportion of the framebuffer pages are

changing, then for the next few frames don't bother to get the dirty page log
from kvm, but instead assume that all pages are dirty. This will reduce page
fault overhead on highly interactive workloads.

When detecting keyboard/video/mouse activity, scale up the frame rate; when

activity dies down, scale it back down (applicable to qemu as well).

For the adventurous:

Emulate the VT and SVM instructions, so that kvm can run in a virtual machine. Test by running a VM in a VT guest in an SVM guest on VT hardware, as well as running a VM in an SVM guest in a VT guest on SVM hardware.

Emulate the VT and SVM instruction sets on qemu. This would be very beneficial to debugging kvm.