source: trunk/packages/xen-common/xen-common/tools/firmware/README @ 34

Last change on this file since 34 was 34, checked in by hartmans, 17 years ago

Add xen and xen-common

File size: 3.3 KB
Line 
1Domain firmware support
2-----------------------
3
4One of the key advantages of full virtualization hardware support (such
5as Intel's VT or AMD's SVM extensions) is the ability to run unmodified
6guest operating systems.  However, since most OSes rely on BIOS support
7during their early bringup, we need to provide a surrogate ROMBIOS and
8VGABIOS firmware layer.
9
10What's more, we need to support real-mode which is required by
11the firmware and bootstrap loaders. Real-mode support is especially
12challenging for Intel's VMX (VT) enabled CPUs where there is no real-mode
13support for VMX guest partitions. In this case you either have to do full
14emulation (full real-mode emulator; more complete but potentially slower)
15or partial emulation (use the VM8086 extensions, emulate only those
16instructions that are missing; faster, but potentially incomplete). The
17vmxassist code in this subdirectory uses the later approach because it
18is smaller and faster.
19
20The approach is relatively straight forward. Vmxloader contains three
21payloads (rombios, vgabios and vmxassist) and it is bootstrapped as any
22other 32-bit OS. Vmxloader copies its payloads to the addresses below
23and transfers control to vmxassist.
24
25        vgabios         VGABIOS (standard and Cirrus).
26                        Resides at C000:0000.
27
28        vmxassist       VMXAssist VM86 realmode emulator for VMX.
29                        Resides at D000:0000.
30
31        rombios         ROMBIOS code. Derived from Bochs.
32                        Resides at F000:0000
33
34Vmxassist first sets up it own world (GDT, IDT, TR, etc), enables
35VM8086 and then transfers control to F000:FFF0 and executes 16-bit
36code. Unsupported instructions cause a general protection failure at
37which point vmxassist kicks in and emulates the offending instruction.
38Whever the emulated code transitions to 32-bit protected mode, vmxassist
39will go away. Whenever 32-bit protected code transitions to real-mode,
40Xen/VMX will detect this and transfer control to vmxassist.
41
42Most of the vmxassist complexity comes from properly handling the
43real to protected mode and protected to real mode transitions and
44the proper emulation of the segment registers. Even though the Intel
45manual clearly states that you should immediately perform a jmp far
46after a mode transition, many operating systems execute additional
47instructions and some even refer to segment selectors and pop data
48from the stack. Vmxassist contains a number of work arounds for these
49OSes.
50
51
52Acknowledgements
53----------------
54
55The rombios was taken (largely unmodified) from Bochs, which was written
56by Kevin Lawton. The VGABIOS was written by Christophe Bothamy. Arun Sharma,
57Asit Mallick and Nitin Kamble (Intel) provided the E820 patches and lots
58of useful feedback.
59
60
61Contact
62-------
63
64Leendert van Doorn
65IBM T.J. Watson Research Center
6619 Skyline Drive
67Hawthorne, NY 10532
68leendert@watson.ibm.com
69
70
71Tested Operating Systems
72------------------------
73
74Since vmxassist uses partial emulation, it may always miss opcodes
75that are required by a particular OS. The table below lists the OSes
76I have tried.  The Install column indicates a full CD/DVD install into
77a VMX partition. The Disk column indicates booting from prefabricated
78disk image.
79
80Operating System                        Install         Disk
81------------------------------------------------------------
82RedHat Enterprise Linux (RHEL3_U5)      Yes             Yes
83Fedora Code (FC3)                       (-)             Yes
84FreeBSD 5.3                             (-)             Yes
85MS-DOS 5.0                              (-)             Yes
86
87(-) not tried yet
88
Note: See TracBrowser for help on using the repository browser.