Commit Graph
18537 Commits
Author SHA1 Message Date
Keir Fraser f43f4f1d28 ia64: fix make install under tools/debugger/xenitp
This patch fixes the following error with make install under
the directory, tools/debugger/xenitp by checking whether
the variable is length zero string.

> # make install
> ../../../tools/cross-install -d -m0755 -p //usr/bin
> [ -z " xenitp" ] || ../../../tools/cross-install -d -m0755 -p
> //usr/lib/xen/bin
> ../../../tools/cross-install -d -m0755 -p //usr/share/man/man1
> ../../../tools/cross-install -d -m0755 -p //usr/share/man/man8
> ../../../tools/cross-install -m0755 -p   //usr/bin
> install: too few arguments
> Try `install --help' for more information.
> make: *** [install] Error 1

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-09-24 10:19:07 +01:00
Keir Fraser 9cdbfef570 minios: blkfront should set protocol node
From: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-24 10:18:20 +01:00
Keir Fraser d2e81c31f8 xm docs: Added new,delete,dump-core,resume,suspend,uptime and fixed others
Signed-off-by: Bill Rieske <brieske@novell.com>
2008-09-24 10:17:18 +01:00
Keir Fraser c2c1029070 hvm, save/restore: Skip page batches which contain no valid pages.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-23 17:11:33 +01:00
Keir Fraser 0e7c1355bc acm, xend: Catch bad vlan identifiers
Add code to intercept badly formatted VLAN identifiers or
those that are out of range.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-09-23 12:30:42 +01:00
Keir Fraser c134d74fda libxc: Wrapper functions for cpu online/offline
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
2008-09-22 16:10:25 +01:00
Keir Fraser 49571f74cb x86: Add sysctl for cpu online/offline
Signed-off-by:  Shan Haitao <haitao.shan@intel.com>
2008-09-22 16:07:04 +01:00
Keir Fraser 8d71a294c1 x86: fix powernow
... by allocating the necessary cpufreq_policy structures.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-09-22 15:56:12 +01:00
Keir Fraser 1e98b38411 Add debug key 'e' for event channel information
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-09-22 15:50:59 +01:00
Keir Fraser 331fc9de53 acpi: mark several more items __init/__initdata
Remove unused acpi_reallocate_root_table()

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-09-22 15:33:42 +01:00
Keir Fraser 755af07edb x86/cpufreq: don't use static array for large per-CPU data structures
... as this is rather wasteful when Xen is configured to support many
CPUs but is running on systems having only a few.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-09-22 15:24:03 +01:00
Keir Fraser 23f36ed6ff domctl: don't allow certain operations on Dom0
XEN_DOMCTL_setvcpucontext, XEN_DOMCTL_max_vcpus, and
XEN_DOMCTL_setdebugging don't seem to allow Dom0 as the subject domain
(based on the criteria that they pause that domain in order to do
their job).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-22 15:20:25 +01:00
Keir Fraser 2d4c3c5c9c vsprintf: Better size_t input checking, and fix return values of
[v]scnprintf() when size <= 0.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-22 15:15:19 +01:00
Keir Fraser 13fe69b4a7 Fix misc issues related to allowing support of more CPUs
This mainly means removing stack variables that (should) depend on
NR_CPUS (other than cpumask_t ones) and adjusting certain array sizes.

There's at least one open tools issue: The 'xm vcpu-pin' path assumes
a maximum of 64 CPU-s in many places.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-09-22 14:37:31 +01:00
Keir Fraser 13ad235ee7 xentop: Fix display of long domain names.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-22 14:04:27 +01:00
Keir Fraser c978586719 i386: make double fault TSS per-CPU
As a follow-up to the per-CPU-GDT patch, this also makes the double
fault TSS (and the associated stack) per-CPU.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-09-22 14:00:24 +01:00
Keir Fraser a0c61c0f77 x86: make GDT per-CPU
The major issue with supporting a significantly larger number of
physical CPUs appears to be the use of per-CPU GDT entries - at
present, x86-64 could support only up to 126 CPUs (with code changes
to also use the top-most GDT page, that would be 254). Instead of
trying to go with incremental steps here, by converting the GDT itself
to be per-CPU, limitations in that respect go away entirely.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-09-22 13:46:57 +01:00
Keir Fraser 27e019d758 x86,amd,microcode: fix hypercall return code
Make the hypercall return failure if the microcode didn't apply.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-09-22 13:41:07 +01:00
Keir Fraser 3724ccf9fa CPUIDLE: Handle C2 LAPIC timer & TSC stop
ACPI C2 is quite possible mapped to CPU C3 or deeper state, so
thinking from worst cases, enable C3 like entry/exit handling for C2
by default. Option 'lapic_timer_c2_ok' can be used to select simple C2
entry/exit only if the user make sure that LAPIC tmr & TSC will not be
stop during C2.

Signed-off-by: Wei Gang <gang.wei@intel.com>
2008-09-22 11:24:02 +01:00
Keir Fraser bab5b8ad33 CPUIDLE: Support multiple C3 states
There may be multiple ACPI C3 states reported by BIOS. Those C3 states
may be different on latency & power. So made some modification to
support this case.

Signed-off-by: Wei Gang <gang.wei@intel.com>
2008-09-22 11:21:31 +01:00
Keir Fraser dd7746fbf3 xenctx: fix xenctx --all option on x86
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2008-09-22 11:16:56 +01:00
Keir Fraser 11825aea19 xend: Refactor vmmetrics destruction.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-09-22 11:15:39 +01:00
Keir Fraser b57d0354bf pvgrub: Allow to work with a partitionless virtual disc.
From: Bastian Blank <bastian@waldi.eu.org>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-18 10:43:08 +01:00
Keir Fraser bbc10fbb40 xm list: Return unique exit code for non-existent domain
This patch will make xm return a exit code of 3 if `xm list
<non_existant_domain>` is done rather than the generic code of 1.  I
used 3 because XendClient had a macro setup pointing
ERROR_INVALID_DOMAIN to 3.

From: "Shaun R." <mailinglists@unix-scripts.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-18 10:41:41 +01:00
Keir Fraser 549e1d9ec5 x86, amd, hvm: pass through one more cpuid cache description leaf
Add a missing CPUID leaf that contains AMD-specific cache info.
Without this, Windows can spin trying to prefetch memory buffers using
a stride length of zero.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-18 10:39:53 +01:00
Keir Fraser 19dc3860dc Remove internal tools/ioemu tree.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-18 10:32:40 +01:00
Keir Fraser f2878b5bb1 xc_save/xc_restore: Fix wrong data type
xc_interface_open() may return -1, but if we define xc_fd as unsigned
int, then -1 will be > 0.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-17 14:16:02 +01:00
Keir Fraser ff965b7ec9 x86: Allow continue_hypercall_on_cpu() to be called from within an
existing continuation handler. This fix is needed for the new method
of microcode re-programming.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-17 14:13:10 +01:00
Keir Fraser 5c4eccd644 xm: Remove obsolete mechanism using vncviewer -listen
Without this patch, vncviewer processes remain as follows.
This patch fixes it.

> # pgrep -fl vnc
> 4303 vncviewer -log *:stdout:0 -listen 5501
> 5089 vncviewer -log *:stdout:0 -listen 5502
> 5763 vncviewer -log *:stdout:0 -listen 5503

details:
Since 21dd1fdb73d8 there have been (as far as I can see) three
separate mechanisms for achieving a VNC display:
 1. xm spawns vncviewer after getting vnc display info
     from qemu-dm via xenstore  (introduced in 21dd1fdb73d8)
 2. xm spawns vncviewer -listen and qemu-dm connects to it
 3. qemu-dm spawns vncviewer (!)

The latter two are rather strange - No.3 is very strange indeed.
So I decided that rather than try to get No.2 or No.3 on track for
going into qemu upstream, No.2 and No.3 would be dropped.
After discussion on xen-devel the mechanism No.1 was introduced,
above.

No.1 is controlled by the --spawn-vncviewer (and --vncviewer-autopass)
command line options to xm, by analogy with the -c option.

Nos.2 and 3 are controlled by elements of the domain configuration
file - and their code still remains.  So if you turn all of the vnc
options on you can get several vncviewers (although only one of them
will work).

This patch removes the support for the passive connection mode No.2
After all ioemu-remote will never connect to such a vncviewer.
The options to engage this functionality were already removed from
the example config files by Keir in 18241:bf4ef45e6a38.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-09-17 13:11:40 +01:00
Keir Fraser 9a744273ce mini-os: adding some missing posix function declarations
Adding some missing posix function declarations, to get rid of some
qemu-remote compile time warnings.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2008-09-17 13:10:36 +01:00
Keir Fraser 42e7334de5 x86-64: enforce memory limits imposed by virtual memory layout
... which currently means:
- The 1:1 map cannot deal with more than 1Tb.
- The m2p table can handle at most 8Tb.
- The page_info array can cover up to e.g. 1.6Gb (<=3D 64 CPUs) or
  1Tb (193-256 CPUs).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-09-16 15:57:22 +01:00
Keir Fraser 578f44c3e2 x86: also fix powernow's dom_mask
Just like for the Intel/ACPI cpufreq code, powernow's dom_mask also
must not be confined to the number of CPUs in the system.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-09-16 15:54:17 +01:00
Keir Fraser acd6ae0ad4 Merge with IA64 tree. 2008-09-16 13:53:47 +01:00
Keir Fraser 8530055bc0 x86, microcode: Free microcode_info struct at end of hypercall.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-16 13:49:16 +01:00
Keir Fraser 524c71bcb7 x86, microcode: Do not run microcode update in IRQ context.
It's unnecessary, and also invalid since the update process tries to
allocate memory.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-16 13:40:59 +01:00
Isaku Yamahata 4ba317f9fa merge with xen-unstable.hg 2008-09-16 21:25:30 +09:00
Keir Fraser 7441a335e4 x86: Simplify RDMSR pass-through emulation for certain
explicitly-named MSRs (but keep the names in the source code in case
we tighten up RDMSR emulation later).

Also add MSR_AMD_PATCHLEVEL MSR as explicitly required (for Solaris).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-16 13:18:32 +01:00
Keir Fraser 5f9a78e337 x86, microcode: More code cleanups.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-16 13:09:04 +01:00
Keir Fraser 59bbc091e9 stubdom/ioemu link farm creation fixes
Replace the stubdom/ioemu link farm creation in stubdom/Makefile,
with code which arranges that:
 * No symlinks are made for output files - in particular, any
   symlinks for .d files would be written through by the compiler
   and cause damage to the original tree and other strange
   behaviours
 * All subdirectories are made as local subdirectories rather than
   links
 * Any interrupted or half-completed creation of the link farm
   leaves the directory in a state where the link farming will be
   restarted
 * We use make's inherent ability to test for the existence of files
   rather than using [ -f ... ] at the start of the rule's commands
 * The list of files to be excluded from the link farm can be
   easily updated
etc.

This should fix some problems particularly with parallel builds,
or by-hand builds where directories are entered in other than the
usual order.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-09-16 12:44:26 +01:00
Keir Fraser a552727163 x86, microcode: Clean up for Xen coding style, and disable for now
(until allocations in irq context are fixed).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-16 11:26:19 +01:00
Keir Fraser 689db5e9fb Avoid parallel invocation of git for ioemu-remote.
The stubdom and tools directories both run `make ioemu-dir-find' in
tools.  In a parallel build, both these invocations can run
concurrently because we're doing recursive make.

This change fixes this problem by adding a suitable dependencies in
the top-level Makefile for the recursion into tools/ and stubdom/,
ensuring that the git fetch happens once, first.

The bug was introduced in 18472/18474.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-09-15 17:10:43 +01:00
Keir Fraser c694aed7c4 x86: Fix 32-bit build after AMD microcode update patch.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-15 15:44:38 +01:00
Keir Fraser 6266fa7f24 xsm: dummy module - implement missing stub
- This minor patch implements the missing stub function
security_label_to_details in the dummy module.  This stub function is
necessary to create domains with network interfaces for modules that
do not implement the security_label_to_details function.

Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
2008-09-15 11:36:20 +01:00
Keir Fraser 51fec0a9c7 vtd: minor edge case memory leak
Fixes an (unlikely) memory leak where mapped VT-d root entries are not
unmapped on allocation failure code path.

Signed-off-by: Ross Philipson <ross.philipson@citrix.com>
2008-09-15 11:35:20 +01:00
Keir Fraser b42db2ecdf x86, shadow: Allow removing writable mappings from splintered page tables.
The moving of the pagetable mapping in the linux kernel exposed the
fact that under the linux kernel sh_rm_write_access_from_sl1p was
always failing.

Linux seems to use big pages to access page tables, so we should
instruct the shadow code to be able to remove writable mappings from
splintered pagetables as well, avoiding using OS heuristic (which were
failing in 2.6.27 before George patch, leading to brute-force search
at each resync).

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2008-09-15 11:34:42 +01:00
Keir Fraser e7a8975119 x86, shadow: Fix comment about Linux direct-map address.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-13 08:15:26 +01:00
Keir Fraser bb401a4e5c x86, shadow: Add new location of Linux direct-map to the places to
look for writable mappings.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2008-09-12 16:45:37 +01:00
Keir Fraser bd7c09c0f8 x86: microcode update support for AMD CPUs
Microcode update support for AMD CPUs Family10h and Family11h.
It is based on a patch for Linux which is on its way for 2.6.28.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-09-12 14:18:13 +01:00
Keir Fraser 30c988711c $(XEN_ROOT) absolutification fixes for ioemu-remote (incl stubdom)
* Move code for generating an absolute version of XEN_ROOT
   into a common make variable set in Config.mk
 * Use this common code when invoking make -C ioemu-dir clean
   from tools/, which avoids a problem where `make clean' fails
   because qemu's (ioemu-remote's) build system wants to run
   `make clean' in `tests' but XEN_ROOT is a confection involving
   ../'s.
 * Use this common code in stubdom/Makefile, instead of $(abspath...)
   as the latter is a relatively new feature in GNU make and is not
   available in all the places that we want to be able to build
   (cf c/s 17997:3f23e01d31985899dbd1660b166f229f1ee74292)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-09-12 13:15:36 +01:00
Keir Fraser 8d701af28f Check the existence of serial port before using
Signed-off-by: Huacai Chen <huacai.chen@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-12 11:43:47 +01:00