This disables superpage restore support, but should gain us acceptable
performance when restoring a domain using a pv_ops dom0 kernel. This
is because single-page allocations will be batched rather than issued
singly.
Keir Fraser [Thu, 10 Jun 2010 07:19:11 +0000 (08:19 +0100)]
x86 mce: Clean-up the mc_panic handler.
Firstly, mc_panic should only mc_panic in one CPU to avoid printk
output be mixed.
Secondly, call urgent handler in MCE panic to get error code specific
hander be involved.
Keir Fraser [Thu, 10 Jun 2010 07:18:46 +0000 (08:18 +0100)]
x86 mce: Clean Intel's MCE handler code
Add intel_mce_type check according to Intel's SDM.
Reduce intel_memerr_dhandler()'s indent to make code easily read. And
add a page_off action when we offline the page, so that dom0 can knows
about the action taken by xen hypervisor.
Add a default delay mce handler, which will crash if unknow SRAR error
or fatal error, otherwise, system continue.
Keir Fraser [Thu, 10 Jun 2010 07:18:11 +0000 (08:18 +0100)]
x86 mce: Make mce_action action be usable for both delayed handler and
urgent handler
Originally mce_action is called for delayed hander. Change it to be
used for both delayed handler and urgent handler.Wrap it with
mce_delayed_action for delay handler.
Change the return value to be more clearly.
Change the mca handler from mca_code to a function to be more
flexible. And change the interface to mce_handler to be mca_binfo to
pass more information.
Keir Fraser [Thu, 10 Jun 2010 07:17:38 +0000 (08:17 +0100)]
x86 mce: Clean-up intel mcheck_init
Cleanup intel_mcheck_init, also change the MCA capability check. We
will always use BSP's MCA capability as global value. If there are
some difference between BSP/AP, we will print warning.
Keir Fraser [Wed, 9 Jun 2010 06:51:31 +0000 (07:51 +0100)]
x86: add CMCI software injection interface
A new command is added. User can set the target CPU map, since the
CMCI can be triggered on some specific CPUs. Please be noticed that
the xenctl_cpumap structure is moved from domctl.h to xen.h.
Keir Fraser [Wed, 9 Jun 2010 06:42:19 +0000 (07:42 +0100)]
mce: Clean-up mcheck_init handler
Firstly and most importantly, the maxium MCA banks are hard-coded as
MAX_NR_BANKS, which is 30. This is not architecture correct. This
patch removes this definition, replacig the cpu_banks_t with
mca_banks, and provide some basic function, like
set/clear/test/alloc/free for mcabanks_t.
Secondly, remove the broadcast_check code to intel specific, since
only Intel platform support broadcast now.
Thirdly, the X86_FEATURE_MCA check and CR4_MCE enable is done in every
vendor-specifc callback, that's redundant, move it to
mcheck_init. Also, we should enable CR4_MCE only in the end of the
mcheck_init, to close the small window between CR4_enable and the mca
setup.
And we also move vmce specific code to vmce.c as vmce_init, to make
code clean.
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com> Acked-By: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Tue, 8 Jun 2010 07:05:09 +0000 (08:05 +0100)]
blktap2: The tap-ctl userspace control utility and library.
Tapdisk control in userspace, a replacement for the original blktap2
control stack, which had to pass a kernel space interface based on
sysfs nodes.
All tapdisk processes listen for commands on a unix stream socket. The
control library supports scanning the socket namespace for running
tapdisks, VBD minors allocated, associated images and state inquiry.
Control operations include allocating/releasing devices, spawning
tapdisks, opening/closing images, attaching disk images to
devices. disk pause/resume operations and runtime switching of disk
images.
Signed-off-by: Jake Wires <jake.wires@citrix.com> Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Keir Fraser [Tue, 8 Jun 2010 07:03:41 +0000 (08:03 +0100)]
blktap2: Fix tapdisk disktype issues.
Stop coercing drivers/disktype code into the tool stack. Make both
blktapctrl and tap-ctl transfer type/path pairs as "<type>:<path>"
strings. Remove the message.disktype integer altogether.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Jake Wires <jake.wires@citrix.com>
Keir Fraser [Mon, 7 Jun 2010 14:49:46 +0000 (15:49 +0100)]
xl: init scripts (v2)
Now the init script is called xencommons and, as the name suggests, it
is a common script between xl and xend because it is used to start
xenconsoled, xenstored and xenbackendd and the initialization of these
three daemons has been removed from xend. The global
xen_toolstack=xl/xend variable has been removed. Regarding the
network setup, I made the vif scripts follow the same pattern as the
other scripts in xen-backend: a new script called vif-setup is
executed unconditionally. vif-setup is going to do the right thing
depending on the value of the environmental variable "script" (same
technique used before), defaulting to vif-bridge. In the common
scenario the toolstack doesn't need to set the variable "script"
because vif-bridge is going to be called anyway. There is no global
network script to setup the network bridges with xl, so if you are
using xl without xend, you need to manually configure the bridges
using your distro network setup, or, if you are lazy, you can just add
something like:
Keir Fraser [Mon, 7 Jun 2010 14:46:48 +0000 (15:46 +0100)]
x86 mce: Change the method to get the extended MCA information.
Several changes to get the extended MCA information:
a) Use the x86_mcinfo_reserve in mcinfo_extended to reserve buffer
from
mc_info, instead of using the stack
b) For intel's extended MSR, we don't need write them one
by one as the MSR are continous
c) We don't need enum mca_extinfo, since we can consider
the extended MSR as either per bank, or global. Currently
we add a hook in global data collection, and didn't call
register intel_get_extended_msrs as callback. Later that
hook can be replaced by cleaner way
Keir Fraser [Mon, 7 Jun 2010 06:49:07 +0000 (07:49 +0100)]
xl: fix 'xl help' command
xl help 'command' should give the help of the 'command',
but current it does not, it just gives a full list of xl
supported commands. This patch fix it.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Keir Fraser [Mon, 7 Jun 2010 06:19:43 +0000 (07:19 +0100)]
xend: A few blktap2 fixes
1. Bug fix for error: "Error: Device /dev/xvdp (51952, tap2) is
already connected." (xenstore does not clean after DomU stoped)
2. Bug fix for error: "File 'vhd:/path/.../disk.img' doesn't exist."
(not correct parsing)
3. Bug fix for error: "Error: Device 51952 not connected" (in config
file for DomU we should be use prefix "tap2:tapdisk:xxx" for devices
from (aio, ram, qcow, vhd, remus) or "tap:tapdisk:xxx" for devices
from (sync, vmdk, qcow2, ioemu))
4. Bug fix for error: "Disk is not accessible" (if use 'tap2'-device
type, then '/dev/xpvd' may not be accessible immediately after its
creation)
Keir Fraser [Mon, 7 Jun 2010 06:05:54 +0000 (07:05 +0100)]
Add xl init scripts
this patch adds an init script for xl, so that it can be used without
xend installed on the system. In cases in which both toolstacks are
present, only one init script will be run, dependening on the value of
xen_toolstack in /etc/sysconfig/xen_toolstack. Please note that a
correct value of xen_toolstack (either xl or xend), is required now.
The network script and the vif script to be used with xl can be
specified in /etc/sysconfig/xenlightdaemons. Xl sets the vif script
to xl-vif-script by default, that reads /etc/sysconfig/xenlightdaemons
and calls the vif script set there. A port to a debian system should
be straightforward, just replacing /etc/sysconfig with /etc/default
everywhere.
Keir Fraser [Fri, 4 Jun 2010 09:05:42 +0000 (10:05 +0100)]
Add a safety valve to the HVM RTC model for big time jumps
If xen's time leaps forward by a large amount, the RTC will try to
model a tick for every second that it thinks has passed. This can
livelock a CPU with a series of timer requests each of which fires
immediately and requests the next one.
This patch treats a delay of more than a day between ticks as a
special case, abandoning the attempt to catch up. That should be good
enough to avoid livelock but doesn't fix the underlying time problem.
Keir Fraser [Wed, 2 Jun 2010 09:54:32 +0000 (10:54 +0100)]
tools: assume that special Xen devices have been created by the platform
Remove all the magic surrounding the special Xen devices in Linux
specific code whereby we attempt to figure out what the correct
major:minor number is and check the the existing device has these
numbers etc. In 2010 we really should be able to trust that the
platform has created the devices correctly or provide correct
configuration settings such that they are without resorting to tearing
down the platform configured state and rebuilding it.
tools/hotplug/Linux/xen-backend.rules already contains the necessary
udev rules to create /dev/xen/evtchn and friends in the correct place.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Keir Fraser [Wed, 2 Jun 2010 09:49:35 +0000 (10:49 +0100)]
Fix xm man page statement about asynchonous operation
The man page for xm command states that many commands acts
asynchronously which is not true. According to my experience most
commands does act synchronously with several exceptions, like create,
shutdown, mem-set and vcpu-set commands so this fixes the paragraph
available in this xm man page.
Signed-off-by: Michal Novotny <minovotn@redhat.com>
Keir Fraser [Tue, 1 Jun 2010 09:56:07 +0000 (10:56 +0100)]
x86 mtrr: Remove (noop) lock_cpu_hotplug().
CPUs coming online sync themselves with current MTRR state at an
appropriate point anyway.
It's not actually possible to have a newly booted CPU immediately have
in-sync MTRR state anyway. It has to be synced up as part of normal
CPU bootstrap procedure. Which is what we do.
Keir Fraser [Tue, 1 Jun 2010 06:04:35 +0000 (07:04 +0100)]
xc: deal with xen/evtchn and xen/gntdev device names
This patch makes xc_linux properly deal with:
1. discovering and creating device nodes if necessary
2. the new form of xen/<dev> device names soon to be used by the
kernel
This changes the logic slightly:
- If a device node already exists with the proper name, then it uses
it as-is, assuming it has already been correctly created.
- If the path doesn't exist, or it exists but isn't a device node,
and
it has successfully found the major/minor for the device, then
(re)create the device node.
Since this logic is identical for gntdev and evtchn, make a common
function to handle both.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Keir Fraser [Tue, 1 Jun 2010 05:45:44 +0000 (06:45 +0100)]
xen: update_runstate_area for 32 bit PV on HVM guests
The current implementation of update_runstate_area is unable to handle
32 bit PV on HVM guests because the check is_pv_32on64_domain doesn't
cover that case. This patch fixes it.
Keir Fraser [Fri, 28 May 2010 08:38:56 +0000 (09:38 +0100)]
xl/libxtl: Remove glitch in xl migrate log output
* Provide a new XTL_STDIOSTREAM_HIDE_PROGRESS flag in the stdio logger
* Provide a way to adjust the flags after logger setup
* Use these to disable progress output from the migration receiver, as
the sender is also sending progress information.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Keir Fraser [Fri, 28 May 2010 08:38:18 +0000 (09:38 +0100)]
libxc: remove \n from strings passed to PERROR
Previously, the code was inconsistent: some calls to PERROR passed \n
and some did not. With the new logging arrangements, passing \n is
definitely incorrect.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>