1 / 32

Xen and the Art of Virtualization

Xen and the Art of Virtualization. Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, Andrew Warfield. Apology / Disclaimer. Why Virtualise?. Consolidate machines Isolate performance Stay flexible. HARDWARE. ???. HARDWARE. Linux.

betha
Download Presentation

Xen and the Art of Virtualization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Xen and the Art of Virtualization Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, Andrew Warfield

  2. Apology / Disclaimer

  3. Why Virtualise? • Consolidate machines • Isolate performance • Stay flexible

  4. HARDWARE

  5. ??? HARDWARE

  6. Linux WinXP ??? HARDWARE

  7. Linux WinXP Mirage ??? HARDWARE

  8. Linux WinXP Mirage Virtual Machine Monitor HARDWARE

  9. How to Build a VMM 1: Emulation EMULATOR PROCESS “Physical” memory Guest App Guest App Virtual MMU Virtual System Calls Guest Kernel Virtual CPU Normal OS HARDWARE

  10. How to Build a VMM 2: Trap and Emulate Guest App Guest Kernel EMULATOR PROCESS “Physical” memory Virtual MMU Virtual System Calls Normal OS HARDWARE

  11. How to Build a VMM 2: Trap and Emulate Guest App Guest Kernel EMULATOR PROCESS add %eax, %ebx “Physical” memory Virtual MMU Virtual System Calls Normal OS HARDWARE

  12. How to Build a VMM 2: Trap and Emulate Guest App Guest Kernel EMULATOR PROCESS outb %al “Physical” memory Virtual MMU Virtual System Calls Normal OS HARDWARE

  13. How to Build a VMM 2: Trap and Emulate Guest App Guest Kernel EMULATOR PROCESS outb %al “Physical” memory Virtual MMU Virtual System Calls Normal OS HARDWARE

  14. How to Build a VMM 2: Trap and Emulate Guest App Guest Kernel EMULATOR PROCESS handle_sysenter sysenter “Physical” memory Virtual MMU Virtual System Calls Normal OS HARDWARE

  15. How to Build a VMM 2: Trap and Emulate • for(i = 0; i < 256; i++) • mangle_pagetable_entry(&ptes[i]); • 256 traps into the emulator • Severe performance penalty

  16. How to Build a VMM 3: Dynamic Binary Translation Rewritten Guest App Rewritten Guest Kernel TRANSLATOR PROCESS “Physical” memory Virtual MMU Virtual System Calls Normal OS HARDWARE

  17. How to Build a VMM 3: Dynamic Binary Translation • for(i = 0; i < 256; i++) • mangle_pagetable_entry(&ptes[i]);

  18. How to Build a VMM 3: Dynamic Binary Translation • pte_t new_ptes[256]; • for(i = 0; i < 256; i++) • new_ptes[i] = mangled_entry(&ptes[i]); • register_new_ptes(new_ptes, 256); • But when is this a safe alteration?

  19. How to Build a VMM 4: Xen • Q. But when is this a safe alteration? • A. Let the humans worry about that. • Manually hack the OS: “paravirtualisation”.

  20. Xen: Founding Principles • Minimally alter guest OS • Don't disguise multiplexing • Thusly, be faster than the competition

  21. VMWare Memory Management VAS Pages “Physical” frames

  22. VMWare Memory Management VAS Pages “Physical” frames Page Table

  23. VMWare Memory Management VAS Pages Physical frames Page Table (not really)

  24. VMWare Memory Management VAS Pages Physical frames Shadow Page Table

  25. Xen Memory Management VAS Pages Physical frames

  26. Xen Memory Management VAS Pages Physical frames Page Table

  27. VMWare I/O “Physical” Memory “I/O Ports” NE2000 Model Rubbish NIC One op at a time Shared buffers “Device” Memory “Device” Ports

  28. Xen I/O Own Memory Hypervisor Async Queue --> <-- Async Queue Packet

  29. Xen I/O Own Memory Hypervisor Async Queue --> <-- Async Queue Packet

  30. Xen I/O Own Memory Hypervisor Async Queue --> <-- Async Queue Buffer

  31. Strawman Warning • VMWare does that too • “Guest additions” are basically paravirt

  32. Is it Any Good?

More Related