]> xenbits.xensource.com Git - xen.git/log
xen.git
14 years agoxentop: fix NULL pointer dereference
Keir Fraser [Thu, 20 May 2010 13:10:07 +0000 (14:10 +0100)]
xentop: fix NULL pointer dereference

On my system, I'm getting SIGSEGVs in xentop because
xenstat_node_domain() is returning NULL.  Skip the loop if it does
rather than crashing.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agovmx: Convert more initialisation BUG()s into clean failures.
Keir Fraser [Wed, 19 May 2010 21:59:52 +0000 (22:59 +0100)]
vmx: Convert more initialisation BUG()s into clean failures.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86: When failing smp_callin() properly clean up before halting.
Keir Fraser [Wed, 19 May 2010 21:49:28 +0000 (22:49 +0100)]
x86: When failing smp_callin() properly clean up before halting.

In particular we must clear_local_APIC() else LAPIC NMI watchdog will
continue to fire and use a stack which no longer exists.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86: During boot, initialise cpu-numa info for all present CPUs.
Keir Fraser [Wed, 19 May 2010 20:14:57 +0000 (21:14 +0100)]
x86: During boot, initialise cpu-numa info for all present CPUs.

Previously we would skip ones we didn't bring online.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agovmx: Do not modify global vmx_vm{entry,exit}_control fields in init_vmcs_config()
Keir Fraser [Wed, 19 May 2010 19:46:05 +0000 (20:46 +0100)]
vmx: Do not modify global vmx_vm{entry,exit}_control fields in init_vmcs_config()

The function shoudl only have single-domain effect.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86: Remove debug code from previous changeset.
Keir Fraser [Wed, 19 May 2010 17:41:15 +0000 (18:41 +0100)]
x86: Remove debug code from previous changeset.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86: Fail CPU bringup cleanly if it cannot initialise HVM.
Keir Fraser [Wed, 19 May 2010 17:40:15 +0000 (18:40 +0100)]
x86: Fail CPU bringup cleanly if it cannot initialise HVM.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agokexec: Fix dodgy use of cpu_present_map protecting percpu data access.
Keir Fraser [Wed, 19 May 2010 17:38:19 +0000 (18:38 +0100)]
kexec: Fix dodgy use of cpu_present_map protecting percpu data access.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agocpupools: Quieten debug messages.
Keir Fraser [Wed, 19 May 2010 16:07:07 +0000 (17:07 +0100)]
cpupools: Quieten debug messages.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86: Streamline the CPU early boot process.
Keir Fraser [Wed, 19 May 2010 14:42:03 +0000 (15:42 +0100)]
x86: Streamline the CPU early boot process.

Mainly this involves getting rid of a bunch of cpumasks and replacing
with a single 'cpu_state' enumeration to track progress and allow
master-slave handshaking.

Cleaning this stuff up is a prerequisite for safely handling slave
failure (e.g., out of memory, invalid slave CPU capabilities,
...). This will get fixed up in a future patch.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoxen-hptool: A few usage cleanups.
Keir Fraser [Wed, 19 May 2010 13:18:56 +0000 (14:18 +0100)]
xen-hptool: A few usage cleanups.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agorcu: Migrate RCU work when taking a CPU offline.
Keir Fraser [Wed, 19 May 2010 13:06:37 +0000 (14:06 +0100)]
rcu: Migrate RCU work when taking a CPU offline.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoxl: Check for dom0 when instructed to destroy a domain.
Keir Fraser [Wed, 19 May 2010 11:53:44 +0000 (12:53 +0100)]
xl: Check for dom0 when instructed to destroy a domain.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
14 years agoxl: Add subcommand "xl debug-keys"
Keir Fraser [Wed, 19 May 2010 11:51:16 +0000 (12:51 +0100)]
xl: Add subcommand "xl debug-keys"

Can be used to send debug keys to Xen.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
14 years agolibxl: Add tmem support commands
Keir Fraser [Wed, 19 May 2010 11:48:32 +0000 (12:48 +0100)]
libxl: Add tmem support commands

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
14 years agotimers: Migrate timers away from an offlined CPU.
Keir Fraser [Wed, 19 May 2010 10:54:31 +0000 (11:54 +0100)]
timers: Migrate timers away from an offlined CPU.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86 nmi: Enable/disable dynamically on each CPU during hotplug.
Keir Fraser [Wed, 19 May 2010 10:39:08 +0000 (11:39 +0100)]
x86 nmi: Enable/disable dynamically on each CPU during hotplug.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoFix CPU hotplug after percpu data handling changes.
Keir Fraser [Wed, 19 May 2010 10:15:26 +0000 (11:15 +0100)]
Fix CPU hotplug after percpu data handling changes.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoVT-d: Fix ATS enabling for device assignment
Keir Fraser [Wed, 19 May 2010 07:22:06 +0000 (08:22 +0100)]
VT-d: Fix ATS enabling for device assignment

Currently, Xen only enables ATS in Xen booting. When an ATS capable
device is assigned to guest, ATS is actually not enabled because FLR
before assignment causes it to be disabled. Thus ATS cannot be used in
guest. This patch enables ATS in domain_context_mapping. This ensures
ATS is enabled in assignment because FLR is earlier than
domain_context_mapping call. Therefore ATS can be used in guest. This
patch also implements disable_ats_device to disable ATS when the
device is deassigned from a domain.

Signed-off-by: Weidong Han <weidong.han@intel.com>
14 years agolibxl: Compilation and other small fixes
Keir Fraser [Wed, 19 May 2010 07:20:46 +0000 (08:20 +0100)]
libxl: Compilation and other small fixes

* Some of the library functions such as fscanf, system, and asprintf
are declared with warn_unused_result (ubuntu server 9.10), causing
compilation errors in libxl.
* When using asprintf, the caller is responsible for freeing the
memory.
* memset takes wrong size argument in one of the places (caught by
a builtin gcc check).

Signed-off-by: Dulloor Rao <dulloor@gmail.com>
14 years agoxl: recognize the "extra" entry in the domain config file
Keir Fraser [Wed, 19 May 2010 07:18:51 +0000 (08:18 +0100)]
xl: recognize the "extra" entry in the domain config file

"extra" defines extra parameters to be added to the kernel command
line, so append it accordingly.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
14 years agolibxl: Set default shadow memory based on final values for vcpus and memory
Keir Fraser [Wed, 19 May 2010 07:15:05 +0000 (08:15 +0100)]
libxl: Set default shadow memory based on final values for vcpus and memory

Set default shadow memory based on final versions of memory and vcpus,
not on minimum default versions.

Failure mode was failed p2m allocaitons, e.g., with hvm-linux PV
drivers mapping the shared-info page.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
14 years agox86: Remove cpu_possible_map
Keir Fraser [Tue, 18 May 2010 14:18:26 +0000 (15:18 +0100)]
x86: Remove cpu_possible_map

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86: Dynamically allocate percpu data area when a CPU comes online.
Keir Fraser [Tue, 18 May 2010 14:13:45 +0000 (15:13 +0100)]
x86: Dynamically allocate percpu data area when a CPU comes online.

At the same time, the data area starts life zeroed.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86: Pull dynamic memory allocation out of do_boot_cpu().
Keir Fraser [Tue, 18 May 2010 14:05:54 +0000 (15:05 +0100)]
x86: Pull dynamic memory allocation out of do_boot_cpu().

This has two advantages:
 (a) We can move the allocations to a context where we can handle
     failure.
 (b) We can implement matching deallocations on CPU offline.

Only the idle vcpu structure is now not freed on CPU offline. This
probably does not really matter.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agocpu hotplug: tasklet and timer initialisation is high priority.
Keir Fraser [Tue, 18 May 2010 12:41:55 +0000 (13:41 +0100)]
cpu hotplug: tasklet and timer initialisation is high priority.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agomem_sharing: use paging_mode_hap
Keir Fraser [Tue, 18 May 2010 12:31:24 +0000 (13:31 +0100)]
mem_sharing: use paging_mode_hap

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
14 years agox86-hpet: fix booting NULL pointer panic introduced by c/s 21398.
Keir Fraser [Tue, 18 May 2010 12:30:45 +0000 (13:30 +0100)]
x86-hpet: fix booting NULL pointer panic introduced by c/s 21398.

(XEN) Xen call trace:
(XEN)    [<ffff82c48011fb27>] check_lock+0x19/0x49
(XEN)    [<ffff82c48011ff2a>] _spin_lock_irq+0x28/0x4a
(XEN)    [<ffff82c48018fd6d>] hpet_broadcast_exit+0x92/0x1f0
(XEN)    [<ffff82c4801920b2>] acpi_processor_idle+0x62c/0x6e6
(XEN)    [<ffff82c48014e1a1>] idle_loop+0x62/0x73

Signed-off-by: Wei Gang <gang.wei@intel.com>
14 years agoClean up notifier-chain interface and use new interface in CPU hotplug.
Keir Fraser [Tue, 18 May 2010 12:23:02 +0000 (13:23 +0100)]
Clean up notifier-chain interface and use new interface in CPU hotplug.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoxl: allow scaling suffix on memory sizes in mem-set and mem-max
Keir Fraser [Tue, 18 May 2010 10:38:12 +0000 (11:38 +0100)]
xl: allow scaling suffix on memory sizes in mem-set and mem-max

Allow mem-set and mem-max to take 'b', 'k', 'm', 'g' and 't' as
scaling suffixes for bytes, kilobytes, mega, etc.  An unadorned number
is still treated as kilobytes so no existing users should be affected.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86: Allow PV superpages to work with live migration
Keir Fraser [Tue, 18 May 2010 10:24:04 +0000 (11:24 +0100)]
x86: Allow PV superpages to work with live migration

PV superpages currently do not work with live migration.  They fall
over dead when the shadow page table is enabled for dirty tracking.
The HVM support for superpages in this code has been tested and found
to work just fine for PV superpages.  This patch modifies the test
macro to allow the code to work with PV superpages.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agosvm: Fix for AMD erratum 383 on Family 10h CPUs
Keir Fraser [Tue, 18 May 2010 10:21:25 +0000 (11:21 +0100)]
svm: Fix for AMD erratum 383 on Family 10h CPUs

This patches implements the workaround of AMD erratum 383 on family
10h CPUs. It destroys the guest VM when a MC error with a special
pattern is detected. Without this patch, a guest VM failure can
potentially crash Xen hypervisor and the whole system. The erratum
will be published in next version of guide.

Signed-off-by: Wei Huang <wei.huang2@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Christoph Egger <christoph.egger@amd.com>
14 years agocpupool: Fix CPU hotplug after recent changes.
Keir Fraser [Mon, 17 May 2010 17:52:01 +0000 (18:52 +0100)]
cpupool: Fix CPU hotplug after recent changes.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86: Quieten microcode.c during CPU hotplug
Keir Fraser [Mon, 17 May 2010 17:51:29 +0000 (18:51 +0100)]
x86: Quieten microcode.c during CPU hotplug

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86: Reindent smpboot.c and clean up a little.
Keir Fraser [Mon, 17 May 2010 15:58:24 +0000 (16:58 +0100)]
x86: Reindent smpboot.c and clean up a little.

No semantic changes.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86: Remove special-case paths for start-of-day SMP bringup.
Keir Fraser [Mon, 17 May 2010 15:28:56 +0000 (16:28 +0100)]
x86: Remove special-case paths for start-of-day SMP bringup.

All CPUs are now brought up in __cpu_up(), in the correct order for
cpu-bringup notifiers.

Notably ganged TSC calibration is removed. This was another
start-of-day-specific aspect of bringup. If we really need
calibration, I think we can come up with an efficient method for APs
to calibrate themselves against PIT during their bringup (even
asynchronously, if required for efficiency).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agointel_txt: to fix intel txt S3 resume failure since c/s 21108
Keir Fraser [Mon, 17 May 2010 10:05:21 +0000 (11:05 +0100)]
intel_txt: to fix intel txt S3 resume failure since c/s 21108

This patch is to fix S3 resume failure with Intel TXT/tboot launched,
brought by c/s 21108.  Don't printk anything between two
tboot_gen_xenheap_integrity() calls for release build or debug build.
Or else xen heap will be changed, which causes that memory integrity
will be lost on S3 resume.

Signed-off-by: Shane Wang <shane.wang@intel.com>
14 years agoxend: suppress errors during capabilities check
Keir Fraser [Mon, 17 May 2010 09:56:36 +0000 (10:56 +0100)]
xend: suppress errors during capabilities check

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoocaml: Disable parallel make
Keir Fraser [Mon, 17 May 2010 09:54:46 +0000 (10:54 +0100)]
ocaml: Disable parallel make

There seem to be multiple dependency issues when building oxenstored.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agox86: Fix indentation in mpparse.c
Keir Fraser [Sat, 15 May 2010 08:22:55 +0000 (09:22 +0100)]
x86: Fix indentation in mpparse.c

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agonuma: Remove node_possible_map definitions.
Keir Fraser [Sat, 15 May 2010 08:19:45 +0000 (09:19 +0100)]
numa: Remove node_possible_map definitions.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agox86 hpet: Avoid use of cpu_possible_map
Keir Fraser [Sat, 15 May 2010 08:17:06 +0000 (09:17 +0100)]
x86 hpet: Avoid use of cpu_possible_map

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agocredit2: Avoid use of cpu_possible_map
Keir Fraser [Sat, 15 May 2010 08:16:47 +0000 (09:16 +0100)]
credit2: Avoid use of cpu_possible_map

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoMerge
Keir Fraser [Sat, 15 May 2010 07:40:03 +0000 (08:40 +0100)]
Merge

15 years agoxend: Fix getStubdomDomid function
Keir Fraser [Sat, 15 May 2010 07:31:42 +0000 (08:31 +0100)]
xend: Fix getStubdomDomid function

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoAdd MSR support for various feature AMD processor families.
Keir Fraser [Sat, 15 May 2010 07:29:59 +0000 (08:29 +0100)]
Add MSR support for various feature AMD processor families.

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
15 years agoxentrace: install scripts with python install wrapper
Keir Fraser [Sat, 15 May 2010 07:29:21 +0000 (08:29 +0100)]
xentrace: install scripts with python install wrapper

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
15 years agolibxl: Add missing start_time entry when create and restore VMs.
Keir Fraser [Sat, 15 May 2010 07:27:22 +0000 (08:27 +0100)]
libxl: Add missing start_time entry when create and restore VMs.

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
15 years agoReserve MMUEXT_[UN]MARK_SUPER mmuext operations.
Keir Fraser [Fri, 14 May 2010 19:49:41 +0000 (20:49 +0100)]
Reserve MMUEXT_[UN]MARK_SUPER mmuext operations.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoRemove many uses of cpu_possible_map and iterators over NR_CPUS.
Keir Fraser [Fri, 14 May 2010 19:37:02 +0000 (20:37 +0100)]
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>
15 years agotrace: Do not touch percpu data for "impossible" cpus.
Keir Fraser [Fri, 14 May 2010 17:39:02 +0000 (18:39 +0100)]
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>
15 years agoSome cleanups to cpu offline handling.
Keir Fraser [Fri, 14 May 2010 17:25:55 +0000 (18:25 +0100)]
Some cleanups to cpu offline handling.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agocpu: Quieten normal CPU hotplug operations.
Keir Fraser [Fri, 14 May 2010 16:48:53 +0000 (17:48 +0100)]
cpu: Quieten normal CPU hotplug operations.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agostop_machine: Pass cpu number to tasklet handler.
Keir Fraser [Fri, 14 May 2010 16:48:34 +0000 (17:48 +0100)]
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>
15 years agoRemove unused PAGE_SCRUB_SOFTIRQ definition.
Keir Fraser [Fri, 14 May 2010 16:21:32 +0000 (17:21 +0100)]
Remove unused PAGE_SCRUB_SOFTIRQ definition.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoMove cpu hotplug routines into common cpu.c file.
Keir Fraser [Fri, 14 May 2010 16:07:52 +0000 (17:07 +0100)]
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>
15 years agox86: Implement cpu hotplug notifiers. Use them.
Keir Fraser [Fri, 14 May 2010 14:22:48 +0000 (15:22 +0100)]
x86: Implement cpu hotplug notifiers. Use them.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agox86: Do no thold cpu_add_remove_lock across stop_machine_run().
Keir Fraser [Fri, 14 May 2010 10:39:15 +0000 (11:39 +0100)]
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>
15 years agoImport raw notifier subsystem from Linux.
Keir Fraser [Fri, 14 May 2010 09:13:30 +0000 (10:13 +0100)]
Import raw notifier subsystem from Linux.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoxl: Add include-only-once checks to xl_cmd{impl,table}.h
Keir Fraser [Fri, 14 May 2010 07:05:05 +0000 (08:05 +0100)]
xl: Add include-only-once checks to xl_cmd{impl,table}.h

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoxl: Add "xl uptime" command, a clone of "xm uptime".
Keir Fraser [Fri, 14 May 2010 07:01:51 +0000 (08:01 +0100)]
xl: Add "xl uptime" command, a clone of "xm uptime".

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
15 years agoxl: Check invalid domid in find_domain()
Keir Fraser [Fri, 14 May 2010 06:56:43 +0000 (07:56 +0100)]
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>
15 years agolibxl: Fix missing memory/target xenstore entry on domain creation
Keir Fraser [Fri, 14 May 2010 06:55:14 +0000 (07:55 +0100)]
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>
15 years agolibxl: Adjustments to memset/memmax handling
Keir Fraser [Fri, 14 May 2010 06:53:16 +0000 (07:53 +0100)]
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
15 years agomce: Fix mcheck_mca_logout to increase errcnt when valid entry found.
Keir Fraser [Fri, 14 May 2010 06:52:24 +0000 (07:52 +0100)]
mce: Fix mcheck_mca_logout to increase errcnt when valid entry found.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
15 years agoxenstore: Fix cleanup_pop() definition for some (buggy) pthread.h headers.
Keir Fraser [Thu, 13 May 2010 11:21:16 +0000 (12:21 +0100)]
xenstore: Fix cleanup_pop() definition for some (buggy) pthread.h headers.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoEven 'dummy' domains (e.g., dom_xen a.k.a. DOMID_XEN) must have valid I/O caps.
Keir Fraser [Thu, 13 May 2010 09:09:02 +0000 (10:09 +0100)]
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>
15 years agox86: Fix a few on_{selected,each}_cpus callers who should wait for completion.
Keir Fraser [Thu, 13 May 2010 08:44:20 +0000 (09:44 +0100)]
x86: Fix a few on_{selected,each}_cpus callers who should wait for completion.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agolibxl: Check return codes of write/asprintf/daemon consistently.
Keir Fraser [Thu, 13 May 2010 08:35:05 +0000 (09:35 +0100)]
libxl: Check return codes of write/asprintf/daemon consistently.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoVPMU: Implement vpmu support for AMD family 10h processors
Keir Fraser [Thu, 13 May 2010 07:56:49 +0000 (08:56 +0100)]
VPMU: Implement vpmu support for AMD family 10h processors

Signed-off-by: Wei Wang <wei.wang2@amd.com>
15 years agoVPMU: Enable vpmu for svm
Keir Fraser [Thu, 13 May 2010 07:56:10 +0000 (08:56 +0100)]
VPMU: Enable vpmu for svm

Signed-off-by: Wei Wang <wei.wang2@amd.com>
15 years agoVPMU: Make vpmu stucture visiable for both vmx and svm
Keir Fraser [Thu, 13 May 2010 07:55:41 +0000 (08:55 +0100)]
VPMU: Make vpmu stucture visiable for both vmx and svm

Signed-off-by: Wei Wang <wei.wang2@amd.com>
15 years agoVPMU: Migrate vpmu files into public folders
Keir Fraser [Thu, 13 May 2010 07:55:06 +0000 (08:55 +0100)]
VPMU: Migrate vpmu files into public folders

Signed-off-by: Wei Wang <wei.wang2@amd.com>
15 years agoxl: Implement block-detach command
Keir Fraser [Thu, 13 May 2010 07:52:47 +0000 (08:52 +0100)]
xl: Implement block-detach command

Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
15 years agoxl: Implement block-list command
Keir Fraser [Thu, 13 May 2010 07:51:50 +0000 (08:51 +0100)]
xl: Implement block-list command

Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
15 years agoxl: Implement block-attach command
Keir Fraser [Thu, 13 May 2010 07:50:54 +0000 (08:50 +0100)]
xl: Implement block-attach command

Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
15 years agoxl: Implement network-detach command
Keir Fraser [Thu, 13 May 2010 07:49:41 +0000 (08:49 +0100)]
xl: Implement network-detach command

Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
15 years agoxl: Implement network-list command
Keir Fraser [Thu, 13 May 2010 07:48:35 +0000 (08:48 +0100)]
xl: Implement network-list command

Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
15 years agoxl: Implement network-attach
Keir Fraser [Thu, 13 May 2010 07:46:57 +0000 (08:46 +0100)]
xl: Implement network-attach

Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
15 years agomce: MCE polling logic should check mce_disabled during initialisation.
Keir Fraser [Wed, 12 May 2010 08:09:40 +0000 (09:09 +0100)]
mce: MCE polling logic should check mce_disabled during initialisation.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoxl: Add check for command 'xl mem-set'
Keir Fraser [Wed, 12 May 2010 07:53:27 +0000 (08:53 +0100)]
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>
15 years agoxl: Add command 'xl mem-max'
Keir Fraser [Wed, 12 May 2010 07:52:59 +0000 (08:52 +0100)]
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>
15 years agoxl: Add "xl top" command, a clone of "xm top".
Keir Fraser [Wed, 12 May 2010 07:52:30 +0000 (08:52 +0100)]
xl: Add "xl top" command, a clone of "xm top".

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
15 years agoxl: Add "xl sysrq" command, a clone of "xm sysrq".
Keir Fraser [Wed, 12 May 2010 07:52:07 +0000 (08:52 +0100)]
xl: Add "xl sysrq" command, a clone of "xm sysrq".

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
15 years agovmx: Change the default Pause-Loop-Exiting "Gap" parameter
Keir Fraser [Wed, 12 May 2010 07:51:26 +0000 (08:51 +0100)]
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>
15 years agoxs: avoid pthread_join deadlock in xs_daemon_close
Keir Fraser [Wed, 12 May 2010 07:49:13 +0000 (08:49 +0100)]
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>
15 years agoxs: make sure mutexes are cleaned up and memory freed if the read thread is cancelled
Keir Fraser [Wed, 12 May 2010 07:48:14 +0000 (08:48 +0100)]
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>
15 years agocredit2: Fix tasklets
Keir Fraser [Wed, 12 May 2010 07:47:10 +0000 (08:47 +0100)]
credit2: Fix tasklets

Signed-off-by: George Dunlap <George.Dunlap@eu.citrix.com>
15 years agoHonour XEN_LINUX_GIT_LOCALBRANCH and XEN_LINUX_GITREV variables
Keir Fraser [Wed, 12 May 2010 07:43:47 +0000 (08:43 +0100)]
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>
15 years agodomctl: Fix cpumap/cpumask conversion functions to return an error code.
Keir Fraser [Wed, 12 May 2010 07:42:30 +0000 (08:42 +0100)]
domctl: Fix cpumap/cpumask conversion functions to return an error code.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agox86: Replace our own specialised versions of memset and memcpy with
Keir Fraser [Tue, 11 May 2010 13:05:28 +0000 (14:05 +0100)]
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>
15 years agoxl: use help table to describe command help information
Keir Fraser [Tue, 11 May 2010 11:37:26 +0000 (12:37 +0100)]
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>
15 years agoxl: Add "xl trigger" command, a clone of "xm trigger".
Keir Fraser [Tue, 11 May 2010 10:23:54 +0000 (11:23 +0100)]
xl: Add "xl trigger" command, a clone of "xm trigger".

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
15 years agox86: Detect and handle unexpected platform-timer counter wrap.
Keir Fraser [Tue, 11 May 2010 10:21:27 +0000 (11:21 +0100)]
x86: Detect and handle unexpected platform-timer counter wrap.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoDefine ABS() library function. Use it.
Keir Fraser [Tue, 11 May 2010 10:19:23 +0000 (11:19 +0100)]
Define ABS() library function. Use it.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agotasklet: Improve scheduler interaction.
Keir Fraser [Tue, 11 May 2010 10:10:24 +0000 (11:10 +0100)]
tasklet: Improve scheduler interaction.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agolibxl: More cpupool fixes.
Keir Fraser [Tue, 11 May 2010 07:39:01 +0000 (08:39 +0100)]
libxl: More cpupool fixes.

Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
15 years agoxl: "vncunused" is documented to default to 1.
Keir Fraser [Tue, 11 May 2010 07:37:25 +0000 (08:37 +0100)]
xl: "vncunused" is documented to default to 1.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agox86: Export timer hypercalls to HVM guests too
Keir Fraser [Tue, 11 May 2010 07:36:30 +0000 (08:36 +0100)]
x86: Export timer hypercalls to HVM guests too

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
15 years agoVT-d: prevent watchdog timer from kicking in when
Keir Fraser [Tue, 11 May 2010 07:35:45 +0000 (08:35 +0100)]
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>