Commit Graph
21619 Commits
Author SHA1 Message Date
Keir Fraser c2c4e65d96 Allow LZO compressed bzImage to be used as DomU kernel
... since recently Linux added this as another kernel compression
method.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-06-15 13:20:11 +01:00
Keir Fraser d371fcc85b x86: allow LZO compressed bzImage to be used as Dom0 kernel
... since recently Linux added this as another kernel compression
method, and we already have LZO compression in the tree (from tmem),
so that only glue logic is needed.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-06-15 13:19:33 +01:00
Keir Fraser 135259fa86 x86: fix pv cpuid masking
Invert initial values of the variables parsed into from the command
line, so that completely clearing out one or more of the four bit
fields is possible.

Further, consolidate the command line parameter specifications into
a single place.

Finally, as per "Intel Virtualization Technology FlexMigration
Application Note" (http://www.intel.com/Assets/PDF/manual/323850.pdf),
also handle family 6 model 0x1f.

What remains open is the question whether pv_cpuid() shouldn't also
consume these masks.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-06-15 13:18:55 +01:00
Keir Fraser 3aff5e1948 Don't save Xen heap pages during domain save
As discussed in the thread starting at
http://lists.xensource.com/archives/html/xen-devel/2010-05/msg01383.html,
don't save Xen heap pages in order to avoid overallocation when the
domain gets restored, as those pages would get (temporarily) backed
with normal RAM pages by the restore code.

This requires making DOMCTL_getpageframeinfo{2,3} usable for HVM
guests, meaning that the input to these must be treated as GMFNs.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-06-15 13:18:09 +01:00
Keir Fraser 11ca89db85 xl: fix restore_common return value
restore_common function should return error when failed.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-06-15 11:38:41 +01:00
Keir Fraser 6fa52bad26 buildconfig: Set CONFIG_TUN=y in Linux kernel config
This is needed by the pv_ops kernel in order to support HVM guests
with emulated VIFs

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
2010-06-15 11:37:59 +01:00
Keir Fraser b39bfe9930 buildconfig: Fix setopt in case where option is already set but to the wrong value
Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
2010-06-15 11:37:24 +01:00
Keir Fraser edf9a6a284 xend: Do not mess with bridge if admin has set one up already
Previously, the default "network-script",
/etc/xen/scripts/network-bridge, would attempt to do its horrid work
even if you had already set everything up in /etc/network/interfaces.

Setting up your bridge in /etc/network/interfaces is:
 * easy
 * required for libxl since libxl never does it for you
 * not a fragile piece of lunacy
 * properly documented
 * the way everyone would expect it to work

In this small patch we make it so that the default config for xend
doesn't mess about on startup if you already have a bridge, and
doesn't mess about on shutdown unless your first-named bridge (eth0 or
xenbr0, normally) doesn't also have a physical interface named
p<whatever> (peth0 or pxenbr0) enslaved to it.  The latter test is not
ideal but will hopefully do from now until the time xend finally dies.

We also fix the "documentation" - ie, the comments in the default
xend-config.sxp - to correspond to reality.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-06-15 11:36:27 +01:00
Keir Fraser 9ce732580d x86 hap: clean up the definition of hap_enabled().
Actually when hvm_domain.hap_enabled is true, it is already a hvm
domain.

Signed-off-by: Xin Li <xin.li@intel.com>
2010-06-15 11:35:46 +01:00
Keir Fraser cfd524febf 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>
2010-06-15 11:34:13 +01:00
Keir Fraser 5536c6247b 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>
2010-06-11 17:47:49 +01:00
Keir Fraser 6f394524c2 x86 amd: Fix after MSR cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-06-11 16:59:22 +01:00
Keir Fraser c5030657f0 mce: clean up msr handling
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-06-11 15:22:12 +01:00
Keir Fraser 7734234e95 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>
2010-06-11 15:19:49 +01:00
Keir Fraser 991fca38ac apic: clean up msr handling
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-06-11 14:26:02 +01:00
Keir Fraser ed12caf7c2 mtrr msr-handling cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-06-11 13:58:40 +01:00
Keir Fraser e63c7db802 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>
2010-06-11 13:57:52 +01:00
Keir Fraser bbeb2b7b83 libxl: blktap2 fix
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-11 12:35:47 +01:00
Keir Fraser 9c63607ccd xen: msr safe cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-06-11 11:37:22 +01:00
Keir Fraser 072efe5d47 libxl: Fix blktap2 for xl cset 21586:c3c2bcafe471
Avoids a double free on automatic memory.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
2010-06-11 09:35:25 +01:00
Keir Fraser 434b6d5aa8 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>
2010-06-11 09:34:58 +01:00
Keir Fraser 680e96b343 grant iommu: Correctly handle multiple mappings of same MFN.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-11 09:31:14 +01:00
Keir Fraser 425bbceb73 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>
2010-06-10 22:39:52 +01:00
Keir Fraser c9b5c0a4b0 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>
2010-06-10 22:12:36 +01:00
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