Features/KVMNestedVirtualizationTestsuite: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 38: | Line 38: | ||
= Project status = | = Project status = | ||
The project is currently in development. Mini hypervisor is | The project is currently in development. | ||
Mini hypervisor is almost finished, and the relevant VMX instructions test cases are involved. Patches are in RFC status. | |||
= Patches accepted = | = Patches accepted = |
Revision as of 09:58, 16 July 2013
Notice
This a GSoC 2013 project accepted by QEMU.org, you can also see my proposal.
Summary
Provide a test suite of nested virtualization for KVM in kvm-unit-tests. It provides a test platform for nested virtualization, including a hypervisor and the link script to integrate current test suites.
Owner
- Name: Arthur Chunqi Li
- Email: yzt356@gmail.com
Locations
Feature
This module of kvm-unit-tests aims at providing a suite of test cases for nested virtualization. It consists of two parts:
- A mini hypervisor
- Some relevant test cases specified for nested virtualization in KVM
Some codes of current kvm-unit-tests can be reused in the two parts above, e.g. link script to generate flat image. Some specific features will be listed here.
Mini hypervisor
A mini hypervisor is the basis of testing nested virtualization. Here is a mini hypervisor written in C++ named NOVA. But the mini hypervisor neeeded in this project doesn't need so many complicated features (e.g. Buddy system). Only CPU management, memory management, interrupt control and simple communication (hypercall) are necessary.
Now the first patch of hypervisor is on the way with my own tests. Anyone is welcome to review the codes and comments on it. Just checkout the git repository cited above and execute "git checkout v1.0". The mainly part is located in x86/vmx.c and x86/vmx.h. When executing this test case in kvm (e.g. run via kvm-unit-tests/x86-run) you should add -cpu Nehalem,+vmx option (or other types of Intel CPU) to the command line to support nested virtualization environment.
Nested virtualization test cases
On the basis of mini hypervisor, some nested virtualization features should be tested including VMX insructions, MSR, memory access and VM-enter & VM-exit tests. Some of test cases are have implemented in the current kvm-unit-tests and can be imported in some special ways.
Project status
The project is currently in development. Mini hypervisor is almost finished, and the relevant VMX instructions test cases are involved. Patches are in RFC status.
Patches accepted
- [PATCH v2 1/2] KVM : Change location of 3 functions in vmx.c [1]
- Previous version : v1
- [PATCH v2 2/2] KVM : Set success rflags when emulate VMXON/VMXOFF in nested virt [2]
- Previous version : v1
- [PATCH v4] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt [3]
Patches on the way
- [Qemu-devel] [PATCH] nVMX: Initialize IA32_FEATURE_CONTROL MSR in reset and migration [4]
- [PATCH] KVM: nVMX: Set segment infomation of L1 when L2 exits [5]
- [PATCH] kvm-unit-tests : The first version of VMX nested test case [6]