]> xenbits.xensource.com Git - xen.git/log
xen.git
14 years agomce: Enhance the vmce injection check logic
Keir Fraser [Tue, 15 Jun 2010 10:34:13 +0000 (11:34 +0100)]
mce: Enhance the vmce injection check logic

Currently we will not inject vMCE if guest has different mca control
register setup.

This is not enough, we need consider more. If guest has different
family/model, we should not inject guest, because the MCA error code
include model specific information. If guest has not enabled MCE
(i.e. CR4.X86_CR4_MCE is clear), we should not inject vMCE.

One thing need notice. In the memory error handler, we didn't kill the
guest if vMCE is not ready, instead, we will simply ignore the
vMCE. In native, system will reboot if MCE in CR4 is not enabled. We
need contain guest access to the broken memory through eithe software
or hardware method.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
14 years agox86: Do not include apic.h/io_apic.h from asm/smp.h
Keir Fraser [Fri, 11 Jun 2010 16:47:49 +0000 (17:47 +0100)]
x86: Do not include apic.h/io_apic.h from asm/smp.h

...and fix up the ensuing fall-out of implicit dependencies

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86 amd: Fix after MSR cleanup
Keir Fraser [Fri, 11 Jun 2010 15:59:22 +0000 (16:59 +0100)]
x86 amd: Fix after MSR cleanup

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
14 years agomce: clean up msr handling
Keir Fraser [Fri, 11 Jun 2010 14:22:12 +0000 (15:22 +0100)]
mce: clean up msr handling

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
14 years agox86: Clean up efer/ler macros after MSR changes.
Keir Fraser [Fri, 11 Jun 2010 14:19:49 +0000 (15:19 +0100)]
x86: Clean up efer/ler macros after MSR changes.

Move them out of a header file and make the macros proper functions again.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoapic: clean up msr handling
Keir Fraser [Fri, 11 Jun 2010 13:26:02 +0000 (14:26 +0100)]
apic: clean up msr handling

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
14 years agomtrr msr-handling cleanup
Keir Fraser [Fri, 11 Jun 2010 12:58:40 +0000 (13:58 +0100)]
mtrr msr-handling cleanup

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
14 years agosvm: use msr safe for erratum 383
Keir Fraser [Fri, 11 Jun 2010 12:57:52 +0000 (13:57 +0100)]
svm: use msr safe for erratum 383

Make erratum 383 use msr safe variants to work on top of KVM.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
14 years agolibxl: blktap2 fix
Keir Fraser [Fri, 11 Jun 2010 11:35:47 +0000 (12:35 +0100)]
libxl: blktap2 fix

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoxen: msr safe cleanup
Keir Fraser [Fri, 11 Jun 2010 10:37:22 +0000 (11:37 +0100)]
xen: msr safe cleanup

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
14 years agolibxl: Fix blktap2 for xl cset 21586:c3c2bcafe471
Keir Fraser [Fri, 11 Jun 2010 08:35:25 +0000 (09:35 +0100)]
libxl: Fix blktap2 for xl cset 21586:c3c2bcafe471

Avoids a double free on automatic memory.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
14 years agoVMX: enforce INVVPID checking
Keir Fraser [Fri, 11 Jun 2010 08:34:58 +0000 (09:34 +0100)]
VMX: enforce INVVPID checking

Escalate to use a wider context invalidation if the requested context
invalidation is not supported.

Signed-off-by: Xin Li <xin.li@intel.com>
14 years agogrant iommu: Correctly handle multiple mappings of same MFN.
Keir Fraser [Fri, 11 Jun 2010 08:31:14 +0000 (09:31 +0100)]
grant iommu: Correctly handle multiple mappings of same MFN.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agotmem: Fix domain lifecycle synchronisation.
Keir Fraser [Thu, 10 Jun 2010 21:39:52 +0000 (22:39 +0100)]
tmem: Fix domain lifecycle synchronisation.

Obtaining a domain reference count is neither necessary nor
sufficient. Instead we simply check whether a domain is already dying
when it first becomes a client of tmem. If it is not then we will
correctly clean up later via tmem_destroy() called from domain_kill().

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoTmem: fix domain refcount leak by returning to simpler model
Keir Fraser [Thu, 10 Jun 2010 21:12:36 +0000 (22:12 +0100)]
Tmem: fix domain refcount leak by returning to simpler model
which claims a ref once when the tmem client is first associated
with the domain, and puts it once when the tmem client is
destroyed.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
14 years agoVMX: rewrite ept_change_entry_type_global in a recursive way
Keir Fraser [Thu, 10 Jun 2010 21:11:26 +0000 (22:11 +0100)]
VMX: rewrite ept_change_entry_type_global in a recursive way

Signed-off-by: Xin Li <xin.li@intel.com>
14 years agorcu: Update all rcu_read_lock() users to implement a dummy RCU read lock.
Keir Fraser [Thu, 10 Jun 2010 17:01:03 +0000 (18:01 +0100)]
rcu: Update all rcu_read_lock() users to implement a dummy RCU read lock.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoVMX: enforce invept checking
Keir Fraser [Thu, 10 Jun 2010 16:30:23 +0000 (17:30 +0100)]
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>
14 years agoVMX: enforce EPT paging structure memory type and page-walk length check.
Keir Fraser [Thu, 10 Jun 2010 10:18:02 +0000 (11:18 +0100)]
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>

14 years agox86 hvm: Fix build error with some GCC versions.
Keir Fraser [Thu, 10 Jun 2010 09:18:00 +0000 (10:18 +0100)]
x86 hvm: Fix build error with some GCC versions.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoxc_domain_restore: Remove static variable 'completed'
Keir Fraser [Thu, 10 Jun 2010 08:43:49 +0000 (09:43 +0100)]
xc_domain_restore: Remove static variable 'completed'

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoxc_domain_restore: Revert 20126:442bc6f82cf3, 19639:205b1badbcfd
Keir Fraser [Thu, 10 Jun 2010 08:35:16 +0000 (09:35 +0100)]
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>
14 years agox86_32 vmx: Fix build after msr cleanups
Keir Fraser [Thu, 10 Jun 2010 07:31:36 +0000 (08:31 +0100)]
x86_32 vmx: Fix build after msr cleanups

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agolibxl: Use libblktapctl.so
Keir Fraser [Thu, 10 Jun 2010 07:28:02 +0000 (08:28 +0100)]
libxl: Use libblktapctl.so

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
14 years agoblktap2: Build libblktapctl.so
Keir Fraser [Thu, 10 Jun 2010 07:27:25 +0000 (08:27 +0100)]
blktap2: Build libblktapctl.so

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
14 years agoblktap2: Add tap_ctl_find_minor
Keir Fraser [Thu, 10 Jun 2010 07:26:42 +0000 (08:26 +0100)]
blktap2: Add tap_ctl_find_minor

Slack 'tap-ctl find -t <type> -f <path>'.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
14 years agoblktap2: Fix broken tap-ctl-list type/path filter logic
Keir Fraser [Thu, 10 Jun 2010 07:25:55 +0000 (08:25 +0100)]
blktap2: Fix broken tap-ctl-list type/path filter logic

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
14 years agoUpdate QEMU_TAG to 6392763643311272590ef5c6f75ba11d5b132585
Keir Fraser [Thu, 10 Jun 2010 07:25:10 +0000 (08:25 +0100)]
Update QEMU_TAG to 6392763643311272590ef5c6f75ba11d5b132585

14 years agoVMX: remove an unused EPT macro.
Keir Fraser [Thu, 10 Jun 2010 07:24:48 +0000 (08:24 +0100)]
VMX: remove an unused EPT macro.

Signed-off-by: Xin Li <xin.li@intel.com>
14 years agox86 hvm: msr-handling cleanup
Keir Fraser [Thu, 10 Jun 2010 07:24:07 +0000 (08:24 +0100)]
x86 hvm: msr-handling cleanup

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
14 years agox86 mce: Dump the MCE information in mc_panic and softirq
Keir Fraser [Thu, 10 Jun 2010 07:19:58 +0000 (08:19 +0100)]
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>
14 years agox86 mce: Clean-up the mc_panic handler.
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.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
14 years agox86 mce: Clean Intel's MCE handler code
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.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
14 years agox86 mce: Make mce_action action be usable for both delayed handler and
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.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
14 years agox86 mce: Clean-up intel mcheck_init
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.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
14 years agox86 mce: Re-arrange mce_intel.c, to make it more clean
Keir Fraser [Thu, 10 Jun 2010 07:16:50 +0000 (08:16 +0100)]
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>
14 years agox86 mce: Use MSR_IA32_MCx_* macros consistently
Keir Fraser [Wed, 9 Jun 2010 13:38:30 +0000 (14:38 +0100)]
x86 mce: Use MSR_IA32_MCx_* macros consistently

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
14 years agox86 vpmu: msr-handling cleanup
Keir Fraser [Wed, 9 Jun 2010 13:36:11 +0000 (14:36 +0100)]
x86 vpmu: msr-handling cleanup

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
14 years agoxen-watchdog: Move init script to OS-dep dir and implement for netbsd
Keir Fraser [Wed, 9 Jun 2010 12:29:22 +0000 (13:29 +0100)]
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>
14 years agoxend: Remove use of non-existent xc.handle() function.
Keir Fraser [Wed, 9 Jun 2010 06:55:19 +0000 (07:55 +0100)]
xend: Remove use of non-existent xc.handle() function.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86 mce: Make indentation consistent (soft tabs) in a couple of files.
Keir Fraser [Wed, 9 Jun 2010 06:54:10 +0000 (07:54 +0100)]
x86 mce: Make indentation consistent (soft tabs) in a couple of files.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86: add CMCI software injection interface
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.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
14 years agomce: Clean-up mcheck_init handler
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>
14 years agotools/misc: xen-watchdog script is Linux specific
Keir Fraser [Wed, 9 Jun 2010 06:29:10 +0000 (07:29 +0100)]
tools/misc: xen-watchdog script is Linux specific

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agotools: fix install bash-completion files to non-default locations.
Keir Fraser [Wed, 9 Jun 2010 06:21:32 +0000 (07:21 +0100)]
tools: fix install bash-completion files to non-default locations.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
14 years agonetbsd: Add boot-time init scripts.
Keir Fraser [Wed, 9 Jun 2010 06:18:30 +0000 (07:18 +0100)]
netbsd: Add boot-time init scripts.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
14 years agoblktap2: Fix toolstack build on NetBSD
Keir Fraser [Wed, 9 Jun 2010 05:59:52 +0000 (06:59 +0100)]
blktap2: Fix toolstack build on NetBSD

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
14 years agoblktap2: <sys/time.h> is needed for 'struct timeval'
Keir Fraser [Wed, 9 Jun 2010 05:58:55 +0000 (06:58 +0100)]
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>
14 years agohgignore: Update for new tap-ctl utility
Keir Fraser [Tue, 8 Jun 2010 07:09:16 +0000 (08:09 +0100)]
hgignore: Update for new tap-ctl utility

14 years agoblktap2: Port Xend to the tap-ctl interface.
Keir Fraser [Tue, 8 Jun 2010 07:05:43 +0000 (08:05 +0100)]
blktap2: Port Xend to the tap-ctl interface.

Signed-off-by: Jake Wires <jake.wires@citrix.com>
14 years agoblktap2: The tap-ctl userspace control utility and library.
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>
14 years agoblktap2: Cleanup vdi stacking code.
Keir Fraser [Tue, 8 Jun 2010 07:04:36 +0000 (08:04 +0100)]
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>
14 years agoblktap2: Fix E/DPRINTF defs all around the driver/ subdir.
Keir Fraser [Tue, 8 Jun 2010 07:04:09 +0000 (08:04 +0100)]
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>
14 years agoblktap2: Fix tapdisk disktype issues.
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>
14 years agoblktap2: Remove LVM hacks.
Keir Fraser [Tue, 8 Jun 2010 07:02:56 +0000 (08:02 +0100)]
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>
14 years agoblktap2: Remove tapdisk-ipc module.
Keir Fraser [Tue, 8 Jun 2010 07:01:50 +0000 (08:01 +0100)]
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>
14 years agolibxl/xl: implement xen_platform_pci enable/disable
Keir Fraser [Tue, 8 Jun 2010 07:01:04 +0000 (08:01 +0100)]
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>
14 years agotools: Add missing files under tools/hotplug/Linux/init.d
Keir Fraser [Mon, 7 Jun 2010 16:14:37 +0000 (17:14 +0100)]
tools: Add missing files under tools/hotplug/Linux/init.d

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agohgignore: Modify *.d line to avoid fale trigger on tools/hotplug/Linux/init.d/
Keir Fraser [Mon, 7 Jun 2010 16:14:09 +0000 (17:14 +0100)]
hgignore: Modify *.d line to avoid fale trigger on tools/hotplug/Linux/init.d/

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86: Force !in_irq() in machine_restart().
Keir Fraser [Mon, 7 Jun 2010 15:41:19 +0000 (16:41 +0100)]
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>
14 years agoxl: init scripts (v2)
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:

/etc/xen/scripts/network-bridge start

to your rc.local.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agolibxc: NetBSD build fix
Keir Fraser [Mon, 7 Jun 2010 14:48:12 +0000 (15:48 +0100)]
libxc: NetBSD build fix

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
14 years agobltap2: implement md5 directly, to remove ssl dependency
Keir Fraser [Mon, 7 Jun 2010 14:47:28 +0000 (15:47 +0100)]
bltap2: implement md5 directly, to remove ssl dependency

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agox86 mce: Change the method to get the extended MCA information.
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

Signed-off-by: Jiang, Yunhong <yunhong.jiang@inte.com>
14 years agotools: disable xen-hptool on ia64
Keir Fraser [Mon, 7 Jun 2010 14:45:56 +0000 (15:45 +0100)]
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>
14 years agoxl: fix 'xl help' command
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>
14 years agox86: Small APIC timer initialisation cleanup
Keir Fraser [Mon, 7 Jun 2010 06:47:30 +0000 (07:47 +0100)]
x86: Small APIC timer initialisation cleanup

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoAMD: Workaround for erratum 411
Keir Fraser [Mon, 7 Jun 2010 06:38:09 +0000 (07:38 +0100)]
AMD: Workaround for erratum 411

Clear APIC TMICT when we mask APIC LVTT.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
14 years agoxend: A few blktap2 fixes
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)

Signed-off-by: eXeC001er <execooler@gmail.com>
14 years agoxenwatchdogd: Fix build errors
Keir Fraser [Mon, 7 Jun 2010 06:16:43 +0000 (07:16 +0100)]
xenwatchdogd: Fix build errors

Signed-off-by: Patrick Colp <pjcolp@cs.ubc.ca>
14 years agoxl: block-detach command line parsing
Keir Fraser [Mon, 7 Jun 2010 06:14:19 +0000 (07:14 +0100)]
xl: block-detach command line parsing

Command line arguments start at argv[2].

Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
14 years agoxl: block-list command line parsing
Keir Fraser [Mon, 7 Jun 2010 06:13:41 +0000 (07:13 +0100)]
xl: block-list command line parsing

Command line arguments start at argv[2].

Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
14 years agoxl: block-attach command line parsing
Keir Fraser [Mon, 7 Jun 2010 06:13:02 +0000 (07:13 +0100)]
xl: block-attach command line parsing

Command line arguments start at argv[2].

Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
14 years agoxl: network2-detach command
Keir Fraser [Mon, 7 Jun 2010 06:12:20 +0000 (07:12 +0100)]
xl: network2-detach command

Usage: xl network2-detach <Domain> <DevId>

Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
14 years agoxl: network2-list command
Keir Fraser [Mon, 7 Jun 2010 06:11:15 +0000 (07:11 +0100)]
xl: network2-list command

Usage: xl network2-list <Domains>

Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
14 years agoxl: network2-attach command
Keir Fraser [Mon, 7 Jun 2010 06:09:41 +0000 (07:09 +0100)]
xl: network2-attach command

Usage: xl network2-attach <Domain> [front_mac=<mac>]
[back_mac=<mac>]
[backend=<BackDomain>] [trusted=<0|1>] [back_trusted=<0|1>]
[bridge=<bridge>] [filter_mac=<0|1>] [front_filter_mac=<0|1>]
[pdev=<PDEV>] [max_bypasses=n]

Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
14 years agoxentrace: update formats file for INTR_WINDOW and NPF
Keir Fraser [Mon, 7 Jun 2010 06:07:03 +0000 (07:07 +0100)]
xentrace: update formats file for INTR_WINDOW and NPF

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
14 years agoAdd xl init scripts
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.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agoxl: make mem-set and mem-max to use MB for memory unit by default.
Keir Fraser [Mon, 7 Jun 2010 05:56:04 +0000 (06:56 +0100)]
xl: make mem-set and mem-max to use MB for memory unit by default.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
14 years ago[IA64] support XEN_SYSCTL_numainfo
Keir Fraser [Fri, 4 Jun 2010 10:39:06 +0000 (11:39 +0100)]
[IA64] support XEN_SYSCTL_numainfo

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
14 years agoWatchdog timers for domains
Keir Fraser [Fri, 4 Jun 2010 10:35:23 +0000 (11:35 +0100)]
Watchdog timers for domains

Each domain is allowed to set, reset and disable its timers; when any
timer runs out the domain is killed.

Patch from Christian Limpach <Christian.Limpach@citrix.com>
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
14 years agolibxc: Remove obsolete xc_find_device_number() declaration.
Keir Fraser [Fri, 4 Jun 2010 09:46:32 +0000 (10:46 +0100)]
libxc: Remove obsolete xc_find_device_number() declaration.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agonotify_via_xen_event_channel() takes explicit domain parameter.
Keir Fraser [Fri, 4 Jun 2010 09:25:45 +0000 (10:25 +0100)]
notify_via_xen_event_channel() takes explicit domain parameter.

Also remove pointless tasklet from mem_event notify path.

Signed-off-by: John Byrne <john.l.byrne@hp.com>
14 years agoIntel: Add CPUID feature mask support for NHM processors.
Keir Fraser [Fri, 4 Jun 2010 09:18:31 +0000 (10:18 +0100)]
Intel: Add CPUID feature mask support for NHM processors.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Liping Ke <liping.ke@intel.com>
14 years ago[VTD] fixed a timing issue on DELL calpella laptop while doing graphics pass-through
Keir Fraser [Fri, 4 Jun 2010 09:17:19 +0000 (10:17 +0100)]
[VTD] fixed a timing issue on DELL calpella laptop while doing graphics pass-through

Added additional sleep time between FLR and PCI config restore.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
14 years agolibxl/xl: fix multivcpu handling
Keir Fraser [Fri, 4 Jun 2010 09:14:06 +0000 (10:14 +0100)]
libxl/xl: fix multivcpu handling

Signed-off-by: Stefano Stabellini<stefano.stabellini@eu.citrix.com>
14 years agoxl: enable hap, parse hap option in the config files
Keir Fraser [Fri, 4 Jun 2010 09:13:02 +0000 (10:13 +0100)]
xl: enable hap, parse hap option in the config files

This simple patch enables hap by default in xl and also allows xl to
parse the hap option in the VM config file.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agoxl: correct help message of migrate and migrate-receive command
Keir Fraser [Fri, 4 Jun 2010 09:12:11 +0000 (10:12 +0100)]
xl: correct help message of migrate and migrate-receive command

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
14 years agoxl: fix vcpu-* command line args
Keir Fraser [Fri, 4 Jun 2010 09:11:40 +0000 (10:11 +0100)]
xl: fix vcpu-* command line args

Command line arguments start at argv[2]

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
14 years agoxl: fix network-detach command line parsing
Keir Fraser [Fri, 4 Jun 2010 09:10:45 +0000 (10:10 +0100)]
xl: fix network-detach command line parsing

Command line arguments start at argv[2].  Also, exit(1) on failure.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
14 years agoxl: fix network-list command line parsing
Keir Fraser [Fri, 4 Jun 2010 09:10:25 +0000 (10:10 +0100)]
xl: fix network-list command line parsing

Command line arguments start at argv[2].

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
14 years agoxl: fix network-attach command line parsing
Keir Fraser [Fri, 4 Jun 2010 09:09:59 +0000 (10:09 +0100)]
xl: fix network-attach command line parsing

Command line arguments start at argv[2].

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
14 years agoBash completion scripts go to /etc/bash_completion.d/
Keir Fraser [Fri, 4 Jun 2010 09:09:11 +0000 (10:09 +0100)]
Bash completion scripts go to /etc/bash_completion.d/

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoAdd the USE_PLATFORM_TIMER flag to the FADT, to make w2k3 use the PMTIMER
Keir Fraser [Fri, 4 Jun 2010 09:06:23 +0000 (10:06 +0100)]
Add the USE_PLATFORM_TIMER flag to the FADT, to make w2k3 use the PMTIMER

...because the default timesource (TSC) drifts under load.

The flag is only defined in ACPI 3.0, and we provide ACPI 2.0 tables,
but Windows seems happy enough to obey it anyway.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
14 years agoAdd a safety valve to the HVM RTC model for big time jumps
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.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
14 years agox86: Suppress warnings about spurious pagefaults
Keir Fraser [Fri, 4 Jun 2010 09:04:30 +0000 (10:04 +0100)]
x86: Suppress warnings about spurious pagefaults

RHEL4 guests take a fair number of spurious pagefaults on Nehalem; no
need to report each one of them at XENLOG_WARNING.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
14 years agox86: Quieten the warning about paging domctls called on domains with no vcpus
Keir Fraser [Fri, 4 Jun 2010 09:02:51 +0000 (10:02 +0100)]
x86: Quieten the warning about paging domctls called on domains with no vcpus

Xapi tends to trigger this a lot by looking up the shadow memory
allocation of domains that aren't quite built yet.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
14 years agoQuieten console warning about incomplete PAE PTE writes
Keir Fraser [Fri, 4 Jun 2010 09:01:15 +0000 (10:01 +0100)]
Quieten console warning about incomplete PAE PTE writes

Older (<4.6) RHEL kernels clear PAE pagetable entries without taking
care to write the bottom half first, often enough to make it annoying.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
14 years agotimer: Do not acquire a lock on a killed timer.
Keir Fraser [Fri, 4 Jun 2010 08:50:45 +0000 (09:50 +0100)]
timer: Do not acquire a lock on a killed timer.

Its cpu field might be stale and refer to an offlined cpu.

Furthermore, this avoids performing invalid operations on killed
timers.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoAllow domains to set a shutdown code without actually shutting down
Keir Fraser [Fri, 4 Jun 2010 08:33:11 +0000 (09:33 +0100)]
Allow domains to set a shutdown code without actually shutting down

Useful for Windows guests, since the PV drivers are notified that
the domain is about to crash just before the crash dump gets written.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>