Q) Your assignment is to modify the CPUID emulation code in KVM to report back additional information when special CPUID leaf nodes are requested.
a) For CPUID leaf node %eax=0x4FFFFFFE:Return the number of exits for the exit number provided (on input) in %ecx. This value should be returned in %eax
b) For leaf nodes 0x4FFFFFFE, if %ecx (on input) contains a value not defined by the SDM, return 0 in all %eax, %ebx, %ecx registers and return 0xFFFFFFFF in %edx.
c) For exit types not enabled in KVM, return 0s in all four registers.
It should have a complete of Assignment-2 like below
-
Have VMFusion full setup with Ubuntu ISO image
-
It should have Linux kernal downloaded from github
-
Clone the kernel sources from the master Linux git repository: git clone https://github.com/torvalds/linux.git
-
Build the kernel, Install packages necessary to compile the Linux kernel from source:
-
Modify the kernel code with the assignment functionality: ◦
-
After changing the file , both in vmx.c and Cpuid.c file, compile it with make
-
By installing virtmanager, create a InnerVM with ubuntu ISO image and install cpuid package on ubuntu in inner VM
-
Create a user-mode program that performs various CPUID instructions required to test this assignment.
-
Following is the output
=====================================================================================
- Comment on the frequency of exits – does the number of exits increase at a stable rate? Or are there more exits performed during certain VM operations? Approximately how many exits does a full VM boot entail?
- Of the exit types defined in the SDM, which are the most frequent? Least?
We observed that the 5 most frequent exits are as follows:
- External interrupt
- CPUID
- HLT
- WRMSR
- CPT violation
There are many exits that are supported by KVM but didn't happend even once.
======================================================================================
-
Shivam Tomar(SJSU ID: 015218203)
Modified cpuid.c & vmx.c files according to assignment-3, Added nested virtualisation, Tested output
-
Srujana Koripalli(SJSU ID: 013859651)
Reasearched which code can be modified and whats required for assignment-3 . Tested Output