Commit Graph
21395 Commits
Author SHA1 Message Date
Keir Fraser e6cbaaddae xend: Fix getStubdomDomid function
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-15 08:31:42 +01:00
Keir Fraser 3157bb4e13 Add MSR support for various feature AMD processor families.
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
2010-05-15 08:29:59 +01:00
Keir Fraser 865f566d8c xentrace: install scripts with python install wrapper
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-05-15 08:29:21 +01:00
Keir Fraser 1efc662aba libxl: Add missing start_time entry when create and restore VMs.
Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
2010-05-15 08:27:22 +01:00
Keir Fraser 7f01473211 Remove many uses of cpu_possible_map and iterators over NR_CPUS.
The significant remaining culprits for x86 are credit2, hpet, and
percpu-area subsystems. To be dealt with in a separate patch.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-14 20:37:02 +01:00
Keir Fraser f9ffb1134c trace: Do not touch percpu data for "impossible" cpus.
While here, in fact only touch per-cpu data for online cpus. Use cpu
notifier chain to initialise per-cpu spinlock dynamically.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-14 18:39:02 +01:00
Keir Fraser 06111bb25b Some cleanups to cpu offline handling.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-14 18:25:55 +01:00
Keir Fraser c1bc99b8a7 cpu: Quieten normal CPU hotplug operations.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-14 17:48:53 +01:00
Keir Fraser d166917029 stop_machine: Pass cpu number to tasklet handler.
Otherwise the BUG_ON() I added to the handler always BUGs!

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-14 17:48:34 +01:00
Keir Fraser 996d727761 Remove unused PAGE_SCRUB_SOFTIRQ definition.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-14 17:21:32 +01:00
Keir Fraser 27c31d3867 Move cpu hotplug routines into common cpu.c file.
Also simplify the locking (reverting to use if spin_trylock, as
returning EBUSY/EAGAIN seems unavoidable after all). In particular
this should continue to ensure that stop_machine_run() does not have
cpu_online_map change under its feet.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-14 17:07:52 +01:00
Keir Fraser 2e4146ddc2 x86: Implement cpu hotplug notifiers. Use them.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-14 15:22:48 +01:00
Keir Fraser 2a814aeaaf x86: Do no thold cpu_add_remove_lock across stop_machine_run().
Instead we protect against concurrent online/offline requests for a
single CPU asynchronously, using a cpumask for bookkeeping.

This means that cpu_add_remove_lock no longer needs to be acquired via
spin_trylock.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-14 11:39:15 +01:00
Keir Fraser 5afdabbf82 Import raw notifier subsystem from Linux.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-14 10:13:30 +01:00
Keir Fraser e1e86ff4a2 xl: Add include-only-once checks to xl_cmd{impl,table}.h
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-14 08:05:05 +01:00
Keir Fraser 9fa16606cb xl: Add "xl uptime" command, a clone of "xm uptime".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-14 08:01:51 +01:00
Keir Fraser 102f8460ca xl: Check invalid domid in find_domain()
If domain id is invalid, find_domain should return error because
the specified domain does not exist.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-14 07:56:43 +01:00
Keir Fraser 1803120b06 libxl: Fix missing memory/target xenstore entry on domain creation
There was a simple bug in stuffing the initial setup array.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-05-14 07:55:14 +01:00
Keir Fraser 3921297ea2 libxl: Adjustments to memset/memmax handling
I think xl memset should change the memory currently used by the guest
and xl memmax should change the size of the guest's address space and
not the population.  For this reason libxl_set_memory_target should
provide a way to enforce the memory target, calling
xc_domain_setmaxmem.  On the other hand xl memmax shouldn't call
xc_domain_setmaxmem because that is the upper bound of the memory
reservation, it should just change static-max, that at the moment
wouldn't do much, but we can imagine that in the future could trigger
something useful in the guest.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jonathan Knowles <Jonathan.Knowles@eu.citrix.com>=20
2010-05-14 07:53:16 +01:00
Keir Fraser 98c10bc898 mce: Fix mcheck_mca_logout to increase errcnt when valid entry found.
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
2010-05-14 07:52:24 +01:00
Keir Fraser b4dee233da xenstore: Fix cleanup_pop() definition for some (buggy) pthread.h headers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-13 12:21:16 +01:00
Keir Fraser 117f6cf564 Even 'dummy' domains (e.g., dom_xen a.k.a. DOMID_XEN) must have valid I/O caps.
Ensure the rangesets are always initialised. Certain (privileged)
invocations of hypercalls such as mmu_update can end up interrogating
these special domains for possible I/O capabilities.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-13 10:09:02 +01:00
Keir Fraser 9bb270086f x86: Fix a few on_{selected,each}_cpus callers who should wait for completion.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-13 09:44:20 +01:00
Keir Fraser eac0f64d80 libxl: Check return codes of write/asprintf/daemon consistently.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-13 09:35:05 +01:00
Keir Fraser d09e6e47f0 VPMU: Implement vpmu support for AMD family 10h processors
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2010-05-13 08:56:49 +01:00
Keir Fraser d27901d494 VPMU: Enable vpmu for svm
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2010-05-13 08:56:10 +01:00
Keir Fraser 2936184088 VPMU: Make vpmu stucture visiable for both vmx and svm
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2010-05-13 08:55:41 +01:00
Keir Fraser ced736bf18 VPMU: Migrate vpmu files into public folders
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2010-05-13 08:55:06 +01:00
Keir Fraser f4de8d0315 xl: Implement block-detach command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:52:47 +01:00
Keir Fraser a9733d50ff xl: Implement block-list command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:51:50 +01:00
Keir Fraser 2b579c5add xl: Implement block-attach command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:50:54 +01:00
Keir Fraser d32239ba6e xl: Implement network-detach command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:49:41 +01:00
Keir Fraser 742c6e551a xl: Implement network-list command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:48:35 +01:00
Keir Fraser 1a043dad2a xl: Implement network-attach
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:46:57 +01:00
Keir Fraser e27c13f119 mce: MCE polling logic should check mce_disabled during initialisation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-12 09:09:40 +01:00
Keir Fraser c0910cbc5b xl: Add check for command 'xl mem-set'
Get max memory from /local/domain/$domid/memory/static-max, and then
do value check. The value larger than static-max is invalid.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-05-12 08:53:27 +01:00
Keir Fraser bf4215becc xl: Add command 'xl mem-max'
Add subcommand 'xl mem-max', can be used to set static max memory

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-05-12 08:52:59 +01:00
Keir Fraser 59e0af401a xl: Add "xl top" command, a clone of "xm top".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-12 08:52:30 +01:00
Keir Fraser c614ef19d3 xl: Add "xl sysrq" command, a clone of "xm sysrq".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-12 08:52:07 +01:00
Keir Fraser 1e2619f4b0 vmx: Change the default Pause-Loop-Exiting "Gap" parameter
PLE_Gap controls teh maximum allowable time between executions of
PAUSE in a busy loop. Essentially this controls the sensitivity of the
processor's busy-loop detection.

Changed the default PLE_Gap to 128 for
1. not using odd number like 41
2. getting a little bit more PLE vmexits to improve performance

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
2010-05-12 08:51:26 +01:00
Keir Fraser 990e331218 xs: avoid pthread_join deadlock in xs_daemon_close
Doing a pthread_cancel and join on the reader thread while holding all
the request/reply/watch mutexes can deadlock if the thread needs to
take any of those mutexes to exit.  Kill off the reader thread before
taking any mutexes (which should be redundant if we're
single-threaded at that point).

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-12 08:49:13 +01:00
Keir Fraser 20a817b0a7 xs: make sure mutexes are cleaned up and memory freed if the read thread is cancelled
If the read thread is terminated with pthread cancel, it must make
sure all memory is freed and mutexes are unlocked.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-12 08:48:14 +01:00
Keir Fraser d92e69a17a credit2: Fix tasklets
Signed-off-by: George Dunlap <George.Dunlap@eu.citrix.com>
2010-05-12 08:47:10 +01:00
Keir Fraser 96e4190045 Honour XEN_LINUX_GIT_LOCALBRANCH and XEN_LINUX_GITREV variables
XEN_GIT_ORIGIN to set the name of the remote origin; the default is
still "xen".

XEN_LINUX_GIT_LOCALBRANCH allows the name of the local branch to be
set.  The default is the same as the remote branch.

XEN_LINUX_GITREV allows a specific GIT revision to be checked out,
rather than a branch.  By default it is the remote branch name.

This change should result in no change in behaviour in the normal
case.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-12 08:43:47 +01:00
Keir Fraser ed562546ce domctl: Fix cpumap/cpumask conversion functions to return an error code.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-12 08:42:30 +01:00
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