Commit Graph
25125 Commits
Author SHA1 Message Date
Daniel De Graaf 814babf9d0 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>
2012-03-13 15:40:42 +00:00
Wei Liu bf32120146 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>
2012-03-13 15:36:58 +00:00
Andres Lagar-Cavilla eba0dfbbc2 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>
2012-03-13 15:34:54 +00:00
Ian Campbell fe2522db51 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>
2012-03-13 15:32:10 +00:00
Ian Jackson 40277f9bdc Merge 2012-03-13 15:28:41 +00:00
Roger Pau Monne 65da491321 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>
2012-03-13 15:23:35 +00:00
Tim Deegan d6df660742 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>
2012-03-13 15:11:00 +00:00
Tim Deegan e1147447b9 arm: Actually free __init/__initdata ranges on boot
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-03-13 15:10:59 +00:00
Tim Deegan f8c1e36eeb 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>
2012-03-13 15:10:58 +00:00
Tim Deegan 2d311889b5 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>
2012-03-13 15:10:57 +00:00
Tim Deegan 5e40a1b435 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>
2012-03-13 15:10:56 +00:00
Tim Deegan b8bac01f1a 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>
2012-03-13 15:10:56 +00:00
Tim Deegan 9e5e386e7c 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>
2012-03-13 15:10:55 +00:00
Tim Deegan 2ba7948966 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>
2012-03-13 15:10:54 +00:00
Tim Deegan d5e6a4f322 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>
2012-03-13 15:10:53 +00:00
Tim Deegan 139692dee4 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>
2012-03-13 15:10:53 +00:00
Tim Deegan 335ba242c5 arm: implement udelay()
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-03-13 15:10:52 +00:00
Tim Deegan 77b8dfec88 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>
2012-03-09 16:54:24 +00:00
Keir Fraser 69b701b237 low-mem virq: Parentheses around ternary operator in check_low_mem_virq()
Signed-off-by: Keir Fraser <keir@xen.org>
2012-03-09 09:58:41 +00:00
Tim Deegan 90b6e6c889 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>
2012-03-08 16:40:05 +00:00
Tim Deegan dac9bb57ec 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>
2012-03-08 16:40:05 +00:00
Tim Deegan 762e791d8a 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>
2012-03-08 16:40:05 +00:00
Tim Deegan f9f9daee79 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>
2012-03-08 16:40:05 +00:00
Tim Deegan cc0b0b4487 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>
2012-03-08 16:40:05 +00:00
Tim Deegan 770d1e858d 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>
2012-03-08 16:40:05 +00:00
Tim Deegan 7a3de76737 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>
2012-03-08 16:40:05 +00:00
Tim Deegan 08d6219815 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>
2012-03-08 16:40:05 +00:00
Jan Beulich 9a0405c411 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>
2012-03-08 17:05:23 +01:00
Eric Chanudet 2ab5a5dd98 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>
2012-03-08 17:04:32 +01:00
Jan Beulich cae10a689a 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>
2012-03-08 17:02:57 +01:00
Jan Beulich 48844dc210 ia64: fix build (once more)
Signed-off-by: Jan Beulich <jbeulich@suse.com>
2012-03-08 13:49:24 +01:00
Keir Fraser 5e65338b20 Revert 24987:42afd4d1669b
Signed-off-by: Keir Fraser <keir@xen.org>
2012-03-08 12:30:03 +00:00
Keir Fraser 450f664f73 hvm: Print support/enable status of HAP superpage mappings.
Signed-off-by: Keir Fraser <keir@xen.org>
2012-03-08 09:43:49 +00:00
Andrew Cooper d4faf5a948 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>
2012-03-08 09:23:27 +00:00
George Dunlap 338db98dd8 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>
2012-03-08 09:17:21 +00:00
George Dunlap 3d9ab2267f 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>
2012-03-08 09:16:09 +00:00
George Dunlap b5ab306e2b x86: Reduce severity of hvm_op warnings
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-03-08 09:15:26 +00:00
George Dunlap 68bde1a6e8 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>
2012-03-08 09:13:25 +00:00
George Dunlap 3a866da3e3 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>
2012-03-08 09:10:32 +00:00
Andres Lagar-Cavilla c812282081 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>
2012-03-08 09:05:22 +00:00
Jan Beulich 5fb0f4f5d8 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>
2012-03-07 11:50:31 +01:00
Jan Beulich e45066d3c3 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>
2012-03-07 10:59:18 +01:00
Keir Fraser 8a058bcef7 Revert 24973:50a70b652b43 "x86: Use deep C states for off-lined CPUs"
applied already

Signed-off-by: Keir Fraser <keir@xen.org>
2012-03-07 09:12:23 +00:00
Andrew Cooper 1728459dec 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>
2012-03-07 07:44:33 +00:00
George Dunlap a32e06dc95 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>
2012-03-07 07:43:02 +00:00
George Dunlap b728d886a5 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>
2012-03-07 07:42:09 +00:00
Yang Zhang 007ecb9bf2 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>
2012-03-07 07:38:05 +00:00
Yang Zhang 1acd5b8cdc 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>
2012-03-07 07:37:21 +00:00
Yang Zhang 197c12b1a1 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>
2012-03-07 07:36:15 +00:00
Yang Zhang 6c44cee772 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>
2012-03-07 07:34:55 +00:00