Ewan Mellor [Thu, 22 Mar 2007 14:31:03 +0000 (14:31 +0000)]
Update VM's VCPU handling to match the documentation wrt VCPUs_max and
VCPUs_at_startup. Add VM.set_VCPUs_number_live, VM.add_to_VCPUs_params_live,
VM_metrics.VCPUs_{CPU,flags,params}.
Use these new calls to implement xm vcpu-list and xm sched-credit through
the Xen-API. Mark a number of other calls as unimplemented through that API.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com> Signed-off-by: Ewan Mellor <ewan@xensource.com>
Hollis Blanchard [Wed, 21 Mar 2007 22:03:00 +0000 (17:03 -0500)]
[POWERPC][LIBXC] Remove Prose builder.
It is no longer being maintained and probably shouldn't have existed in the
first place, since it was almost identical to xc_linux_build.c. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Tim Deegan [Wed, 21 Mar 2007 17:17:08 +0000 (17:17 +0000)]
[XEN] Shadow: check the _PAGE_PRESENT bit in fast-path MMIO shadow ptes
otherwise the fast-path code is not safe against some kinds of
concurrent shadow updates. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Ewan Mellor [Wed, 21 Mar 2007 12:03:42 +0000 (12:03 +0000)]
Change xm dmesg -c so that it prints out the current buffer as well as clearing
it. This avoids a race so that you don't lose messages, matches the behaviour
of the hypercall, and the Unix dmesg command.
Change the Xen-API binding to use a separate function host.dmesg_clear rather
than a flag on host.dmesg.
Ewan Mellor [Tue, 20 Mar 2007 15:12:07 +0000 (15:12 +0000)]
Add VIF.runtime_properties dictionary, and use that to implement xm network-list
through the Xen-API. Implement xm network-attach and xm network-detach also.
Ewan Mellor [Tue, 20 Mar 2007 11:45:44 +0000 (11:45 +0000)]
Add VBD.runtime_properties dictionary, and use that to implement xm block-list
through the Xen-API. Implement xm block-attach and xm block-detach also.
Ian Campbell [Tue, 20 Mar 2007 14:33:15 +0000 (14:33 +0000)]
[XEN] Implement faster int 0x80 handling for compat mode guests.
Using the GPF handler to spot the software interrupt and pass it back
to the guest increases the base syscall time by a factor of 2.7
compared with 32on32 using direct trap to ring 1. (0.3270->0.8680
microseconds, measured with lmbench lat_syscall).
Since the 64 bit IDT can only contain 64 bit segment selectors we
cannot trap directly to compat mode ring 1. However implementing a
dedicated 64 bit ring 0 trap handler allows us to avoid much of the
GPF handler overhead and reduces the overhead to 1.7 times
(0.3270->0.5497 microseconds).
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Mark McLoughlin [Tue, 20 Mar 2007 11:10:52 +0000 (11:10 +0000)]
Don't mount raw blktap disks for pygrub
Currently, we mount all blktap disks for pygrub so that it can boot
from e.g. QCOW images. However, since pygrub will handle a raw image
just fine without mounting through blktap, we shouldn't bother in that
case.
Also, it looks like XendDomainInfo.create_vbd() takes the full disk
uname rather than the image path.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
hvm: Do not save/restore shared_info gpfn location.
Instead of kludging a max_gpfn estimate in shared_info, add a new
XENMEM command to discover the actual maximum gpfn value as known by
the shadow code.
This needs to be more robust when we support HVM ballooning in future
anyway. One interesting point is that max_gpfn may be close to 4GB
even for small-memory HVM guests since for example SVGA LFB is mapped
into the I/O hole. We may need to special case the I/O hole somehow,
or provide some finer-grained way to find out which parts of the GPFN
space are actually used (e.g., get Xen to fill in a bitmap with 1 bit
per 1024 pages, or similar).
Tim Deegan [Mon, 19 Mar 2007 16:28:24 +0000 (16:28 +0000)]
[SVM] Move vmcb setup code for AP bringup out of the launch path
and into the earlier AP bringup code. This stops it from resetting
the VCPUs of SMP guests into real mode on restore or migrate.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
The frequency of HPET device model is defined to be the same as TSC's,
but this doesn't work well with calibrate_tsc_hpet() in Linux kernel
2.6.16-33, causing some IA32 Linux HVM guests to failt o boot.
Calibrate_tsc_hpet() tries to figure out how many HPET ticks a TSC
cycle equals; it magnifies the result by scale of 2^32, trying to get
a more accurate result since it assumes the frequency of HPET in real
world is usually less than 1/100 of TSC, so the result of "(2^32 *
hpet_freq) / tsc_freq" may exceed 32bits, then a "divide error
(overflow)" would occur!
The result doesn't overflow every time because hpet_freq/tsc_freq may
less than 1.0 due to the little inaccuracy in the implementation of
HVM timer virtualization.
The arguments to this macro didn't have parentheses around them where
they were used. If a call to a TRACE macro included an expression as
an argument, the cast to (unsigned long) could bind to just part of
the expression and lead to unexpected results.
Signed-off-by: Michael Vrable <mvrable@cs.ucsd.edu>
Keir Fraser [Sun, 18 Mar 2007 18:26:34 +0000 (18:26 +0000)]
xend: Avoid use of 'k' specifier to Py_BuildValue(). Its
implementation is broken until Python v2.4.3. Instead cast the C value
to long long and use the 'L' specifier. Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sun, 18 Mar 2007 16:49:52 +0000 (16:49 +0000)]
xend: Fix Py_BuildValue() invocation (don't use I specifier).
Various error-handlign cleanup and fix a reference leakage. Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 17 Mar 2007 12:04:48 +0000 (12:04 +0000)]
Xen and tools now require gcc 3.4+ on x86.
- gcc-3.2 cannot handle some multi-line assertions in the Xen
sources. Noone noticed.
- gcc-3.3 has problems with alignment constraints inside typedefs.
gcc 3.4.0 is now three years old so I hope that everyone has an
up-to-date compiler, or can obtain a more up-to-date package for their
distribution. If not we may need to fall back to supporting gcc-3.3.x
as well.
Also clean up the way we do version checks, using the power of awk.
Tim Deegan [Fri, 16 Mar 2007 11:41:10 +0000 (11:41 +0000)]
[HVM][SVM] Save/restore: save the guest's versions of CR0 and EFER
and recalculate the vmcb ones on restore Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Tim Deegan [Fri, 16 Mar 2007 11:39:50 +0000 (11:39 +0000)]
[HVM][QEMU] Save/restore: enable HVM live migration
by getting page-dirtying bitmaps from qemu-dm as well as from xen. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
minios: Fix an extern declaration and add an extra 'const' to
definition of a constant set of constant error strings.
Issues identified by Armand Puccetti. Signed-off-by: Keir Fraser <keir@xensource.com>
- Add a missing break into the switch statement
- Simplify the code that switches from protected mode into real mode
by letting it spill eax; this also fixes the case where the stack is
above 0xffff.
- reformat the source for 80 columns
- remove some comments that were relevant when the TCG extensions were
direct part of the real-mode Bochs BIOS
Add boot option to allow console I/O to be placed into ring buffer
This option allows console I/O to be placed into the hypervisor
console ring buffer. When enabled, all output to the console
device will be reflected in the ring buffer. When disabled (the
default), only hypervisor output is available from the ring buffer.