Tim Deegan [Mon, 26 Mar 2007 09:13:03 +0000 (09:13 +0000)]
[HVM] Intercept ACPI pm-timer registers
Bring the PM1a_STS and PM1a_EN registers into Xen and use them to deliver
SCI to the guest before it sees the MSB of the pm-timer change.
Also correct some of the semantics of the registers. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Tim Deegan [Fri, 23 Mar 2007 10:46:39 +0000 (10:46 +0000)]
Remove xc_shadow tool
It predates the current shadow architecture and only performs an explicitly
invalid shadow operation (on itself). Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Ewan Mellor [Thu, 22 Mar 2007 18:41:15 +0000 (18:41 +0000)]
Fix the parsing of the is_a_template and auto_power_on flags. Don't try to
read the disk size on create -- just pass -1 instead -- as the filename may
be munged on the server-side.
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.
[IA64] fix access rights in VHPT when itr.ar!=dtr.ar
This is a workaround patch for Windows 2003 Server.
Windows (vcpu>=2) set itr[1].ar=3(RWX) but dtr[1].ar=2(RW).
It causes an impossible INST_ACCESS_RIGHTS interruption via VHPT
which is used for emulating TR.
Surprisingly, windows ordinarily accepts this interruption.
But windows sometimes crashes with the message 'PANIC_STACK_SWITCH'
owing to this interruption.
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>