ia64/xen-unstable

view tools/examples/xmexample.hvm-stubdom @ 19648:f0e2df69a8eb

x86 hvm: Allow cross-vendor migration

Intercept #UD and emulate SYSCALL/SYSENTER/SYSEXIT as necessary.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue May 26 15:01:36 2009 +0100 (2009-05-26)
parents c6b7c6a3e5b3
children bda5ab0cb387
line source
1 # -*- mode: python; -*-
2 #============================================================================
3 # Python configuration setup for 'xm create'.
4 # This script sets the parameters used when a domain is created using 'xm create'.
5 # You use a separate script for each domain you want to create, or
6 # you can set the parameters for the domain on the xm command line.
7 #============================================================================
8 #
9 # This is a version using a stubdomain for device model
10 # The differences with xmexample.hvm are marked with "STUBDOM"
12 #----------------------------------------------------------------------------
13 # Kernel image file.
14 kernel = "/usr/lib/xen/boot/hvmloader"
16 # The domain build function. HVM domain uses 'hvm'.
17 builder='hvm'
19 # Initial memory allocation (in megabytes) for the new domain.
20 #
21 # WARNING: Creating a domain with insufficient memory may cause out of
22 # memory errors. The domain needs enough memory to boot kernel
23 # and modules. Allocating less than 32MBs is not recommended.
24 memory = 128
26 # Shadow pagetable memory for the domain, in MB.
27 # If not explicictly set, xend will pick an appropriate value.
28 # Should be at least 2KB per MB of domain memory, plus a few MB per vcpu.
29 # shadow_memory = 8
31 # A name for your domain. All domains must have different names.
32 name = "xmexample.hvm"
34 # 128-bit UUID for the domain. The default behavior is to generate a new UUID
35 # on each call to 'xm create'.
36 #uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b9"
38 #-----------------------------------------------------------------------------
39 # The number of cpus guest platform has, default=1
40 #vcpus=1
42 # Enable/disable HVM guest PAE, default=1 (enabled)
43 #pae=1
45 # Enable/disable HVM guest ACPI, default=1 (enabled)
46 #acpi=1
48 # Enable/disable HVM APIC mode, default=1 (enabled)
49 # Note that this option is ignored if vcpus > 1
50 #apic=1
52 # List of which CPUS this domain is allowed to use, default Xen picks
53 #cpus = "" # leave to Xen to pick
54 #cpus = "0" # all vcpus run on CPU0
55 #cpus = "0-3,5,^1" # all vcpus run on cpus 0,2,3,5
56 #cpus = ["2", "3"] # VCPU0 runs on CPU2, VCPU1 runs on CPU3
58 # Optionally define mac and/or bridge for the network interfaces.
59 # Random MACs are assigned if not given.
60 #vif = [ 'type=ioemu, mac=00:16:3e:00:00:11, bridge=xenbr0, model=ne2k_pci' ]
61 # type=ioemu specify the NIC is an ioemu device not netfront
62 vif = [ 'type=ioemu, bridge=xenbr0' ]
64 #----------------------------------------------------------------------------
65 # Define the disk devices you want the domain to have access to, and
66 # what you want them accessible as.
67 # Each disk entry is of the form phy:UNAME,DEV,MODE
68 # where UNAME is the device, DEV is the device name the domain will see,
69 # and MODE is r for read-only, w for read-write.
71 disk = [ 'file:/var/images/min-el3-i386.img,hda,w', 'phy:/dev/cdrom,hdc:cdrom,r' ]
73 #----------------------------------------------------------------------------
74 # Configure the behaviour when a domain exits. There are three 'reasons'
75 # for a domain to stop: poweroff, reboot, and crash. For each of these you
76 # may specify:
77 #
78 # "destroy", meaning that the domain is cleaned up as normal;
79 # "restart", meaning that a new domain is started in place of the old
80 # one;
81 # "preserve", meaning that no clean-up is done until the domain is
82 # manually destroyed (using xm destroy, for example); or
83 # "rename-restart", meaning that the old domain is not cleaned up, but is
84 # renamed and a new domain started in its place.
85 #
86 # In the event a domain stops due to a crash, you have the additional options:
87 #
88 # "coredump-destroy", meaning dump the crashed domain's core and then destroy;
89 # "coredump-restart', meaning dump the crashed domain's core and the restart.
90 #
91 # The default is
92 #
93 # on_poweroff = 'destroy'
94 # on_reboot = 'restart'
95 # on_crash = 'restart'
96 #
97 # For backwards compatibility we also support the deprecated option restart
98 #
99 # restart = 'onreboot' means on_poweroff = 'destroy'
100 # on_reboot = 'restart'
101 # on_crash = 'destroy'
102 #
103 # restart = 'always' means on_poweroff = 'restart'
104 # on_reboot = 'restart'
105 # on_crash = 'restart'
106 #
107 # restart = 'never' means on_poweroff = 'destroy'
108 # on_reboot = 'destroy'
109 # on_crash = 'destroy'
111 #on_poweroff = 'destroy'
112 #on_reboot = 'restart'
113 #on_crash = 'restart'
115 #============================================================================
117 # Device Model to be used
118 #
119 # STUBDOM: this is a script that creates the stub domain running the device
120 # model
121 device_model = '/usr/lib/xen/bin/stubdom-dm'
123 #-----------------------------------------------------------------------------
124 # boot on floppy (a), hard disk (c), Network (n) or CD-ROM (d)
125 # default: hard disk, cd-rom, floppy
126 boot="cda"
128 #-----------------------------------------------------------------------------
129 # write to temporary files instead of disk image files
130 #snapshot=1
132 #----------------------------------------------------------------------------
133 # enable SDL library for graphics, default = 0
134 #
135 sdl=0
137 #----------------------------------------------------------------------------
138 # enable OpenGL for texture rendering inside the SDL window, default = 1
139 # valid only if sdl is enabled.
140 #
141 opengl=1
143 #----------------------------------------------------------------------------
144 # enable VNC library for graphics, default = 1
145 vnc=1
147 #----------------------------------------------------------------------------
148 # address that should be listened on for the VNC server if vnc is set.
149 # default is to use 'vnc-listen' setting from /etc/xen/xend-config.sxp
150 #vnclisten="127.0.0.1"
152 #----------------------------------------------------------------------------
153 # set VNC display number, default = domid
154 #vncdisplay=1
156 #----------------------------------------------------------------------------
157 # try to find an unused port for the VNC server, default = 1
158 #vncunused=1
160 #----------------------------------------------------------------------------
161 # enable spawning vncviewer for domain's console
162 # (only valid when vnc=1), default = 0
163 #vncconsole=0
165 #----------------------------------------------------------------------------
166 # set password for domain's VNC console
167 # default is depents on vncpasswd in xend-config.sxp
168 vncpasswd=''
170 #----------------------------------------------------------------------------
171 # no graphics, use serial port
172 #nographic=0
174 #----------------------------------------------------------------------------
175 # enable stdvga, default = 0 (use cirrus logic device model)
176 stdvga=0
178 #-----------------------------------------------------------------------------
179 # serial port re-direct to pty deivce, /dev/pts/n
180 # then xm console or minicom can connect
181 #
182 # STUBDOM: always disable as the stub domain doesn't have access to dom0's
183 # ptys
184 #serial='pty'
187 #-----------------------------------------------------------------------------
188 # Qemu Monitor, default is disable
189 # Use ctrl-alt-2 to connect
190 #monitor=1
193 #-----------------------------------------------------------------------------
194 # enable sound card support, [sb16|es1370|all|..,..], default none
195 #
196 # STUBDOM: not supported
197 #soundhw='sb16'
200 #-----------------------------------------------------------------------------
201 # set the real time clock to local time [default=0 i.e. set to utc]
202 #localtime=1
205 #-----------------------------------------------------------------------------
206 # set the real time clock offset in seconds [default=0 i.e. same as dom0]
207 #rtc_timeoffset=3600
209 #-----------------------------------------------------------------------------
210 # start in full screen
211 #full-screen=1
214 #-----------------------------------------------------------------------------
215 # Enable USB support (specific devices specified at runtime through the
216 # monitor window)
217 #usb=1
219 # Enable USB mouse support (only enable one of the following, `mouse' for
220 # PS/2 protocol relative mouse, `tablet' for
221 # absolute mouse)
222 #usbdevice='mouse'
223 #usbdevice='tablet'
225 #-----------------------------------------------------------------------------
226 # Set keyboard layout, default is en-us keyboard.
227 #keymap='ja'
229 #-----------------------------------------------------------------------------
230 # Configure guest CPUID responses:
231 #
232 #cpuid=[ '1:ecx=xxxxxxxxxxx00xxxxxxxxxxxxxxxxxxx,
233 # eax=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ]
234 # - Unset the SSE4 features (CPUID.1[ECX][20-19])
235 # - Default behaviour for all other bits in ECX And EAX registers.
236 #
237 # Each successive character represent a lesser-significant bit:
238 # '1' -> force the corresponding bit to 1
239 # '0' -> force to 0
240 # 'x' -> Get a safe value (pass through and mask with the default policy)
241 # 'k' -> pass through the host bit value
242 # 's' -> as 'k' but preserve across save/restore and migration
243 #
244 # Expose to the guest multi-core cpu instead of multiple processors
245 # Example for intel, expose a 8-core processor :
246 #cpuid=['1:edx=xxx1xxxxxxxxxxxxxxxxxxxxxxxxxxxx,
247 # ebx=xxxxxxxx00010000xxxxxxxxxxxxxxxx',
248 # '4,0:eax=001111xxxxxxxxxxxxxxxxxxxxxxxxxx']
249 # - CPUID.1[EDX][HT] : Enable HT
250 # - CPUID.1[EBX] : Number of vcpus * 2
251 # - CPUID.4,0[EAX] : Number of vcpus * 2 - 1
252 #vcpus=8
253 #
254 # Example for amd, expose a 5-core processor :
255 # cpuid = ['1:ebx=xxxxxxxx00001010xxxxxxxxxxxxxxxx,
256 # edx=xxx1xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
257 # '0x80000001:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1x',
258 # '0x80000008:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxx001001']
259 # - CPUID.1[EBX] : Threads per Core * Cores per Socket (2 * #vcpus)
260 # - CPUID.1[EDX][HT] : Enable HT
261 # - CPUID.0x80000001[CmpLegacy] : Use legacy method
262 # - CPUID.0x80000008[ECX] : #vcpus * 2 - 1
263 #vcpus=5
264 #
265 # Downgrade the cpuid to make a better compatibility for migration :
266 # Look like a generic 686 :
267 # cpuid = [ '0:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0',
268 # '1:eax=0x06b1,
269 # ecx=xxxxxxxxxx0000xx00xxx0000000xx0,
270 # edx=xx00000xxxxxxx0xxxxxxxxx0xxxxxx',
271 # '4:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0',
272 # '0x80000000:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0']
273 # with the highest leaf
274 # - CPUID.0[EAX] : Set the highest leaf
275 # - CPUID.1[EAX] : 686
276 # - CPUID.1[ECX] : Mask some features
277 # - CPUID.1[EDX] : Mask some features
278 # - CPUID.4 : Reply like the highest leaf, in our case CPUID.3
279 # - CPUID.0x80000000 : No extension we are on a Pentium III, reply like the
280 # highest leaf (CPUID.3).
281 #
282 # Configure host CPUID consistency checks, which must be satisfied for this
283 # VM to be allowed to run on this host's processor type:
284 #cpuid_check=[ '1:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxx1xxxxx' ]
285 # - Host must have VMX feature flag set
286 #
287 # The format is similar to the above for 'cpuid':
288 # '1' -> the bit must be '1'
289 # '0' -> the bit must be '0'
290 # 'x' -> we don't care (do not check)
291 # 's' -> the bit must be the same as on the host that started this VM
294 #-----------------------------------------------------------------------------
295 # Configure PVSCSI devices:
296 #
297 #vscsi=[ 'PDEV, VDEV' ]
298 #
299 # PDEV gives physical SCSI device to be attached to specified guest
300 # domain by one of the following identifier format.
301 # - XX:XX:XX:XX (4-tuples with decimal notation which shows
302 # "host:channel:target:lun")
303 # - /dev/sdxx or sdx
304 # - /dev/stxx or stx
305 # - /dev/sgxx or sgx
306 # - result of 'scsi_id -gu -s'.
307 # ex. # scsi_id -gu -s /block/sdb
308 # 36000b5d0006a0000006a0257004c0000
309 #
310 # VDEV gives virtual SCSI device by 4-tuples (XX:XX:XX:XX) as
311 # which the specified guest domain recognize.
312 #
314 #vscsi = [ '/dev/sdx, 0:0:0:0' ]