Commit Graph
21350 Commits
Author SHA1 Message Date
Keir Fraser c021c95498 x86: Replace our own specialised versions of memset and memcpy with
direct use of gcc's built-in versions.

This dramatically simplifies our code while also avoiding compile
warnings with certain intermediate versions of gcc.

This patch is based on an initial version by Jan Beulich.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-11 14:05:28 +01:00
Keir Fraser 7fa5e3ae97 xl: use help table to describe command help information
This patch generate a help table to describe command help
information.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-11 12:37:26 +01:00
Keir Fraser 1e560df12f xl: Add "xl trigger" command, a clone of "xm trigger".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-11 11:23:54 +01:00
Keir Fraser 1848a2d7ad x86: Detect and handle unexpected platform-timer counter wrap.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-11 11:21:27 +01:00
Keir Fraser ae3e4d2c6a Define ABS() library function. Use it.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-11 11:19:23 +01:00
Keir Fraser a974b14d79 tasklet: Improve scheduler interaction.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-11 11:10:24 +01:00
Keir Fraser 0e13089b14 libxl: More cpupool fixes.
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
2010-05-11 08:39:01 +01:00
Keir Fraser c3cd270e0f xl: "vncunused" is documented to default to 1.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-11 08:37:25 +01:00
Keir Fraser 45c08c3870 x86: Export timer hypercalls to HVM guests too
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-11 08:36:30 +01:00
Keir Fraser e6536520c4 VT-d: prevent watchdog timer from kicking in when
initializing on systems with huge amounts of memory

Process pending soft-IRQs every 4G worth of pages initialized for Dom0
to keep timekeeping happy and prevent the NMI watchdog (when enabled)
from kicking in.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-05-11 08:35:45 +01:00
Keir Fraser e0d9276571 x86: TSC handling cleanups
"I am removing the tsc_scaled variable that is never actually used
because when tsc needs to be scaled vtsc is 1.  I am also making this
more explicit in tsc_set_info.  I am also removing hvm_domain.gtsc_khz
that is a duplicate of d->arch.tsc_khz.  I am using scale_delta(delta,
&d->arch.ns_to_vtsc) to scale the tsc value before returning it to the
guest like in the pv case.  I added a feature flag to specify that the
pvclock algorithm is safe to be used in an HVM guest so that the guest
can now use it without hanging."

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-11 08:34:58 +01:00
Keir Fraser dc21ec2b12 xm: explicitly differentiate between tap and tap2 in config parsing.
From: Jim Fehlig <jfehlig@novell.com>
Signed-off-by: Keir Fraser <Keir.Fraser@eu.citrix.com>
2010-05-11 08:31:16 +01:00
Keir Fraser e0d20ed4b7 xl: Remove transaction handle in "xl rename"
Thanks Stefano for pointing out that transaction handle in libxl
clients is not needed.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-10 09:27:17 +01:00
Keir Fraser 5659b2e667 xl: add missing migrate commands to command table
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
2010-05-10 09:26:29 +01:00
Keir Fraser 62dcdb74d8 Remus: fix missing import in device.py
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2010-05-10 09:25:46 +01:00
Keir Fraser 2582117ae8 libxl: Check cpupool parameter during domain creation.
Signed-off-by: Jergen Gross <juergen.gross@ts.fujitsu.com>
2010-05-10 09:25:11 +01:00
Keir Fraser 268d40f9b8 xentrace: fix bug in t_info size
t_info size should be in bytes, not pages.  This fixes a bug
that crashes the hypervisor if the total number of all pages
is more than 1024 but less than 2048.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
2010-05-10 09:22:52 +01:00
Keir Fraser dd41a2dae2 xl: ignore opengl unless sdl is enabled
The "opengl" setting is documented as having no effect unless "sdl" is
set.  Make sure this is honoured.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-10 09:21:58 +01:00
Keir Fraser 5d7cfc45a8 svm: Avoid VINTR injection during NMI shadow
It is invalid because we get vmexit via IRET interception in this
case. VINTR is unaware of NMI shadows and may vmexit early, leaving us
in an endless loop of VINTR injections and interceptions.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-07 19:22:28 +01:00
Keir Fraser 9f92203e2c libxl: fix paths for non-standard installations
Attached patch removes hardcoded pathes and corrects wrong path to
qemu-dm.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-07 19:16:40 +01:00
Keir Fraser eb8d759136 ocaml: NetBSD support and general CFLAGS cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-07 19:08:55 +01:00
Keir Fraser b87c206038 xl: Update memory info in xenstore when use 'xl mem-set'
'xl mem-set' should update memory info in xenstore's vm info.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-05-07 18:57:30 +01:00
Keir Fraser 99462ede4c xenstored: Always build and install.
It coexists quite happily with oxenstored.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-07 11:45:18 +01:00
Keir Fraser 5c89fad428 domain_create: No need to zero new domain struct as done by arch-dep code
Fix ia64 to always make this the case.

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
2010-05-07 10:02:14 +01:00
Keir Fraser 97be3bd3fe multiboot asm: Get offset constants from the C struct
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
2010-05-07 10:00:43 +01:00
Keir Fraser e926e7d1a9 xenpm: remove wrong and pointless "current" indicator
Using the CPU number to compare with an index into an array containing
only a subset of CPUs isn't valid. And indicator isn't necessary here
at all since the CPU number being dealt with gets printed right before
this line.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-05-07 09:50:17 +01:00
Keir Fraser 40af606c02 x86/cpufreq: fix turbo mode detection
{acpi,powernow}_cpufreq_cpu_init() generally don't run on the CPU the
policy they deal with is related to, hence using cpuid() directly
works only as long as all CPUs in the system are identical (which
admittedly is commonly the case).

Further add a per-policy flag indicating the availability of
APERF/MPERF MSRs, so that globally setting the .getavg accessor won't
be a problem on heterogeneous configurations.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-05-07 09:46:50 +01:00
Keir Fraser c4826676c4 libxl: Support cpupools
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
2010-05-07 09:36:58 +01:00
Keir Fraser 2dd73ff364 credit2: Fix credit2 + cpupools
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
2010-05-07 09:35:58 +01:00
Keir Fraser cd62ba5322 xl: Add "xl rename" command, a clone of "xm rename".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-07 09:31:38 +01:00
Keir Fraser 526bdf67f5 xl: Add "xl domname" command, a clone of "xm domname".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-07 09:31:21 +01:00
Keir Fraser 8a3067e096 xl: Add "xl domid" command, a clone of "xm domid".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-07 09:30:56 +01:00
Keir Fraser ac56b9955e xend: support blktap2 in xend blkif utils
Support tap2 device type in xend blkif utils parse method.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2010-05-07 09:27:40 +01:00
Keir Fraser 5c0704bc6f libxl: support vncpassword in device-model specification
From: Gihan Munasinghe <GMunasinghe@flexiant.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-07 09:26:49 +01:00
Keir Fraser 0cb7b470ae xl: Start enumerating vifs from 0.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-07 09:15:19 +01:00
Keir Fraser 80e279223b ocaml: Add -Werror to CFLAGS and fix resulting errors.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-07 09:13:59 +01:00
Keir Fraser b59766b71f .hgignore: Update for new ocaml build-generated files.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-07 08:55:12 +01:00
Keir Fraser 53f89553da ocam: add missing files that got lost in the v2 shuffle
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-05-07 08:46:51 +01:00
Keir Fraser abe6f86669 ocaml: Fix C include paths in Makefile
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-05-07 08:46:07 +01:00
Keir Fraser 12d39540c8 ocaml: Fix Makefile for parallel build.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-05-07 08:43:51 +01:00
Keir Fraser 5b6e351436 Reduce 'd' debug key's global impact
On large systems, dumping state may cause time management to get
stalled for so long a period that it wouldn't recover. Therefore alter
the state dumping logic to alternatively block each CPU as it prints
rather than one CPU for a very long time (using the alternative key
handling toggle introduced with an earlier patch).

Further, instead of using on_selected_cpus(), which is unsafe when
the dumping happens from a hardware interrupt, introduce and use a
dedicated IPI sending function (which each architecture can implement
to its liking)

Finally, don't print useless data (e.g. the hypervisor context of the
interrupt that is used for triggering the printing, but isn't part of
the context that's actually interesting).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-06 17:00:08 +01:00
Keir Fraser 08bbf1f316 xl: fix printf format specifier for 64-bit arguments
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-06 16:01:49 +01:00
Keir Fraser c871af7f4d libxl: make use of libxl path functions
Make use of the new libxl_*_path functions to specify the correct
absolute path of qemu-dm, hvmloader and ioemu-stubdom.gz.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-06 15:59:35 +01:00
Keir Fraser 68f722c809 xl: If domain creation fails, destroy the domain
This patch makes sure that if the domain creation fails for any
reason, no zombie domains are left around.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-06 15:55:31 +01:00
Keir Fraser b30f8e7bbe Remove CPUID4 emulation for AMD CPUs
The CPUID4 emulation code for AMD CPUs in intel_cacheinfo.c won't be
executed. This emulation code was from upstream kernel, where CPUID4
is used for cache information report in sysfs. But in Xen, this code
path won't be executed on AMD CPUs. init_amd() uses
display_cacheinfo() to find out CPU cache size instead.

Signed-off-by: Wei Huang <wei.huang2@amd.com>
Acked-by: Mark Langsdorf <mark.langsdorf@amd.com>
2010-05-06 15:54:52 +01:00
Keir Fraser 81e0a49aeb Reduce '0' debug key's global impact
On large systems, dumping state may cause time management to get
stalled for so long a period that it wouldn't recover. Therefore add
a tasklet-based alternative mechanism to handle Dom0 state dumps.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-05-06 11:59:55 +01:00
Keir Fraser c931e4face x86: add .data.page_aligned section
... and move page-aligned data there, instead of having random holes
(to fulfill the demanded alignment) in the final image.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-05-06 11:52:22 +01:00
Keir Fraser d9998d5853 iommu: add missing __init annotations
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-05-06 11:44:42 +01:00
Keir Fraser 727bc17d20 svm: support EFER.LMSLE for guests
Now that the feature is officially documented (see
http://support.amd.com/us/Processor_TechDocs/24593.pdf), I think it
makes sense to also allow HVM guests to make use of it.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-05-06 11:43:54 +01:00
Keir Fraser 631b9a05a9 vmce: Clean up implementation and setup/destroy.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-06 11:39:09 +01:00