210 likes | 647 Views
XEN – ARM port. CS523 Midterm Presentation Michael LeMay Dongyun Jin Sundeep Reddy Brian Schoudel I2CS. Phase #1. Compile ARM/Linux Familiarized us with QEMU and ARM architecture Necessary, since Xen hosts Linux guest OSs Outcomes/deliverables:
E N D
XEN – ARM port CS523 Midterm Presentation Michael LeMay Dongyun Jin Sundeep Reddy Brian Schoudel I2CS
Phase #1 • Compile ARM/Linux • Familiarized us with QEMU and ARM architecture • Necessary, since Xen hosts Linux guest OSs • Outcomes/deliverables: • Instructions for building Linux kernel and software packages for ARM on QEMU • Instructions for using NFS from within ARM/Linux on QEMU
QEMU system emulator • http://www.qemu.org • Processor emulator including support for ARM Integrator/CP • ARM1026EJ-S processor • Achieves good performance through dynamic translation • Open source emulator
QEMU stumbling blocks • QEMU mailing lists are unresponsive • Paul Brook was personally very helpful, however • Only offers support for ARM1026EJ-S processor, not newer ARMv6 series • Doesn’t support VGA, causes Linux to crash if VGA enabled in kernel config • Enabled verbose kernel messages to detect error
ARM Linux Compilation • Cross compiler needed for any XEN, Linux compilations involving the ARM architecture • Downloaded from CodeSourcery: http://www.codesourcery.com/gnu_toolchains/arm/download.html • Supports new ARM EABI • Used kernel patches from arm.com, and compiled Linux v.2.6.16-rc3-xen for ARM • Xen support disabled
ARM Linux System Creation • Arm.com provides filesystem construction scripts • Contains precompiled version of busybox, ftp, etc. • Produces cramfs system image, loaded as ramdisk during QEMU/ARM bootup
ARM and NFS • Client-Server model – server exports filesystem to client • QEMU emulates network card on Integrator • Host system acts as server • Emulated Linux system running on QEMU acts as client • Provides the means to install software and transfer files after booting up Linux on QEMU • Should be possible to boot directly from NFS root fs, but difficult on QEMU (received strange error) • Works under ARM Linux! • We created script to install proper /etc/fstab in cramfs system image produced previously
Demonstration • Connect to Michael’s home server • Run QEMU with ARM/Linux • Connect to NFS server • Transfer file between AMD64/Linux server and ARM/Linux client
Phase #2 • Port Xen hypervisor to ARM • This is the bottom layer in the Xen architecture • First software to boot on system
Beginnings • Based on Xen 3.0.1 • Based on Linux 2.6.12 kernel • Supports IA32, IA32 PAE, AMD64, IA64 • Doesn’t include any support for ARM
Xen Source Layout • xen-3.0.1 • buildconfigs: Makefiles • docs: Documentation • extras • mini-os: Minimal OS used for testing • linux-2.6-xen-sparse: Sources for stripped-down dom0 and domU • patches: Patches for full Linux sources • tools: Large collection of tools to run on dom0 • xen: Hypervisor sources
Xen Source Layout (cont.) • xen • acm: sHype mandatory access control • arch: Architecture-specific implementation • ia64: Itanium sources • x86: IA32, IA32 PAE, and AMD64 sources • common: Architecture-independent sources • drivers: Common drivers for ACPI and console • include: Include files • tools: Figlet, for making block letter ASCII art, and other simple tools
Modifications • Copied IA64-specific directories to form ARM-specific directories • IA64 is simpler and better-organized than x86 • Copied ARM-specific architectural implementation files from Linux 2.6.16-rc3-xen into xen/arch • Copied ARM headers from Linux into include/asm-arm • Modified Makefile rules to use CodeSourcery cross-compilers and pass proper flags
Challenges/Successes • Large base of architecture-specific C code • Wanted to have hypervisor booted by this time, but simply too large a job • Everything in xen directory compiles, except most of arch subdirectory • Many warnings, undoubtedly many problems to resolve after compilation completes
Remaining Work • Compile remaining files in arch subdirectory • Will involve substantial porting effort • Resolve problems with final executable • Port Linux guest OS to form dom0 and domU, using ARM/Linux experience acquired earlier
Anticipated Difficulties • ARM has only two protection rings, not four as is the case in x86 and IA64 • AMD64 only has two rings as well, perhaps we can learn from their modifications • ARM has fairly unique MMU architecture • ARM does not provide a timestamp counter, but the clocks Xen provides are based upon such a counter