Commit Graph
25125 Commits
Author SHA1 Message Date
Ian Campbell d8fd4c3678 docs: add some missing options to misc/xen-command-line.markdown
These were mostly ones from xen/arch/x86/boot/cmdline.S which are handled early
and therefore do not use the usual infrastructure and so got missed in the
initial trawl.

The document now contains (AFAICT) every still valid option which was
previously documented at:
http://wiki.xen.org/wiki?title=Xen_Hypervisor_Boot_Options&oldid=1379

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
2012-03-26 17:09:59 +01:00
Ian Campbell a77ff6b05c docs: wrap misc/xen-command-line.markdown to 80 columns
Makes it more readable as a text document.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
2012-03-26 17:09:40 +01:00
David Vrabel ae0a90bd8c device tree: print a warning if a node is nested too deep
Since device_tree_for_each_node() is called before printk() works, a
variable is used to switch between using early_printk() and printk().

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-04-02 16:50:44 +01:00
David Vrabel 8166f512ea arm: add dom0_mem command line argument
Add a simple dom0_mem command line argument.  It's not as flexible as
the x86 equivalent (the 'max' and 'min' prefixes are not supported).

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-04-02 16:50:43 +01:00
David Vrabel df8a4a8c5f arm: use bootargs for the command line
Use the /chosen node's bootargs parameter for the Xen command line.
Parse it early on before the serial console is setup.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-04-02 16:50:42 +01:00
David Vrabel 13bb63b754 device tree,arm: supply a flat device tree to dom0
Build a flat device tree for dom0 based on the one supplied to Xen.
The following changes are made:

  * In the /chosen node, the xen,dom0-bootargs parameter is renamed to
    bootargs.

  * In all memory nodes, the reg parameters are adjusted to reflect
    the amount of memory dom0 can use.  The p2m is updated using this
    info.

Support for passing ATAGS to dom0 is removed.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
[ removed device_tree_dump call -- ijc ]
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-04-02 16:50:42 +01:00
Tim Deegan 3db570f4f9 arm: Use HTPIDR to point to per-CPU state
Rather than having the per-VCPU stack contain a pointer to the
per-PCPU state, use the CPU's hypervisor thread ID register for that.

Signed-off-by: Tim Deegan <tim@xen.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
[ s/cpuid/id in set_processor_id -- ijc ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-04-02 10:54:05 +01:00
Tim Deegan e2af2820a3 arm: missing unlock in GIC error path
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-04-02 10:54:05 +01:00
Tim Deegan 8bbff1a751 arm: remove code that sets current to itself
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-04-02 10:54:04 +01:00
Wei Huang d0cb8288cd AMD_LWP: add interrupt support for AMD LWP
This patch adds interrupt support for AMD lightweight profiling. It
registers interrupt handler using alloc_direct_apic_vector(). When
notified, SVM reinjects virtual interrupts into guest VM using
guest's virtual local APIC.

Signed-off-by: Wei Huang <wei.huang2@amd.com>
Signed-off-by: Keir Fraser <keir@xen.org>
Committed-by: Keir Fraser <keir@xen.org>
2012-03-30 21:05:54 +01:00
Keir Fraser 8db87324fc x86: Unify direct-apic and hiprio irq vector allocations.
Signed-off-by: Keir Fraser <keir@xen.org>
2012-03-30 10:01:15 +01:00
Keir Fraser bdc31d56d8 x86: Allow direct vectored interrupts to be dynamically allocated.
Use this for Intel's CMCI and thermal interrupts.

Signed-off-by: Keir Fraser <keir@xen.org>
2012-03-30 09:14:25 +01:00
Keir Fraser 33c4b1044d Remove single use of fastcall from hypervisor common code.
Signed-off-by: Keir Fraser <keir@xen.org>
2012-03-30 08:52:19 +01:00
Keir Fraser b57458c1d0 x86: All vectored interrupts go through do_IRQ().
Signed-off-by: Keir Fraser <keir@xen.org>
2012-03-30 08:50:33 +01:00
Tim Deegan d928515d76 x86/mm: allow mem_event ops on AMD processors too.
(Experimental, for now).

Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
2012-03-29 16:59:33 +01:00
Tim Deegan f325f4a1ac IOMMU: clean up handling of 'foo' and 'no-foo' command-line options
Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
2012-03-29 12:08:41 +01:00
Andres Lagar-Cavilla 5d27ed6a1f x86/mm: Make iommu passthrough and mem paging/sharing mutually exclusive
Regardless of table sharing or processor vendor, these features cannot coexist
since iommu's don't expect gfn->mfn mappings to change, and sharing and paging
depend on trapping all accesses.

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-29 12:01:33 +01:00
Andres Lagar-Cavilla 6a5fc81607 x86/mm: Teach paging to page table-based p2m
The p2m-pt.c code, used by both shadow and AMD NPT modes, was not aware of
paging types, and the implications those types have on p2m entries. Add support
to the page table-based p2m to understand the paging types. This is a necessary
step towards enabling memory paging on AMD NPT mode, but not yet the full
solution.

Tested not to break neither shadow mode nor "normal" (i.e. no paging) AMD NPT
mode.

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-29 12:01:33 +01:00
Tim Deegan 1fb4e798c6 x86/mm/p2m-pt: Clip mfn to allowable width when building a PTE
Otherwise, INVALID_MFN tramples over high order bits used for additional flags.

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-29 11:29:24 +01:00
Jan Beulich d5c1c62c19 x86/hpet: warn about and clear reserved set config register bits
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2012-03-28 16:59:02 +02:00
Jan Beulich 7e5c676dd7 x86/hpet: use asm/hpet.h in HVM emulation code
Also replace some plain numbers by using suitable defines (to make
clear what they are standing for).

Generated code is identical (apart from line number changes and
functions possibly getting ordered differently).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2012-03-27 15:25:07 +02:00
Jan Beulich cb938f2c4d x86/hpet: clear unwanted bits
Leaving certain bits set when being started from an environment where
the HPET was already in use can affect functionality. Clear those bits
to be on the safe side.

We should also consider ignoring the HPET altogether if any reserved
bits are found to be set.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2012-03-27 15:23:43 +02:00
Jan Beulich eca1bfec46 x86/hpet: replace disabling of legacy broadcast
... by the call to hpet_disable() added in the immediately preceding
patch.

In order to retain the behavior intended by c/s 23776:0ddb4481f883,
implement one of the alternative options pointed out there: remove CPUs
from the online map in __stop_this_cpu() (and hence doing so in
stop_this_cpu() is no longer needed).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2012-03-27 15:22:54 +02:00
Jan Beulich a5e1cb8704 x86/hpet: disable before reboot or kexec
Linux up to now is not smart enough to properly clear the HPET when it
boots, which is particularly a problem when a kdump attempt from
running under Xen is being made. Linux itself added code to work around
this to its shutdown paths quite some time ago, so let's do something
similar in Xen: Save the configuration register settings during boot,
and restore them during shutdown. This should cover the majority of
cases where the secondary kernel might not come up because timer
interrupts don't work.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2012-03-27 15:20:23 +02:00
Ian Campbell 7db7844927 hcall: markup the grant table hypercalls to improve generated docs
As part of this I looked through the relevant chapter from interfaces.tex (from
4.1, deleted in unstable) to ensure no critical information was missing.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-03-27 11:13:58 +01:00
Keir Fraser ebe5e56248 x86_emulate: Do not push an error code onto a #UD exception stack
Signed-off-by: Keir Fraser <keir@xen.org>
2012-03-23 20:51:48 +00:00
Andrew Cooper 47fb6fb49f x86_emulate: raise #UD rather than #GP on invalid use of LOCK prefix
From: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Keir Fraser <keir@xen.org>
Committed-by: Keir Fraser <keir@xen.org>
2012-03-23 20:45:16 +00:00
Jan Beulich 0f049e6e2b x86/hpet: simplify hpet_get_channel()
There's no need for a lock here, elimination of which makes the
function a leaf one, thus allowing for better (and smaller) code.

Further, use the variable next_channel according to its name - so far
it represented the most recently used channel rather than the next one
to use.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2012-03-23 16:13:29 +01:00
Liu, Jinsong e02af69dc2 Xen core parking 2: core parking implementation
This patch implement Xen core parking.
Different core parking sequence has different power/performance
result, due to cpu socket/core/thread topology.
This patch provide power-first and performance-first policies, users
can choose core parking policy by their own demand.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-03-23 15:08:17 +00:00
Liu, Jinsong 2772618c6e Xen core parking 1: hypercall
This patch implement hypercall through which dom0 send core parking
request, and get core parking result.
Due to the characteristic of continue_hypercall_on_cpu, dom0
seperately send/get core parking request/result.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-03-23 15:07:53 +00:00
David Vrabel 2579d22937 Fix test for NULL command line in cmdline_parse()
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-03-23 13:45:28 +00:00
Jan Beulich 8c3e852fe4 x86/hpet: force_hpet_broadcast can be __initdata
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2012-03-23 11:46:11 +01:00
Jan Beulich 43dd3ea3a6 x86/gnttab: fix asm() operand in gnttab_clear_flag()
The operand needs to use the 'w' modifier in case the compiler happens
to pick a register (which apparently it does for no-one but the
reporter of this problem).

Reported-by: Lin Ming <mlin@ss.pku.edu.cn>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2012-03-23 08:39:39 +01:00
Tim Deegan deb5ed4250 Disable OVMF build - it's not baked yet.
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Keir Fraser <keir@xen.org>
2012-03-22 17:15:22 +00:00
Ian Campbell e99f5a9853 arm: shorten constant names in head.S to keep within 80 columns
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-03-22 15:15:20 +00:00
David Vrabel 94e9d5fb22 Allow cmdline_parse() to be used with const strings
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-03-22 14:26:47 +00:00
David Vrabel 789308dfa1 arm: remove the hack for loading vmlinux images
Don't adjust the RAM location/size when loading an ELF for dom0.  It
was vmlinux specific and no longer needed because Linux can be loaded
from a zImage.  Support for loading ELF images is not removed as it
may be useful for loading things other than the Linux kernel.

This also makes preparing the device tree for dom0 easier.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-03-22 14:26:46 +00:00
David Vrabel e7df25ebdf device tree: add device_tree_dump() to print a flat device tree
Add a device_tree_dump() function which prints to main structure and
properties names of a flat device tree (but not the properties values
yet).

This will be useful for debugging problems with the device tree
generated for dom0.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-03-22 14:26:46 +00:00
David Vrabel 9cf4a9a467 device tree: add device_tree_for_each_node()
Add device_tree_for_each_node() to iterate over all nodes in a flat
device tree.  Use this in device_tree_early_init().

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-03-22 14:26:45 +00:00
David Vrabel 1140ce1534 device tree: correctly ignore unit-address when matching nodes by name
When matching node by their name, correctly ignore the unit address
(@...) part of the name.  Previously, a "memory-controller" node would
be incorrectly matched as a "memory" node.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-03-22 14:26:44 +00:00
David Vrabel 6f8f42c32f device tree: follow coding style
Only changes to the coding style, no functional changes.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-03-22 14:26:44 +00:00
David Vrabel 49e7e1cc07 MAINTAINERS: add device tree maintainer
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-03-22 14:26:43 +00:00
David Vrabel 48ad5e9e21 libfdt: move headers to xen/include/xen/libfdt/
Move the public libfdt headers to xen/include/xen/libfdt/ so CFLAGS
does need to be set to find them.  This requires minor tweaks to one
of the headers imported from upstream.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-03-22 14:26:42 +00:00
Ian Campbell 066cfcad02 arm: use symbolic constants for initial page table attributes
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-03-22 14:26:41 +00:00
Ian Campbell f668d18d2e arm: remove hard tabs
The only hard tabs remaining in xen/arch/arm and xen/include/asm-arm are now
only in .S files and .[ch] imported from Linux

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-03-22 14:26:41 +00:00
Keir Fraser 269f543ea7 Introduce system_state variable.
Use it to replace x86-specific early_boot boolean variable.

Also use it to detect suspend/resume case during cpu offline/online
to avoid unnecessarily breaking vcpu and cpupool affinities.

Signed-off-by: Keir Fraser <keir@xen.org>
Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
2012-03-22 12:20:13 +00:00
Tim Deegan 8aed7f047d Merge 2012-03-22 10:26:45 +00:00
Attilio Rao 62ed20c3f5 Fetch the OVMF repository from specific git mirror and enable it
Signed-off-by: Attilio Rao <attilio.rao@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-03-22 10:26:03 +00:00
David Vrabel e2e7b20674 docs: improve documentation for the the dom0_mem command line option
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-03-22 10:23:30 +00:00
Andres Lagar-Cavilla 0e2527a44a x86/mm: fix broken shadow debug printk
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-22 10:23:28 +00:00