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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>