Commit Graph
21595 Commits
Author SHA1 Message Date
Keir Fraser 2b19086bc3 VMX: rewrite ept_change_entry_type_global in a recursive way
Signed-off-by: Xin Li <xin.li@intel.com>
2010-06-10 22:11:26 +01:00
Keir Fraser 2c76d23d0c rcu: Update all rcu_read_lock() users to implement a dummy RCU read lock.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-10 18:01:03 +01:00
Keir Fraser 5bc894f65b VMX: enforce invept checking
Escalate to use all context invalidation if single context
invalidation is not supported.

Signed-off-by: Xin Li <xin.li@intel.com>
2010-06-10 17:30:23 +01:00
Keir Fraser 4f863ad227 VMX: enforce EPT paging structure memory type and page-walk length check.
Also use a macro to get EPT walk length.

signed-off-by: Xin Li <xin.li@intel.com>
2010-06-10 11:18:02 +01:00
Keir Fraser 58df49c4e3 x86 hvm: Fix build error with some GCC versions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-10 10:18:00 +01:00
Keir Fraser 51379a3958 xc_domain_restore: Remove static variable 'completed'
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-10 09:43:49 +01:00
Keir Fraser 7478474903 xc_domain_restore: Revert 20126:442bc6f82cf3, 19639:205b1badbcfd
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.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-10 09:35:16 +01:00
Keir Fraser 64aa7239d1 x86_32 vmx: Fix build after msr cleanups
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-10 08:31:36 +01:00
Keir Fraser 2b70283b61 libxl: Use libblktapctl.so
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
2010-06-10 08:28:02 +01:00
Keir Fraser bf955b6072 blktap2: Build libblktapctl.so
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
2010-06-10 08:27:25 +01:00
Keir Fraser 486d4e64a0 blktap2: Add tap_ctl_find_minor
Slack 'tap-ctl find -t <type> -f <path>'.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
2010-06-10 08:26:42 +01:00
Keir Fraser a7d2464734 blktap2: Fix broken tap-ctl-list type/path filter logic
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
2010-06-10 08:25:55 +01:00
Keir Fraser 483ed98e11 Update QEMU_TAG to 6392763643311272590ef5c6f75ba11d5b132585 2010-06-10 08:25:10 +01:00
Keir Fraser 5aa4870e4d VMX: remove an unused EPT macro.
Signed-off-by: Xin Li <xin.li@intel.com>
2010-06-10 08:24:48 +01:00
Keir Fraser 3605c8aee0 x86 hvm: msr-handling cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-06-10 08:24:07 +01:00
Keir Fraser b1f87cc667 x86 mce: Dump the MCE information in mc_panic and softirq
We should not dump the mcinfo in mce handler, instead, we should do
that in mc_panic for fatal error or softirq for other errors.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Acked-By: Christoph Egger <Christoph.Egger@amd.com>
2010-06-10 08:19:58 +01:00
Keir Fraser ebe1ee5c76 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.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
2010-06-10 08:19:11 +01:00
Keir Fraser 240ecd1217 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.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
2010-06-10 08:18:46 +01:00
Keir Fraser 2cde85c791 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.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
2010-06-10 08:18:11 +01:00
Keir Fraser 817b39b2e4 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.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
2010-06-10 08:17:38 +01:00
Keir Fraser 4cfa37022a x86 mce: Re-arrange mce_intel.c, to make it more clean
Seperate logic for MCE handling, Intel MCA, MCE, CMCI handler, to make
it more clean. No logic changes in this patch.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
2010-06-10 08:16:50 +01:00
Keir Fraser c60552c9a1 x86 mce: Use MSR_IA32_MCx_* macros consistently
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-06-09 14:38:30 +01:00
Keir Fraser ea8a094195 x86 vpmu: msr-handling cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-06-09 14:36:11 +01:00
Keir Fraser bce846e928 xen-watchdog: Move init script to OS-dep dir and implement for netbsd
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-09 13:29:22 +01:00
Keir Fraser d2a6ffdc54 xend: Remove use of non-existent xc.handle() function.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-09 07:55:19 +01:00
Keir Fraser 8d305177cf x86 mce: Make indentation consistent (soft tabs) in a couple of files.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-09 07:54:10 +01:00
Keir Fraser 84e364f2ed 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.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
2010-06-09 07:51:31 +01:00
Keir Fraser 741367e77d 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>
2010-06-09 07:42:19 +01:00
Keir Fraser 41570d67e7 tools/misc: xen-watchdog script is Linux specific
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-09 07:29:10 +01:00
Keir Fraser 566a51154e tools: fix install bash-completion files to non-default locations.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-06-09 07:21:32 +01:00
Keir Fraser 5a84071432 netbsd: Add boot-time init scripts.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-06-09 07:18:30 +01:00
Keir Fraser 1251521ce9 blktap2: Fix toolstack build on NetBSD
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
2010-06-09 06:59:52 +01:00
Keir Fraser 264e0d32b1 blktap2: <sys/time.h> is needed for 'struct timeval'
Also clean up a Makefile to use $(SBINDIR).

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-06-09 06:58:55 +01:00
Keir Fraser 636bf10215 hgignore: Update for new tap-ctl utility 2010-06-08 08:09:16 +01:00
Keir Fraser 9622dc5498 blktap2: Port Xend to the tap-ctl interface.
Signed-off-by: Jake Wires <jake.wires@citrix.com>
2010-06-08 08:05:43 +01:00
Keir Fraser 4b1af8b188 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>
2010-06-08 08:05:09 +01:00
Keir Fraser c6913b5aaf blktap2: Cleanup vdi stacking code.
Removes some rough edges, memory leakage (?), fixes __list_splice, ...

Signed-off-by: Jake Wires <jake.wires@citrix.com>
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
2010-06-08 08:04:36 +01:00
Keir Fraser 08a07a95dd blktap2: Fix E/DPRINTF defs all around the driver/ subdir.
This is just to avoid macro madness among subdirs sharing blktaplib.h.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Signed-off-by: Jake Wires <jake.wires@citrix.com>
2010-06-08 08:04:09 +01:00
Keir Fraser 7b4dea5546 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>
2010-06-08 08:03:41 +01:00
Keir Fraser f867b85581 blktap2: Remove LVM hacks.
These only mattered for XCP's LVHD with blktap1.

Signed-off-by: Jake Wires <jake.wires@citrix.com>
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
2010-06-08 08:02:56 +01:00
Keir Fraser 1050ef9e69 blktap2: Remove tapdisk-ipc module.
Obsoleted with blktapctrl.

Signed-off-by: Jake Wires <jake.wires@citrix.com>
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
2010-06-08 08:01:50 +01:00
Keir Fraser e1e4abdf2a libxl/xl: implement xen_platform_pci enable/disable
Implement xen_platform_pci support in xl/libxl to allow users to
disable the xen platform pci device from the VM config file.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-06-08 08:01:04 +01:00
Keir Fraser 24454c884a tools: Add missing files under tools/hotplug/Linux/init.d
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-07 17:14:37 +01:00
Keir Fraser 88a186c11c hgignore: Modify *.d line to avoid fale trigger on tools/hotplug/Linux/init.d/
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-07 17:14:09 +01:00
Keir Fraser 7aa4b1bbc7 x86: Force !in_irq() in machine_restart().
Various function we may call assert this fact. We just want to restart
the system.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-07 16:41:19 +01:00
Keir Fraser 702890192a 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:

/etc/xen/scripts/network-bridge start

to your rc.local.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-06-07 15:49:46 +01:00
Keir Fraser 9bb88be542 libxc: NetBSD build fix
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-06-07 15:48:12 +01:00
Keir Fraser a23a9e65ec bltap2: implement md5 directly, to remove ssl dependency
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-06-07 15:47:28 +01:00
Keir Fraser 9d13fd9fd3 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

Signed-off-by: Jiang, Yunhong <yunhong.jiang@inte.com>
2010-06-07 15:46:48 +01:00
Keir Fraser 6b0b6e01b9 tools: disable xen-hptool on ia64
xen-hptool cannot be built on ia64, because xen-hptool depends on
xc_offline_page.c and xc_offline_page.c does not support ia64.

This patch disables it on ia64.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2010-06-07 15:45:56 +01:00