Porting the QEMU Virtualization Software to MINIX 3

Porting the QEMU Virtualization Software to MINIX 3

Porting the QEMU virtualization software to MINIX 3 Master's thesis in Computer Science Erik van der Kouwe Student number 1397273 [email protected] Vrije Universiteit Amsterdam Faculty of Sciences Department of Mathematics and Computer Science Supervised by dr. Andrew S. Tanenbaum Second reader: dr. Herbert Bos 12 August 2009 Abstract The MINIX 3 operating system aims to make computers more reliable and more secure by keeping privileged code small and simple. Unfortunately, at the moment only few major programs have been ported to MINIX. In particular, no virtualization software is available. By isolating software environments from each other, virtualization aids in software development and provides an additional way to achieve reliability and security. It is unclear whether virtualization software can run efficiently within the constraints of MINIX' microkernel design. To determine whether MINIX is capable of running virtualization software, I have ported QEMU to it. QEMU provides full system virtualization, aiming in particular at portability and speed. I find that QEMU can be ported to MINIX, but that this requires a number of changes to be made to both programs. Allowing QEMU to run mainly involves adding standardized POSIX functions that were previously missing in MINIX. These additions do not conflict with MINIX' design principles and their availability makes porting other software easier. A list of recommendations is provided that could further simplify porting software to MINIX. Besides just porting QEMU, I also investigate what performance bottlenecks it experiences on MINIX. Several areas are found where MINIX does not perform as well as Linux. The causes for these differences are investigated. For practical usage, the difference is found to be small. Most bottlenecks can be resolved through minor changes and only one of the minor issues appears to be due to the microkernel design. This thesis does not only provide a report on my research about QEMU on MINIX, but also aims to provide information to those who intend to port software to MINIX. It contains a detailed report on the issues encountered while porting QEMU, so that others may avoid the pitfalls I found. As such, it can serve as a manual for porting projects. 2 Brief table of Contents 1 - Introduction...............................................................................................................................8 2 - Virtualization ...........................................................................................................................13 3 - Issues encountered and changes made ..................................................................................31 4 - How to use QEMU on MINIX ................................................................................................73 5 - Performance measurements ...................................................................................................81 6 - Conclusions ............................................................................................................................101 Bibliography.................................................................................................................................102 Appendix A - Contents of the CD-ROM ...................................................................................104 Appendix B - Performance measurements ...............................................................................106 3 Detailed table of Contents 1 - Introduction...............................................................................................................................8 1.1 - Context ...............................................................................................................................8 1.2 - Problem statement ............................................................................................................8 1.3 - MINIX ................................................................................................................................9 1.4 - QEMU.................................................................................................................................11 1.5 - Structure of this thesis .....................................................................................................12 2 - Virtualization ...........................................................................................................................13 2.1 - Introduction ......................................................................................................................13 What is virtualization?.........................................................................................................13 Why are virtual machines useful?........................................................................................13 Theoretical background.......................................................................................................14 2.2 - Possible approaches .........................................................................................................16 Dynamic Binary Translation................................................................................................16 Paravirtualization.................................................................................................................18 Previrtualization..................................................................................................................19 Operating system level partitioning...................................................................................20 Application virtual machine...............................................................................................20 Hardware supported............................................................................................................21 2.3 - QEMU implementation ..................................................................................................22 User-level memory management unit................................................................................23 Code generation...................................................................................................................24 No kernel-level components ..............................................................................................29 3 - Issues encountered and changes made ..................................................................................31 3.1 - General...............................................................................................................................31 3.2 - Changes made to MINIX .................................................................................................33 Addition of the setitimer function......................................................................................33 Implementation of the pread64 and pwrite64 functions..................................................36 Signal handling bug.............................................................................................................38 Use of the select function with the /dev/eth device..........................................................38 3.3 - Porting QEMU..................................................................................................................39 General remarks on porting software to MINIX................................................................39 Changes related to compilation..........................................................................................44 Changes related to code generation....................................................................................47 Changes related to networking...........................................................................................48 Miscellaneous changes........................................................................................................49 Missing functionality...........................................................................................................51 3.4 - Features added in QEMU for MINIX .............................................................................53 Curses support.....................................................................................................................53 Memory allocation recommendation.................................................................................53 Networking..........................................................................................................................54 Opcode histograms.............................................................................................................59 Running deterministically..................................................................................................60 Simple profiling of QEMU..................................................................................................62 3.5 - libSDL...............................................................................................................................62 4 The configure and configure.in files...................................................................................63 Changes to SDL files............................................................................................................63 Build file...............................................................................................................................64 3.6 -

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    110 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us