]> xenbits.xensource.com Git - xen.git/log
xen.git
13 years agoautoconf: add missing compression checks for libxc
Roger Pau Monne [Wed, 14 Mar 2012 14:20:58 +0000 (14:20 +0000)]
autoconf: add missing compression checks for libxc

Move missing checks from tools/libxc/Makefile to configure script.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Jan Beulich <JBeulich@suse.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoautoconf: check for uuid.h or uuid/uuid.h with -luuid
Roger Pau Monne [Wed, 14 Mar 2012 14:19:42 +0000 (14:19 +0000)]
autoconf: check for uuid.h or uuid/uuid.h with -luuid

Check for uuid/uuid.h and if found check for -luuid usability (Linux
case), if not, check for uuid (NetBSD). One of this tests has to
succeed to be able to build Xen tools.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agotools: Add explicit clean rule for SeaBIOS
Ian Campbell [Wed, 14 Mar 2012 14:10:17 +0000 (14:10 +0000)]
tools: Add explicit clean rule for SeaBIOS

Since seabios-dir is cloned during build we need to check that it exists before
recursing into it for clean, following the pattern used for qemu-*-dir etc.

Also remove usage of "buildmakevars2shellvars" except when used to poopulate
the environment for qemu-xen-traditional's xen-setup script, which is the only
user.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoautoconf: check for Python.h header and -lpython* lib
Roger Pau Monne [Wed, 14 Mar 2012 14:08:04 +0000 (14:08 +0000)]
autoconf: check for Python.h header and -lpython* lib

Check that the package usually called python-dev is present.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoxl: Implement sched-credit schedule parameter command-line interface
George Dunlap [Wed, 14 Mar 2012 14:06:04 +0000 (14:06 +0000)]
xl: Implement sched-credit schedule parameter command-line interface

Add features to the sched-credit interface to allow querying and
displaying scheduler parameters.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoxl: Refactor sched_domain_output to have a callback for pool information
George Dunlap [Wed, 14 Mar 2012 14:04:58 +0000 (14:04 +0000)]
xl: Refactor sched_domain_output to have a callback for pool information

Allow a scheduler to provide a callback to display pool-wide information,
providing a default.  This is in preparation for displaying pool-wide
scheduler parameters on this line.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agotapdisk2: initialize 'name' parameter of BLKTAP2_IOCTL_CREATE_DEVICE
Jan Beulich [Wed, 14 Mar 2012 11:40:44 +0000 (11:40 +0000)]
tapdisk2: initialize 'name' parameter of BLKTAP2_IOCTL_CREATE_DEVICE

This keeps the kernel driver from printing garbage.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoxl: display max_cpu_ids for xl info
Andrew Cooper [Wed, 14 Mar 2012 11:10:20 +0000 (11:10 +0000)]
xl: display max_cpu_ids for xl info

Expose `max_cpu_id' in stdout from `xl info'

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoMerge
Ian Jackson [Wed, 14 Mar 2012 11:03:37 +0000 (11:03 +0000)]
Merge

13 years agogitignore: Add cscope files
Ian Campbell [Wed, 14 Mar 2012 11:03:13 +0000 (11:03 +0000)]
gitignore: Add cscope files

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoarm: add generated files to .gitignore and .hgignore
David Vrabel [Wed, 14 Mar 2012 10:12:38 +0000 (10:12 +0000)]
arm: add generated files to .gitignore and .hgignore

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoarm: introduce more hypercalls
Stefano Stabellini [Wed, 14 Mar 2012 09:47:05 +0000 (09:47 +0000)]
arm: introduce more hypercalls

Implement xen_version, event_channel_op, memory_op sysctl and physdev_op
hypercalls.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoarm: handle dom0_max_vcpus=0 case properly
Ian Campbell [Wed, 14 Mar 2012 09:47:04 +0000 (09:47 +0000)]
arm: handle dom0_max_vcpus=0 case properly

Also use xzalloc_array.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoarm: fix inflight_irqs list priority ordering
Stefano Stabellini [Wed, 14 Mar 2012 09:47:03 +0000 (09:47 +0000)]
arm: fix inflight_irqs list priority ordering

Lower priority integers mean higher priority.
Also when we are about to insert the lowest priority IRQ so far, add it
at the end.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoarm: rename link to inflight
Stefano Stabellini [Wed, 14 Mar 2012 09:47:02 +0000 (09:47 +0000)]
arm: rename link to inflight

The link field in pending_irq has a confusing name so rename it to
inflight and comment its behaviour.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agotools/hotplug/Linux/init.d/: create /var/run/xen if not exists
Fabio Fantoni [Tue, 13 Mar 2012 17:30:50 +0000 (17:30 +0000)]
tools/hotplug/Linux/init.d/: create /var/run/xen if not exists

Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agotools/python: Fix indenting in 25030:6ced0ed954d6
Ian Jackson [Tue, 13 Mar 2012 17:21:37 +0000 (17:21 +0000)]
tools/python: Fix indenting in 25030:6ced0ed954d6

Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agotools/python: Py_INCREF(Py_None) when returing Py_None
Marek Marczykowski [Tue, 13 Mar 2012 17:19:47 +0000 (17:19 +0000)]
tools/python: Py_INCREF(Py_None) when returing Py_None

Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoxl block-detach: allow other than numeric-decimal specification of the disk
Jan Beulich [Tue, 13 Mar 2012 17:11:09 +0000 (17:11 +0000)]
xl block-detach: allow other than numeric-decimal specification of the disk

... to be in sync with block-attach.  And rename the function.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agolibxl: always set a default value for VFB.opengl
Ian Campbell [Tue, 13 Mar 2012 17:06:36 +0000 (17:06 +0000)]
libxl: always set a default value for VFB.opengl

Fixes an assertion failure.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reported-by: Fantu <fantonifabio@tiscali.it>
Tested-by: Fantu <fantonifabio@tiscali.it>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agotools, build: Fix libaio Makefile to put files in $(DESTDIR)
George Dunlap [Tue, 13 Mar 2012 16:26:20 +0000 (16:26 +0000)]
tools, build: Fix libaio Makefile to put files in $(DESTDIR)

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoMerge
Ian Jackson [Tue, 13 Mar 2012 16:07:50 +0000 (16:07 +0000)]
Merge

13 years agoarm: use r12 to pass the hypercall number
Stefano Stabellini [Tue, 13 Mar 2012 16:04:05 +0000 (16:04 +0000)]
arm: use r12 to pass the hypercall number

** This is a guest visible ABI change which requires an updated guest kernel **

Use r12 to pass the hypercall number and r0-r4 for the hypercall
arguments.

Use the ISS to pass an hypervisor specific tag.

Remove passing unused registers to arm_hypercall_table: we don't have 6
arguments hypercalls and we never use 64 bit values as hypercall
arguments, 64 bit values are only contained within structs passed as
arguments.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[ use #ifndef NDEBUG, fix coding style, expand calling convention comment
  slightly and added a big fat note about ABI change - ijc ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoxenstat: Use local domain names
Daniel De Graaf [Tue, 13 Mar 2012 15:40:42 +0000 (15:40 +0000)]
xenstat: Use local domain names

The domain name stored in /local/domain/$domid/name is simpler to
access and is the only domain name modified by "xl rename". Use this
domain name in libxenstat's reporting.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agolibxl: fix libxl_get_cpu_topology
Wei Liu [Tue, 13 Mar 2012 15:36:58 +0000 (15:36 +0000)]
libxl: fix libxl_get_cpu_topology

Fix upper bound of for loop, thus preventing memory corruption.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agolibxl: publish number of paged pages.
Andres Lagar-Cavilla [Tue, 13 Mar 2012 15:34:54 +0000 (15:34 +0000)]
libxl: publish number of paged pages.

This is information is currently not harvested from libxc.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoUpdate SEABIOS_UPSTREAM_TAG
Ian Campbell [Tue, 13 Mar 2012 15:32:10 +0000 (15:32 +0000)]
Update SEABIOS_UPSTREAM_TAG

Switch to recently released 1.6.3.2 from upstream. This incorporates all the
changesets which we previously applied to 1.6.3.1.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoMerge
Ian Jackson [Tue, 13 Mar 2012 15:28:41 +0000 (15:28 +0000)]
Merge

13 years agoautoconf: add check for curses library
Roger Pau Monne [Tue, 13 Mar 2012 15:23:35 +0000 (15:23 +0000)]
autoconf: add check for curses library

Check for a curses compatible library (curses or ncurses basically).
One of those is needed to compile Xen tools (gtraceview and xentop).

Modify Makefiles/sources to use configure output (fetch CURSES_LIBS
from tools/Tools.mk and header to include from tools/config.h)

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoarm: Put the CPU into a sleep state in the idle loop
Tim Deegan [Tue, 13 Mar 2012 15:11:00 +0000 (15:11 +0000)]
arm: Put the CPU into a sleep state in the idle loop

The ARM doesn't actually say that the WFI instruction will return
immediately if CPSR.I is clear and an instruction is pending, but
this seems to match up with how linux uses it.

Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoarm: Actually free __init/__initdata ranges on boot
Tim Deegan [Tue, 13 Mar 2012 15:10:59 +0000 (15:10 +0000)]
arm: Actually free __init/__initdata ranges on boot

Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoarm: new hook for late MMU setup on secondary CPUs
Tim Deegan [Tue, 13 Mar 2012 15:10:58 +0000 (15:10 +0000)]
arm: new hook for late MMU setup on secondary CPUs

The boot CPU turns on W^X in setup_pagetables().  Do the same for other
CPUs after they boot.  If we go to per-CPU pagetables, this is where
that will happen.

Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoarm: Shutdown and reboot
Tim Deegan [Tue, 13 Mar 2012 15:10:57 +0000 (15:10 +0000)]
arm: Shutdown and reboot

Reboot runes grabbed from linux's SP810 reset function.
Doesn't seem to work on the model, though.

Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoarm: SMP CPU shutdown
Tim Deegan [Tue, 13 Mar 2012 15:10:56 +0000 (15:10 +0000)]
arm: SMP CPU shutdown

For completeness, also implelent the CPU shutdown path.

Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoarm: Boot secondary CPUs into C
Tim Deegan [Tue, 13 Mar 2012 15:10:56 +0000 (15:10 +0000)]
arm: Boot secondary CPUs into C

Secondary CPUs come up directly onto the stack of the appropriate idle
vcpu; the boot CPU starts on a statically allocated stack and switches
over to the idle vcpu's one once the idle domain has been built.

Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoarm: start plumbing in SMP bringup in C
Tim Deegan [Tue, 13 Mar 2012 15:10:55 +0000 (15:10 +0000)]
arm: start plumbing in SMP bringup in C

Still a noop, but no longer just a dummy symbol.

Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoarm: per-cpu areas
Tim Deegan [Tue, 13 Mar 2012 15:10:54 +0000 (15:10 +0000)]
arm: per-cpu areas

Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoarm: More SMP bringup
Tim Deegan [Tue, 13 Mar 2012 15:10:53 +0000 (15:10 +0000)]
arm: More SMP bringup

Bring non-boot CPUs up as far as running on the relocated pagetables,
one at a time, before the non-relocated copy of Xen gets reused for
general memory pools.

Don't yet bring them up into C; that will happen later when stacks are
allocated.

Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoarm: Add a comment explaining the GICD writes in the GICC init function
Tim Deegan [Tue, 13 Mar 2012 15:10:53 +0000 (15:10 +0000)]
arm: Add a comment explaining the GICD writes in the GICC init function

Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoarm: implement udelay()
Tim Deegan [Tue, 13 Mar 2012 15:10:52 +0000 (15:10 +0000)]
arm: implement udelay()

Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agox86/mm: drop gfn ref before calling handle_mmio()
Tim Deegan [Fri, 9 Mar 2012 16:54:24 +0000 (16:54 +0000)]
x86/mm: drop gfn ref before calling handle_mmio()

Otherwise we get a deadlock between the p2m lock and the event lock,
which handle_mmio() acquires.

Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
13 years agolow-mem virq: Parentheses around ternary operator in check_low_mem_virq()
Keir Fraser [Fri, 9 Mar 2012 09:58:41 +0000 (09:58 +0000)]
low-mem virq: Parentheses around ternary operator in check_low_mem_virq()

Signed-off-by: Keir Fraser <keir@xen.org>
13 years agoTools: After a helper maps a ring, yank it from the guest physmap
Tim Deegan [Thu, 8 Mar 2012 16:40:05 +0000 (16:40 +0000)]
Tools: After a helper maps a ring, yank it from the guest physmap

This limits the ability of the guest to play around with its own rings, and DoS
itself.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Tim Deegan <tim@xen.org>
13 years agox86/mm: Fix mem event error message typos
Tim Deegan [Thu, 8 Mar 2012 16:40:05 +0000 (16:40 +0000)]
x86/mm: Fix mem event error message typos

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
13 years agox86/mm: Clean up mem event structures on domain destruction
Tim Deegan [Thu, 8 Mar 2012 16:40:05 +0000 (16:40 +0000)]
x86/mm: Clean up mem event structures on domain destruction

Otherwise we wind up with zombie domains, still holding onto refs to the mem
event ring pages.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
13 years agoTools: libxc side for setting up the mem sharing ring
Tim Deegan [Thu, 8 Mar 2012 16:40:05 +0000 (16:40 +0000)]
Tools: libxc side for setting up the mem sharing ring

This ring is used to report failed allocations in the unshare path.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Tim Deegan <tim@xen.org>
13 years agox86/mm: wire up sharing ring
Tim Deegan [Thu, 8 Mar 2012 16:40:05 +0000 (16:40 +0000)]
x86/mm: wire up sharing ring

Now that we have an interface close to finalizing, do the necessary plumbing to
set up a ring for reporting failed allocations in the unshare path.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
13 years agoUse a reserved pfn in the guest address space to store mem event rings
Tim Deegan [Thu, 8 Mar 2012 16:40:05 +0000 (16:40 +0000)]
Use a reserved pfn in the guest address space to store mem event rings

This solves a long-standing issue in which the pages backing these rings were
pages belonging to dom0 user-space processes. Thus, if the process would die
unexpectedly, Xen would keep posting events to a page now belonging to some
other process.

We update all API-consumers in tree (xenpaging and xen-access).

This is an API/ABI change, so please speak up if it breaks your accumptions.

The patch touches tools, hypervisor x86/hvm bits, and hypervisor x86/mm bits.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Tim Deegan <tim@xen.org>
13 years agox86/hvm: refactor calls to prepare and tear down a helper ring
Tim Deegan [Thu, 8 Mar 2012 16:40:05 +0000 (16:40 +0000)]
x86/hvm: refactor calls to prepare and tear down a helper ring

These are currently used for the rings connecting Xen with qemu. Refactor them
so the same code can be later used for mem event rings.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
13 years agoTools: Remove shared page from mem_event/access/paging interfaces
Tim Deegan [Thu, 8 Mar 2012 16:40:05 +0000 (16:40 +0000)]
Tools: Remove shared page from mem_event/access/paging interfaces

Don't use the superfluous shared page, return the event channel directly as
part of the domctl struct, instead.

In-tree consumers (xenpaging, xen-access) updated. This is an ABI/API change,
so please voice any concerns.

Known pending issues:
- pager could die and its ring page could be used by some other process, yet
  Xen retains the mapping to it.
- use a saner interface for the paging_load buffer.

This change also affects the x86/mm bits in the hypervisor that process the
mem_event setup domctl.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Tim Deegan <tim@xen.org>
13 years agox86/cpuidle: improve data arrangement
Jan Beulich [Thu, 8 Mar 2012 16:05:23 +0000 (17:05 +0100)]
x86/cpuidle: improve data arrangement

.. to reduce the amount of holes (wasted space).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
13 years agoXENPF_set_processor_pminfo XEN_PM_CX overflows states array
Eric Chanudet [Thu, 8 Mar 2012 16:04:32 +0000 (17:04 +0100)]
XENPF_set_processor_pminfo XEN_PM_CX overflows states array

Calling XENPF_set_processor_pminfo with XEN_PM_CX could cause states
array in "struct acpi_processor_power" to exceed its limit.

The array used to be reset (by function cpuidle_init_cpu()) for each
hypercall. The patch puts it back that way and adds an assertion to
make it clear in case that happens again.

Signed-off-by: Eric Chanudet <eric.chanudet@eu.citrix.com>
- convert assertion to printk() & bail
- eliminate struct acpi_processor_cx's valid member (not read anymore)
- further adjustments to one-time-only vs each-time operations in
  cpuidle_init_cpu()
- don't use ACPI_STATE_Cn as array index anymore

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
13 years agooprofile: don't pass around redundant, easily derived arguments
Jan Beulich [Thu, 8 Mar 2012 16:02:57 +0000 (17:02 +0100)]
oprofile: don't pass around redundant, easily derived arguments

Passing both a struct vcpu pointer and the corresponding struct domain
one is simply pointless, especially when intermediate functions just
forward it without themselves making use of the already obtained value.

Also constify a few function parameters.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
13 years agoia64: fix build (once more)
Jan Beulich [Thu, 8 Mar 2012 12:49:24 +0000 (13:49 +0100)]
ia64: fix build (once more)

Signed-off-by: Jan Beulich <jbeulich@suse.com>
13 years agoRevert 24987:42afd4d1669b
Keir Fraser [Thu, 8 Mar 2012 12:30:03 +0000 (12:30 +0000)]
Revert 24987:42afd4d1669b

Signed-off-by: Keir Fraser <keir@xen.org>
13 years agohvm: Print support/enable status of HAP superpage mappings.
Keir Fraser [Thu, 8 Mar 2012 09:43:49 +0000 (09:43 +0000)]
hvm: Print support/enable status of HAP superpage mappings.

Signed-off-by: Keir Fraser <keir@xen.org>
13 years agoNMI: Command line parameter for watchdog timeout
Andrew Cooper [Thu, 8 Mar 2012 09:23:27 +0000 (09:23 +0000)]
NMI: Command line parameter for watchdog timeout

Introduce a command parameter to set the watchtog timeout.  Manually
specifying "watchdog_timeout=<seconds>" on the command line will also
turn the watchdog on.  For consistency, move opt_watchdog into nmi.c
along with opt_watchdog_timeout.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agosvm: Fake out the Bus Unit Config MSR on revF AMD CPUs
George Dunlap [Thu, 8 Mar 2012 09:17:21 +0000 (09:17 +0000)]
svm: Fake out the Bus Unit Config MSR on revF AMD CPUs

Win2k8 x64 reads this MSR on revF chips, where it wasn't publically
available; it uses a magic constant in %rdi as a password, which we
don't have in rdmsr_safe().  Since we'll ignore the later writes, just
use a plausible value here (the reset value from rev10h chips) if the
real CPU didn't provide one.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agox86: Add more specific logging for get_page_from_l1e failures
George Dunlap [Thu, 8 Mar 2012 09:16:09 +0000 (09:16 +0000)]
x86: Add more specific logging for get_page_from_l1e failures

This patch should clarify which of the two possible reasons cause the
messages
of the form "(XEN) mm.c:908:d1 Error getting mfn 29b2b (pfn
5555555555555555)
from L1 entry 0000000029b2b067 for l1e_owner=1, pg_owner=1".

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agox86: Reduce severity of hvm_op warnings
George Dunlap [Thu, 8 Mar 2012 09:15:26 +0000 (09:15 +0000)]
x86: Reduce severity of hvm_op warnings

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agox86: Make sure log-dirty is turned off before trying to dismantle it
George Dunlap [Thu, 8 Mar 2012 09:13:25 +0000 (09:13 +0000)]
x86: Make sure log-dirty is turned off before trying to dismantle it

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agohvm: Add command line option to enable ASID support -- on by default
George Dunlap [Thu, 8 Mar 2012 09:10:32 +0000 (09:10 +0000)]
hvm: Add command line option to enable ASID support -- on by default

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Signed-off-by: Keir Fraser <keir@xen.org>
13 years agoLow mem virq incremental adjustments
Andres Lagar-Cavilla [Thu, 8 Mar 2012 09:05:22 +0000 (09:05 +0000)]
Low mem virq incremental adjustments

Consider tmem before firing the virq.

Add .gitignore rune.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agoprovide a single, common implementation for get_order_from_{bytes,pages}()
Jan Beulich [Wed, 7 Mar 2012 10:50:31 +0000 (11:50 +0100)]
provide a single, common implementation for get_order_from_{bytes,pages}()

All three per-architecture implementations were identical, and I cannot
see how future architectures would need any sort of customization here
(the only per-architecture aspect here is the actual PAGE_SHIFT value).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
13 years agopassthrough: fix domain ref leak after 24888:71159fb049f2
Jan Beulich [Wed, 7 Mar 2012 09:59:18 +0000 (10:59 +0100)]
passthrough: fix domain ref leak after 24888:71159fb049f2

As pointed out by Keir.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
13 years agoRevert 24973:50a70b652b43 "x86: Use deep C states for off-lined CPUs"
Keir Fraser [Wed, 7 Mar 2012 09:12:23 +0000 (09:12 +0000)]
Revert 24973:50a70b652b43 "x86: Use deep C states for off-lined CPUs"

applied already

Signed-off-by: Keir Fraser <keir@xen.org>
13 years agoDOCS: Initial document regarding Xen's command line parameters
Andrew Cooper [Wed, 7 Mar 2012 07:44:33 +0000 (07:44 +0000)]
DOCS: Initial document regarding Xen's command line parameters

Still a work in progress, but submitted as a start.

Changes since v1:
  - Include all up to date information from the wiki.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agobuild: Don't remove user-supplied xen-version during make clean
George Dunlap [Wed, 7 Mar 2012 07:43:02 +0000 (07:43 +0000)]
build: Don't remove user-supplied xen-version during make clean

xen/Makefile is designed to allow the user to supply a file named
xen/xen-include to change the format of xen version strings.
Unfortunately, "make clean" removes xen/xen*, which will remove this
file.

Make the clean process more targeted.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agobuild: Add xenversion as a top-level target
George Dunlap [Wed, 7 Mar 2012 07:42:09 +0000 (07:42 +0000)]
build: Add xenversion as a top-level target

We already have xenversion as a target in the xen subdirectory;
simply extend it so that "make xenversion" does what you'd expect.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agoRTC: Add alarm support
Yang Zhang [Wed, 7 Mar 2012 07:38:05 +0000 (07:38 +0000)]
RTC: Add alarm support

Use a timer to emulate update cycle. The timer runs only when AIE is
set.

Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agoRTC: Add RTC update-ended interrupt support
Yang Zhang [Wed, 7 Mar 2012 07:37:21 +0000 (07:37 +0000)]
RTC: Add RTC update-ended interrupt support

Use a timer to emulate update cycle. When update cycle ended and UIE
is set, raise an interrupt. The timer runs only when AF is cleared.

Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agoRTC: Add UIP(update in progress) check logic
Yang Zhang [Wed, 7 Mar 2012 07:36:15 +0000 (07:36 +0000)]
RTC: Add UIP(update in progress) check logic

The UIP(update in progress) is set when RTC is in updating. And the
update cycle begins 244us later after UIP is set.

Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agoRTC: fix 12-hour mode
Yang Zhang [Wed, 7 Mar 2012 07:34:55 +0000 (07:34 +0000)]
RTC: fix 12-hour mode

Hours in 12-hour mode are in the 1-12 range, not 0-11.

Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agoRTC: use offset to caculate rtc clock
Yang Zhang [Wed, 7 Mar 2012 07:34:20 +0000 (07:34 +0000)]
RTC: use offset to caculate rtc clock

There has no need to run two periodic timer to update RTC time.
Use the offset instead.

Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agox86: Use deep C states for off-lined CPUs
Boris Ostrovsky [Wed, 7 Mar 2012 07:30:30 +0000 (07:30 +0000)]
x86: Use deep C states for off-lined CPUs

Currently when a core is taken off-line it is placed in C1 state
(unless MONITOR/MWAIT is used). This patch allows a core to go to
deeper C states resulting in significantly higher power savings.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agoAdd gtags target for xen/Makefile. Also update .hgignore.
Wei Liu [Wed, 7 Mar 2012 07:28:12 +0000 (07:28 +0000)]
Add gtags target for xen/Makefile. Also update .hgignore.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agox86/xenoprof: fix 32-bit guest stack handling after c/s 24537:3c0a533d3af0
Jan Beulich [Tue, 6 Mar 2012 15:43:01 +0000 (16:43 +0100)]
x86/xenoprof: fix 32-bit guest stack handling after c/s 24537:3c0a533d3af0

32-bit guests don't have 64-bit precudrure return addresses - both
elements of struct frame_head_32bit should be 32 bits wide, not just
the frame link pointer.

Further, consolidate the whole handling here (also in the native size
guest case) to properly use guest handles and guest memory accessors.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
13 years agox86/cpuidle: deny access to the I/O port used for EM_SYSIO
Jan Beulich [Tue, 6 Mar 2012 15:41:41 +0000 (16:41 +0100)]
x86/cpuidle: deny access to the I/O port used for EM_SYSIO

Nothing, not even Dom0, should fiddle with this.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
13 years agox86/cpuidle: restrict scope of mwait_ptr in acpi_dead_idle()
Jan Beulich [Tue, 6 Mar 2012 15:11:59 +0000 (16:11 +0100)]
x86/cpuidle: restrict scope of mwait_ptr in acpi_dead_idle()

... just to make sure it doesn't get used improperly (resulting from
the discussion around what became c/s 24968:8964c223836c).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
13 years agox86: Use deep C states for off-lined CPUs
Boris Ostrovsky [Tue, 6 Mar 2012 14:51:33 +0000 (15:51 +0100)]
x86: Use deep C states for off-lined CPUs

Currently when a core is taken off-line it is placed in C1 state (unless
MONITOR/MWAIT is used). This patch allows a core to go to deeper C states
resulting in significantly higher power savings.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
13 years agolibxl: only set b_info->u.hvm.bios if type if HVM
Ian Campbell [Fri, 2 Mar 2012 12:33:25 +0000 (12:33 +0000)]
libxl: only set b_info->u.hvm.bios if type if HVM

This fixes a PV guest breakage causes by 24932:6eac4a1ee646 "libxl: Select BIOS
using libxl_domain_build_info_setdefaults".

I have also included a sanity check on b_info->type.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoQEMU_TAG update
Ian Jackson [Thu, 1 Mar 2012 19:00:09 +0000 (19:00 +0000)]
QEMU_TAG update

13 years agoadd new bootloader xenpvnetboot for pv guest
Zhigang Wang [Thu, 1 Mar 2012 18:54:37 +0000 (18:54 +0000)]
add new bootloader xenpvnetboot for pv guest

`xenpvnetboot' supports getting boot images from following locations:

 - http://host/path
 - https://host/path
 - ftp://host/path
 - file:///path
 - tftp://host/path
 - nfs:host:/path
 - /path
 - /path/file.iso
 - /path/filesystem.img
 - /dev/sda1
 - nfs+iso:host:/path/file.iso
 - nfs+iso:host:/path/filesystem.img

To use it, make `xenpvnetboot' as bootloader for PV guest::

    bootloader = '/usr/bin/xenpvnetboot'

To get boot images from various locations, set the right bootloader
arguments, e.g.:

    bootloarder_args = ['--location=http://192.168.0.1/fedora/x86_64']
    bootloarder_args = ['--location=ftp://192.168.0.1/fedora/x86_64']
    bootloarder_args = ['--location=file:///fedora/x86_64']
    bootloarder_args = ['--location=tftp://192.168.0.1/fedora/x86_64']
    bootloarder_args = ['--location=/fedora/x86_64']
    bootloarder_args = ['--location=/fedora/Fedora-16-x86_64-DVD.iso']
    bootloarder_args = ['--location=nfs:192.168.0.1:/fedora/x86_64']
    bootloarder_args = ['--location=nfs+iso:192.168.0.1:/fedora/Fedora-16-x86_64-DVD.iso']

You can use `kernel' and `ramdisk' to specify the relative path of
boot kernel and ramdisk. `xenpvnetboot' will join them with the
location to find the boot kernel and ramdisk, e.g.:

    kernel = 'images/pxeboot/vmlinuz'
    ramdisk = 'images/pxeboot/initrd.img'
    bootloarder_args = ['--location=http://192.168.0.1/fedora/x86_64']

    kernel = 'fedora/x86_64/images/pxeboot/vmlinuz'
    ramdisk = 'fedora/x86_64/images/pxeboot/initrd.img'
    bootloarder_args = ['--location=http://192.168.0.1/']

You can also omit the `--location' option and specify the full URL for
`kernel' and `ramdisk' directly, e.g.:

    kernel = 'http://192.168.0.1/fedora/x86_64/images/pxeboot/vmlinuz'
    ramdisk = 'http://192.168.0.1/fedora/x86_64/images/pxeboot/initrd.img'

If only `--location' is specified and `kernel' and `ramdisk' are not
specified, `xenpvnetboot' will search the following places for boot
images from the location::

    ('images/xen/vmlinuz', 'images/xen/initrd.img'), # Fedora <= 10 and OL = 5
    ('boot/i386/vmlinuz-xen', 'boot/i386/initrd-xen'), # openSUSE >= 10.2 and SLES >= 10
    ('boot/x86_64/vmlinuz-xen', 'boot/x86_64/initrd-xen'), # openSUSE >= 10.2 and SLES >= 10
    ('current/images/netboot/xen/vmlinuz', 'current/images/netboot/xen/initrd.gz'), # Debian
    ('images/pxeboot/vmlinuz', 'images/pxeboot/initrd.img'), # Fedora >=10 and OL >= 6
    ('isolinux/vmlinuz', 'isolinux/initrd.img'), # Fedora >= 10 and OL >= 6

`xenpvnetboot' requires python module `urlgrabber'
http://urlgrabber.baseurl.org/.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoxenstore: Portability: do not build init-xenstore-domain if stubdom disabled
Christoph Egger [Thu, 1 Mar 2012 18:52:35 +0000 (18:52 +0000)]
xenstore: Portability: do not build init-xenstore-domain if stubdom disabled

Build stubxenstore only when building stubdomains.
Fixes build failure on platforms w/o the relevant ioctl.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agolibxl: Implement libxl_sched_credit_param_[gs]et
George Dunlap [Thu, 1 Mar 2012 18:22:01 +0000 (18:22 +0000)]
libxl: Implement libxl_sched_credit_param_[gs]et

Implement functions to set credit scheduler global parameters.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoarm: compile libxc
Stefano Stabellini [Thu, 1 Mar 2012 17:37:03 +0000 (17:37 +0000)]
arm: compile libxc

Introduce an empty implementation of the arch specific ARM functions in
xc_core_arm.c and xc_core_arm.h; define barriers on ARM.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoarm: add stub hvm/save.h
Stefano Stabellini [Thu, 1 Mar 2012 17:37:03 +0000 (17:37 +0000)]
arm: add stub hvm/save.h

From: Ian Campbell <ian.campbell@citrix.com>

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
13 years agotools: fix python version checking issue
Yongjie Ren [Thu, 1 Mar 2012 17:23:51 +0000 (17:23 +0000)]
tools: fix python version checking issue

Even if python version is 2.4.3 which is newer than the required
version 2.3, the configure script still raises a version issue.  I
tested my patch with python 2.6.6 and 2.4.3. It will fix a syntax
error like the following.

 checking for python version >= 2.3 ... Traceback (most recent call last):
   File "<string>", line 1, in ?
 TypeError: 'str' object is not callable
 no
 configure: error: Python 2.4.3 is too old, minimum required version is 2.3

Signed-off-by: Yongjie Ren <yongjie.ren@intel.com>
Acked-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agobuild: autoconf: fix libdir detection
Roger Pau Monne [Thu, 1 Mar 2012 16:59:33 +0000 (16:59 +0000)]
build: autoconf: fix libdir detection

If user specifies a libdir it is used, if no libdir is specified
configure checks if $exec_prefix/lib64 is a directory and uses that,
if not lib is used.

$prefix is set by passing the command line option or by default when
calling AC_OUTPUT, but since AC_OUTPUT is called at the end, this is
not really helpful, so we have to set $exec_prefix manually to the
correct value, either $prefix if different than NONE or
$ac_default_prefix.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agodocs: xen-headers: Remove hard tabs
Ian Jackson [Thu, 1 Mar 2012 16:51:39 +0000 (16:51 +0000)]
docs: xen-headers: Remove hard tabs

Remove hard tabs from the Perl script.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
13 years agodocs: xen-headers: Annotate typedefs
Ian Jackson [Thu, 1 Mar 2012 16:51:39 +0000 (16:51 +0000)]
docs: xen-headers: Annotate typedefs

Parse (some) typedef statements.  (Make type names links to the
underlying struct if there is one, rather than to just the typedef.)

Also, exclude the new arch-arm headers.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
13 years agoMerge
Ian Jackson [Thu, 1 Mar 2012 16:48:36 +0000 (16:48 +0000)]
Merge

13 years agolowmemd: Fix build when xs.h has not been previously installed.
Keir Fraser [Thu, 1 Mar 2012 16:43:46 +0000 (16:43 +0000)]
lowmemd: Fix build when xs.h has not been previously installed.

Signed-off-by: Keir Fraser <keir@xen.org>
13 years agobuild: autoconf: remove (yet another) brctl leftover
Roger Pau Monne [Thu, 1 Mar 2012 16:41:56 +0000 (16:41 +0000)]
build: autoconf: remove (yet another) brctl leftover

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoLowmemd: Simple demo code to show use of VIRQ_ENOMEM
Andres Lagar-Cavilla [Thu, 1 Mar 2012 16:41:39 +0000 (16:41 +0000)]
Lowmemd: Simple demo code to show use of VIRQ_ENOMEM

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agobuild: autoconf: remove python xml check
Roger Pau Monne [Thu, 1 Mar 2012 16:41:15 +0000 (16:41 +0000)]
build: autoconf: remove python xml check

Remove the xml module check from autoconf and move it to xend init
script (in a later patch), since it's a run time dependency.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agoGlobal virq for low memory situations
Andres Lagar-Cavilla [Thu, 1 Mar 2012 16:40:45 +0000 (16:40 +0000)]
Global virq for low memory situations

When a low memory threshold on the Xen heap is reached, we fire a
global dom0 virq. If someone's listening, they can free up some more
memory.

The low threshold is configurable via the command line token
'low_mem_virq_limit", and defaults to 64MiB. If the user specifies
zero via the command line, the virq is disabled.

We define a new virq VIRQ_ENOMEM. Potential listeners include
squeezed, xenballoond, or anything else that can be fired through
xencommons.

We error-check the low mem virq against initial available heap (after
dom0 allocation), to avoid firing immediately.

Virq issuing is controlled by a hysteresis algorithm: when memory dips
below a threshold, the virq is issued and the next virq will fire when
memory shrinks another order of magnitude. The virq will not fire
again in the current "band" until memory grows over the next higher
order of magnitude.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Committed-by: Keir Fraser <keir@xen.org>
13 years agoGrant table: fix a bug when grant copying a previous grant mapped page.
Wei Liu [Thu, 1 Mar 2012 16:37:18 +0000 (16:37 +0000)]
Grant table: fix a bug when grant copying a previous grant mapped page.

In grant table version 2, when we create a non-transitive mapping from
DomU to Dom0, we need to set active entry's trans_domain and
trans_ref.  Otherwise when we grant copy from this previous mapped
ref, preemption count will get messed up.

See changeset 22994:299ed79acecf for more information.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agoamd iommu: Introduce a new lock for event and ppr logging
Wei Wang [Thu, 1 Mar 2012 16:35:54 +0000 (16:35 +0000)]
amd iommu: Introduce a new lock for event and ppr logging

iommu->lock is used with irq disabled, so it cannot be used to protect
ppr log.  Otherwise, after c/s 24770, get_gfn will trigger a BUG() if
called by parse_ppr_log_entry(). This patch adds an additional lock to
protect ppr and event pointers in iommu_read_log().

signed-off-by: Wei Wang <wei.wang2@amd.com>
Committed-by: Keir Fraser <keir@xen.org>
13 years agox86,tools/libxc: expose HLE/RTM features to pv and hvm
Liu, Jinsong [Thu, 1 Mar 2012 16:31:52 +0000 (16:31 +0000)]
x86,tools/libxc: expose HLE/RTM features to pv and hvm

Intel recently release 2 new features, HLE and TRM.
Refer to http://software.intel.com/file/41417.
This patch expose them to pv and hvm

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Keir Fraser <keir@xen.org>