"Please find the attached complete description of assignment."
This lab assignment covers hypervisors (Xen and KVM) and hypercalls, the “standard?? way for a guest operating system to interact with the VMM (Virtual Machine Manager).
KVM is a hypervisor that is included in all recent Linux kernels (recent = something released in the last year or so). Therefore, all of its functionality is available “out-of-the-box?? on most reasonable Linux [login to view URL] for Xen exist in many Linux kernels, but currently it does not ship as part of the standard Linux kernel.
Assignment:
Both Xen and KVM offer a facility called hypercalls, which allows a guest operating system/environment to communicate with them (KVM and Xen) directly. A guest operating system might use these hypercalls for various reasons, including:
• Ascertain the version of the VMM they are running on
• Communicate with other guests in other domains (logical partitions)
• Perform actions otherwise prohibited by the VMM (setting various privileged registers, etc)
Your assignment is to research the particular hypervisor product and implement a new hypercall, callable from the guest environment. What this new hypercall does is irrelevant ??" you can have it just return a string saying “Hello World?? if you want. The goal of the assignment is to familiarize you with how VMMs operate and how they communicate with their guests.
Start by choosing either Xen or KVM and researching how their hypercalls are implemented. Next, locate this code in the Linux kernel (or NetBSD if you chose Xen and decided to go that way). Add a new hypercall to the list and rebuild your kernel.
Next, install or configure a virtual guest environment (how you do this depends on which VMM you
chose).
## Deliverables
The Assignment:
Both Xen and KVM offer a facility called hypercalls, which allows a guest operating system/environment to communicate with them (KVM and Xen) directly. A guest operating system might use these hypercalls for various reasons, including:
• Ascertain the version of the VMM they are running on
• Communicate with other guests in other domains (logical partitions)
• Perform actions otherwise prohibited by the VMM (setting various privileged registers, etc)
Your assignment is to research the particular hypervisor product and implement a new hypercall, callable from the guest environment. What this new hypercall does is irrelevant ??" you can have it just return a string saying “Hello World?? if you want. The goal of the assignment is to familiarize you with how VMMs operate and how they communicate with their guests.
Start by choosing either Xen or KVM and researching how their hypercalls are implemented. Next, locate this code in the Linux kernel (or NetBSD if you chose Xen and decided to go that way). Add a new hypercall to the list and rebuild your kernel.
Next, install or configure a virtual guest environment (how you do this depends on which VMM you
chose). Once that is installed and running, make an application (or driver) that calls your new hypercall and verify that it works.
The Questions:
1. Comment in detail on the variety of hypercalls available in the hypervisor you chose. What types of actions do they allow? What types of actions could you conceive of that would be useful to guest
operating systems?
2. Based on your research, what additional hypercalls could be provided/implemented to improve
performance of guest environments, assuming you had access to OS source code? What if you did not have access to OS source code?
3. In the hypervisor architecture you chose, what is the mechanism by which a guest environment initiates a hypercall? What are the performance implications for this mechanism?