Development
Xen and the new processors
Virtualization addresses the problem of making more efficient use of available computer resources. This is done by providing an abstraction layer which maps real resources to virtual resources. Virtualization solutions have existed for more than forty years. For example, the IBM VM/370 project from the early sixties used virtualization to expose a virtual System/370 machine to the user. There are a wealth of virtualization technologies for the Linux platform: QEMU, BOCHS, OpenVZ, coLinux, Xen, and a lot more. In this article we will focus on Xen and the Virtualization Extensions found in new processors.On x86 processors, when running in protected mode, there are four privilege levels. The operating system kernel executes in privilege level 0 (also called "supervisor mode") while applications execute in privilege level 3. Privilege levels 1 and 2 are not used. When the processor detects a privilege level violation, it generates a general-protection violation.
When using virtual machine extensions, there are two classes of software: VMM (Virtual Machine Monitor), also known as "hypervisor", and Guests, which are virtual machines. VMM acts as a host and has a full access to the hardware. Each Guest virtual machine operates independently of the others.
In the Xen project, running on x86 processors, the guest operating systems run in privilege level 1. The guest operating system code has been modified to support virtualization. There is no need to modify applications and they run in privilege level 3 as in the usual case. Naturally, many will prefer a situation where the guest operating system code does not need to be modified. As a result, hardware manufacturers like Intel and AMD have begun to develop processors with built-in virtualization extensions. With these processors, the guest operating system code stays unmodified.
Intel has developed the VT-x technology for x86 processor. This technology provides hardware virtualization extensions. There are some VT-x processors already available in the market. For more details on Intel Virtualization Specification for the IA32 see this document [PDF].
With Intel's VT-x, the VMM runs in "VMX root operation mode" while the guests (which are unmodified OSes) run in "VMX non-root operation mode". While running in this mode, the guests are more restricted; some instructions, like RDMSR, WRMSR and CPUID, will cause a "VM exit" to the VMM. VM exit is a transition from non-root operation to root operation. Some instructions and exceptions will cause a "VM exit" when the configured conditions are met. Xen handles the VM exit in a manner that is specific to to the particular exception.
To implement this hardware virtualization, Intel added a new structure called VMCS (Virtual Machine Control Structure), which handles much of the virtualization management functionality. This structure contains the exit reason in the case of a VM exit. Also, 10 new instruction opcodes were added in VT-x. These new opcodes manage the VT-x virtualization behavior. For example, the VMXON instruction starts VMX operation, the VMREAD instruction reads specified field from the VMCS and the VMWRITE instruction writes specified field to the VMCS. When a processor operates in "VMX root operation mode" its behavior is much like when it operates in normal operating mode. However, in normal operating mode these ten new opcodes are not available.
Intel recently published its VT-d (Intel(r) Virtualization Technology for Directed I/O). VT-d enables I/O devices to be directly assigned to virtual machines. It also defines DMA remapping logic that can be configured for an individual device. There is also a cache called an IOTLB which improves performance. for more details see Intel's documentation [PDF].
In AMD's SVM ("Secure Virtual Machine), there is something quite similar, but the terminology is a bit different: We have Host Mode and Guest Mode. The VMM runs in Host Mode and the guests run in Guest Mode. In Guest Mode, some instructions cause VM EXIT, which is handled in a manner that is specific to the way Guest Mode is entered.
AMD added a new structure called the VMCB (Virtual Machine Control Block) which handles much of the virtualization management functionality. The VMCB includes an exit reason field which is read when a VM EXIT occurs. AMD added eight new instruction opcodes to support SVM. For example, the VMRUN instruction starts the operation of a guest OS, the VMLOAD instruction loads the processor state from the VMCB and the VMSAVE instruction saves the processor state to the VMCB. For more details see the AMD64 Architecture Programmer's Manual [PDF]: Vol 2 System Programming, chapter 15,"Secure Virtual Machine".
AMD is supposed to release its first processors with virtualization support in June, 2006.
AMD has published its I/O virtualization technology specification (IOMMU); AMD CPUs with this IOMMU support should be available in 2007. The AMD IOMMU technology intercepts devices access to memory. It finds out to which guest a particular device is assigned, and decides whether access is permitted and the actual address is available in system memory (page protection and address translation). You can think of AMD IOMMU as providing two facilities for AMD processors: The Graphics Aperture Remapping Table (GART) and the Device Exclusion Vector (DEV). In the AMD IOMMU there is optional support for IOTLBs. For more details see: AMD I/O virtualization technology (IOMMU) specification Rev 1.00 [PDF].
Starting at the end of January 2006, the Xen unstable repository has offered support for both Intel and AMD processors with virtualization extensions. Since there is much in common between AMD and Intel, a common API which is termed HVM (Hardware Virtual Machine) was developed. For example, HVM defines a table called hvm_function_table, which is a structure containing functions that are common to both Intel VT-x and AMD SVM. These methods are implemented differently in the VT-x and AMD SVM trees. Another example of a common method for VT-x and SVM is the domain builder method, xc_hvm_build(). (domain is a guest).
With Xen running on non-virtualized processors, there is a device model which is based on backend/frontend virtual drivers (also called "split drivers"). The backend is in domain 0, while the frontend is in the unprivileged domains. They communicate via an interdomain event channel and a shared memory area which is allocated from grant tables.
Only domain 0 has access to the hardware through the unmodified Linux drivers. When running on VT-x or SVM, we cannot use this IO model, because the guests run unmodified Linux kernels. So Both VT-x and SVM use the emulated device subsystem of QEMU for their I/O. QEMU runs in Xen as a userspace process. Using QEMU has a performance cost, so, in the future, it is possible that QEMU will be replaced by a better performing solution. It is however, important to understand that an IOMMU layer, even one which is built according to the new AMD or Intel specs, cannot in itself be a replacement for QEMU, because the same device may need to be shared between multiple domains.
As was mentioned above, there are many common things between Intel VT-x and AMD SVM (like usage of QEMU and the common API which HVM abstracts). However, there are some differences; for example:
- The AMD SVM uses a tagged TLB; this means
that they use an ASID (Address Space Identifier) to distinguish
between host-space entries from guest-space entries.
By using this identifier, we don't have to perform a TLB flush when
there is a context switch between guest and host.
This significantly reduces the number of TLB flushes.
A TLB flush slows the system because after a TLB flush occurs,
subsequent accesses to memory will require a full page table lookup.
- In order to boot an Intel VT-x machine you need an hvmloader (which was called vmxloader in the past). According to the VT-x spec, guest OSes cannot operate in real mode. Using a Linux loader to load a guest OS is impossible because it starts in real mode. To solve this problem, a vmxloader was written for VT-x guests. This loader uses the VM86 mode of the processor to run the OS boot loader. AMD SVM, on the other hand, supports real-mode for guests, so it does not need the VM86 mode of the hvmloader.
Thanks to Mat Petersson from AMD for reviewing this article.
System Applications
Database Software
MySQL 5.0.21 has been released
Version 5.0.21 of the MySQL database is available. "This is a bugfix release for the current production release family. This MySQL 5.0.21 release includes the patches for recently reported security vulnerabilites in the MySQL client-server protocol."
PostgreSQL Weekly News
The April 30, 2006 edition of the PostgreSQL Weekly News is online with the latest PostgreSQL database articles and resources.Advanced MySQL Replication Techniques (O'Reilly)
Giuseppe Maxia discusses database replication issues on O'Reilly. "You may know about the MySQL Cluster, which is a complex architecture to achieve high availability and performance. One of the advantages of MySQL Cluster is that each node is a peer to the others, whereas in a normal replicating system you have a master and many slaves, and applications must be careful to write only to the master."
LDAP Software
LAT 1.1.1 announced
Version 1.1.1 of LAT, the LDAP Administration Tool, is out. "This release is the 2nd of the 1.1.x development cycle which will eventually become v1.2. If you need a stable release stick with the 1.0 branch."
Libraries
XCB preview release is available
The 0.9 preview version of XCB, the planned replacement for Xlib, is out. XCB includes xcb-proto 0.9, libxcb 0.9, xcb-util 0.1 and xcb-demo 0.9. "The XCB library provides an interface to the X Window System protocol, slated to replace the current Xlib interface."
Web Site Development
Apache 2.2.2 released
Version 2.2.2 of the Apache HTTP server is out. "This release has been through extensive testing, including live at some of the world's busiest sites, and is now considered stable. This means that modules and applications developed for Apache 2.2.2 will be both source- and binary-compatible with future 2.2.x releases. This release builds on and extends the Apache 2.0 API. Modules written for Apache 2.0 will need to be recompiled in order to run with Apache 2.2, but no substantial reworking should be necessary." See the new features document for more information.
Midgard 1.8 alpha 2 released
Version 1.8 alpha 2 of Midgard, a web Content Management System, is out. "The Midgard Project has released the second alpha release version for the upcoming 1.8 stable branch of the Midgard Open Source Content Management System. Midgard's 1.8 branch focus on improved stability for Midgard2 technology preview features introduced in 1.7 branch. This release is adressed for Midgard developers and users who already use configured Midgard development environments."
Desktop Applications
Audio Applications
Ardour 0.99.3 released
Version 0.99.3 of Ardour, a multi-track audio editor, has been announced. "Continuing in the tradition of releasing stability fixes for the gtk1-based Ardour, here is 0.99.3."
Desktop Environments
GNOME 2.15.1 Development Release (GnomeDesktop)
GnomeDesktop has announced the release of the GNOME 2.15.1 development release. "Welcome to the new GNOME development cycle! Please fasten your seat belt: you're going to see a lot of exciting new changes!, new features!, new bugfixes!, new translations!, new documentations!. Lots of modules have great plans for 2.16 and if you're willing to help, there's a lot of areas where you'll be heartily welcomed!"
GARNOME 2.15.1 announced
Version 2.15.1 of GARNOME, the bleeding-edge GNOME distribution, is out. "This release includes all of GNOME 2.15.1 plus a whole bunch of updates that were released after the GNOME freeze date. This release is for anyone who wants to get his hands dirty on the development branch, or who'd like to get a peek at future features. If you want to help spot issues in GARNOME, (or, better yet, fix 'em ;-) this release is for you as well."
GNOME Software Announcements
The following new GNOME software has been announced this week:- Beagle 0.2.6 (bug fixes)
- cairo snapshot 1.1.4 (new printing API, bug fixes)
- gcalctool 5.8.10 (new feature)
- GDM2 2.14.5 (security and bug fixes, translation work)
- GDM2 2.15.0 (unstable release, new features)
- GLib 2.11.0 (unstable development release)
- Gossip 0.11 (new features and bug fixes)
- GQ LDAP client 1.0.0 (new features and bug fixes)
- GShare 0.90 (new application)
- Hearts for GNOME (new game)
- Pango-1.12.2 (bug fixes)
- vte 0.12.1 (bug fixes)
KDE Software Announcements
The following new KDE software has been announced this week:- Beesoft Commander 2.19 (new features)
- Beesoft Commander 2.20 (new features)
- Debian Installed Package Information 0.1 (new release)
- Diamond Crush 0.1 (first playable release)
- ipodslave 0.7.3 (bug fixes)
- KAlgebra 0.5 (new features, bug fixes and translation work)
- Katalog 0.4 (migration to database)
- KatchTV 20 (unspecified)
- KBibTeX 0.1.4 (new features and bug fixes)
- kdesvn 0.8.3 (bug fixes)
- knoda 0.8.1 (new features and bug fixes)
- KPowersave 0.6.0 (bug fixes and other improvements)
- KWlan 0.4.0 (new features and bug fixes)
- Peagle 0.2.1 (new features)
- Twinkle 0.7 (new features and bug fixes)
- YumKup 0.1 (initial release)
Electronics
pyspice.py 0.1 announced
The initial 0.1 release of pyspice has been announced. "pyspice.py is a SPICE pre-processor written in Python, inspired by the Perl SPICE pre-processor spicepp by John Sheahan."
Games
Getting the castle into the system (WorldForge)
A new castle has been added to the WorldForge virtual world project. "It has taken a lot of mangling, bug fixing, and even some new features, but I have finally got xrenmilays excellent keep model into the system. Here is a view in sear of the keep placed in a quiet valley in Moraf, just to the east of the pig sty."
GUI Packages
PyQt 4.0 beta 1 released
Version 4.0 beta 1 of PyQt, a set of Qt bindings for Python, is out. "PyQt v4 is implemented as a set of 8 extension modules containing approximately 400 classes and 6,000 functions and methods."
Interoperability
Wine Weekly Newsletter
The April 28, 2006 edition of the Wine Weekly Newsletter has been published. Topics include: News: Ulrich Czekalla, CrossOver Review, WineConf 2006, SambaXP & Wine, Summer of Code Kickoff, SoC: DIB Engine, SoC: Early Usage of DLLs, SoC: SafeDisc, SoC: Java Runtime Environment, SoC: finish wcmd, SoC: Better Valgrind Support and Font and Edit Control Issue.
Multimedia
Phonon: Multimedia in KDE 4 (KDE.News)
KDE.News covers the new Phonon project. "After many months of work on the new Multimedia API for KDE 4 it is time to finally announce Phonon. Phonon will provide a task oriented API for multimedia, making it easy for KDE applications to use media playback and capture functionality (and more) resulting in application developers being free to concentrate on the user interface aspects. The number of possibilities to integrate multimedia into the desktop experience make Phonon especially interesting."
Music Applications
flabc 0.2.0 announced
Version 0.2.0 of flabc, a musical notation editor that was programmed with FLTK, has been announced. "flabc is a kind of IDE for writing files in the abc music notation and includes playback and postscript score generation. It can be used as a frontend to different abc processing programs like abctab2ps and abc2midi."
Gneutronica 0.30 released
Version 0.30 of Gneutronica is available. "Gneutronica is a MIDI drum machine for Linux with a Gnome/GTK user interface which provides a means to easily create and play back drum tracks to MIDI devices (and to softsynths via snd_virmidi)."
Simple Sysexxer 0.1 announced
Version 0.1 of Simple Sysexxer has been announced. "Simple Sysexxer is a GUI sysex tool comparable to Sysexxer, but it's based on Qt4 (no KDE dependency) and ALSA only (no OSS dependency)." Sysex is the MIDI system exclusive message format that is used for storing MIDI device configurations.
Office Suites
OpenOffice.org Newsletter
The April 30, 2006 edition of the OpenOffice.org Newsletter is out with new OO.o office suite articles and events.
Science
Stellarium 0.8.0 released (SourceForge)
Version 0.8.0 of Stellarium, a desktop planetarium, is available with many new capabilities. "Stellarium, a desktop planetarium for your computer, reaches version 0.8.0. It is the result of 7 months of active development of the developers team."
Web Browsers
Places Disabled on Firefox 2 Development Branch (MozillaZine)
MozillaZine notes that the Places feature will be disabled in Firefox 2. "Places, the new bookmarks/history user interface, has been disabled on the Gecko 1.8 branch. As mentioned earlier, Firefox 2 will be shipped from this branch. The new mozStorage APIs, which use the sqlite database engine, will remain enabled and available to extension authors."
Miscellaneous
CastPodder 5.0 announced
Version 5.0 of CastPodder is available. "CastPodder is a media aggregator that automatically downloads podcasts to your computer or portable device, leaving you 'one click away' from the latest media feeds. It is based on the iPodder idea of Adam Curry. PyBMP is needed."
Languages and Tools
C
Portability and Pitfalls of C-Types (developerWorks)
IBM developerWorks looks at using types in C. "Effectively use the C type system, with help from Peter Seebach, as he covers Hungarian notation (the good kind and the bad kind), using typedef, portability issues, and major pitfalls."
Java
The Mustang Meets the Rhino: Scripting in Java 6 (O'ReillyNet)
John Ferguson Smart discusses scripting under Java SE 6. "Among Java SE 6's key features is the ability to mix scripting languages into Java code, thanks to the implementation of the JSR-223 spec. In this article, John Ferguson Smart takes a look at the spec and what it means for Java, and shows how to use Java 6's integrated Rhino implementation to call JavaScript from Java...and vice versa."
Lisp
SBCL 0.9.12 released
Version 0.9.12 of Steel Bank Common Lisp has been released. "This version provides new command line options, functions for sending data through UDP sockets, improvements to the Win32/x86 and Solaris/x86 ports, better documentation facilities, and more."
PHP
PHP 5.1.3 Released
Version 5.1.3 of PHP has been announced. "This release combines small number of feature enhancements with a significant amount of bug fixes and resolves a number of security issues. All PHP users are encouraged to upgrade to this release as soon as possible."
Python
Python 2.5 alpha 2 is available
Release 2.5 alpha 2 of Python has been announced. "This is an *alpha* release of Python 2.5. As such, it is not suitable for a production environment. It is being released to solicit feedback and hopefully discover bugs, as well as allowing you to determine how changes in 2.5 might impact you."
Urwid 0.9.4 released
Version 0.9.4 of Urwid, a console UI library for Python, is out. "This release adds mouse event handling to the standard widgets and example programs. Also, the files used to generate the reference and tutorial documentation are now included in the tarball."
Dr. Dobb's Python-URL!
The May 1, 2006 edition of Dr. Dobb's Python-URL! is online with a new collection of Python article links.
Tcl/Tk
Dr. Dobb's Tcl-URL!
The May 2, 2006 edition of Dr. Dobb's Tcl-URL! is online with new Tcl/Tk articles and resources.
XML
Microformats in Context (O'Reilly)
Uche Ogbuji looks at microformats on the O'Reilly XML.com site. "Uche Ogbuji takes a careful look at microformats and concludes that while, in practice, they suffer from serious non-trivial problems, the basic idea offers an interesting basis upon which to build interesting data formats, particularly in conjunction with complementary technologies."
IDEs
eric3 3.9.0 released
Version 3.9.0 of eric3, a Python and Ruby IDE, has been announced "This version includes support for Qt4 and PyQt4. It will be the last major release in the eric3 line of development. From now on the development effort will concentrate on eric4, the PyQt4 variant of the IDE."
Page editor: Forrest Cook
Next page:
Linux in the news>>