Commit Graph
26665 Commits
Author SHA1 Message Date
Konrad Rzeszutek Wilk 10f3613873 CREDITS: First checkin.
Adding Jeremy and moving him from the MAINTAINERS file.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-02-26 16:18:34 +00:00
Konrad Rzeszutek Wilk 4f65627e43 MAINTAINERS: Provide proper URL to the upstream Linux development tree for Xen.
And also put my name behind the maintainership.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-02-26 16:18:09 +00:00
Konrad Rzeszutek Wilk 1cd8160a30 libxl: Made it possible to use 'timer='delay_for_missed_ticks'
The assertion only allows values of 1 (no_delay_for_missed_ticks)
up to 3 (one_missed_tick_pending). It should be possible to
use the value of 0 (delay_for_missed_ticks) for the timer configuration
option.

Acked-by: Ian Campbell <ian.cambell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2013-02-26 16:16:17 +00:00
Ian Campbell 84fa23bc6c tools: foreign: ensure 64 bit values are properly aligned for arm
When building the foreign headers on x86_32 we use '#pragma pack(4)' and
therefore need to explicitly align types which should be aligned to 8-byte
boundaries.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2013-02-26 12:20:56 +00:00
Jan Beulich 2f8c55ccef x86: fix CMCI injection
This fixes the wrong use of literal vector 0xF7 with an "int"
instruction (invalidated by 25113:14609be41f36) and the fact that doing
the injection via a software interrupt was never valid anyway (because
cmci_interrupt() acks the LAPIC, which does the wrong thing if the
interrupt didn't get delivered though it).

In order to do latter, the patch introduces send_IPI_self(), at once
removing two opend coded uses of "genapic" in the IRQ handling code.

Reported-by: Yongjie Ren <yongjie.ren@intel.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Yongjie Ren <yongjie.ren@intel.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-02-26 10:15:56 +01:00
Suravee Suthikulpanit 0f8adcb2a7 IOMMU, AMD Family15h Model10-1Fh erratum 746 Workaround
The IOMMU may stop processing page translations due to a perceived lack
of credits for writing upstream peripheral page service request (PPR)
or event logs. If the L2B miscellaneous clock gating feature is enabled
the IOMMU does not properly register credits after the log request has
completed, leading to a potential system hang.

BIOSes are supposed to disable L2B micellaneous clock gating by setting
L2_L2B_CK_GATE_CONTROL[CKGateL2BMiscDisable](D0F2xF4_x90[2]) = 1b. This
patch corrects that for those which do not enable this workaround.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
2013-02-26 10:14:53 +01:00
Jan Beulich a90bc1471a AMD IOMMU: cover all functions of a device even if ACPI only tells us of func 0
This ought to work as all functions of a device have the same place in
the bus topology, i.e. use the same IOMMU.

Also fix the type of ivrs_bdf_entries (when it's 'unsigned short' and
the last device found on a segment is ff:1f.x, it would otherwise end
up being zero).

And drop the bogus 'last_bdf' static variable, which conflicted anyway
with various functions' parameters.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
2013-02-26 10:12:57 +01:00
Ian Jackson 6420870328 QEMU_TAG update 2013-02-25 16:45:14 +00:00
Xi Wang c40e24a8ef x86: fix null pointer dereference in intel_get_extended_msrs()
`memset(&mc_ext, 0, ...)' leads to a buffer overflow and a subsequent
null pointer dereference.  Replace `&mc_ext' with `mc_ext'.

Signed-off-by: Xi Wang <xi@mit.edu>
2013-02-25 12:44:25 +01:00
Ian Jackson 4291b626ce QEMU_TAG update 2013-02-22 18:16:54 +00:00
Daniel De Graaf 13dd8043cd tools/flask: add FLASK policy to build
This patch enables the compilation of the FLASK policy as part of the
tools build if the needed prerequisites are present.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2013-02-22 17:16:35 +00:00
Daniel De Graaf 2393441e58 flask/policy: rework policy build system
This adds the ability to define security classes and access vectors in
FLASK policy not defined by the hypervisor, for the use of stub domains
or applications without their own security policies.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
2013-02-22 17:15:39 +00:00
Daniel De Graaf 5721a6a406 flask/policy: sort dom0 accesses
For the example policy shipped with Xen, it makes sense to allow dom0
access to all system calls so that policy does not need to be updated
for each new hypervisor or toolstack feature used.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
2013-02-22 17:15:17 +00:00
Andrei Lifchits 68aa9a0bde build: Fix distclean when repo location changes
If the path to xen-unstable.hg changes (i.e. you move the repo), the symlinks
inside xen-unstable.hg/stubdom/libxc-x86_[32|64]/ all become broken, which
breaks distclean because make attempts to clean inside those first and fails to
find Makefile (which is also a symlink).

Signed-off-by: Andrei Lifchits <andrei.lifchits@citrix.com>
2013-02-22 16:39:41 +00:00
Olaf Hering 4b5059be62 xend: Only add cpuid and cpuid_check to sexpr once
tools/xend: Only add cpuid and cpuid_check to sexpr once

When converting a XendConfig object to sexpr, cpuid and cpuid_check
were being emitted twice in the resulting sexpr.  The first conversion
writes incorrect sexpr, causing parsing of the sexpr to fail when xend
is restarted and domain sexpr files in /var/lib/xend/domains/<dom-uuid>
are read and parsed.

This patch skips the first conversion, and uses only the custom
cpuid{_check} conversion methods called later.  It is not pretty, but
is the least invasive fix in this complex code.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
2013-02-22 16:35:28 +00:00
Frediano Ziglio 31c59e7009 doc: Improve xc_domain_restore inline documentation
Was not clear that xc_domain_restore did not resume the machine.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
2013-02-22 16:34:04 +00:00
Ian Campbell 7269eeae75 xen: arm: implement cpuinfo
Use to:

 - Only context switch ThumbEE state if the processor implements it. In
   particular the ARMv8 FastModels do not.
 - Detect the generic timer, and therefore call identify_cpu before
   init_xen_time.

Also improve the boot time messages a bit.

I haven't added decoding for all of the CPUID words, it seems like overkill
for the moment.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Cc: stefano.stabellini@citrix.com
2013-02-22 12:14:56 +00:00
Ian Campbell 75c3b4097c xen: arm: Fix guest mode for 64-bit
Need to check for the 64-bit EL2 modes, not 32-bit HYP mode.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:56 +00:00
Ian Campbell 8292f7f101 xen: arm: print arm64 not arm32 in xen info when appropriate.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:55 +00:00
Ian Campbell 36bec0096e xen: arm: Explicitly setup VPIDR & VMPIDR at start of day
These are supposed to reset to the value of the underlying hardware
but appears not to be on at least some v8 models. There's no harm in
setting them explicitly.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:55 +00:00
Ian Campbell 7a016c8427 xen: arm: Use generic mem{cpy, move, set, zero} on 64-bit
No optimised versions are available in Linux yet (meaning I couldn't
copy them).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:55 +00:00
Ian Campbell 2676f564d3 xen: arm: Enable VFP is a nop on 64-bit.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:55 +00:00
Ian Campbell 5d74ad1a08 xen: arm: implement do_multicall_call for both 32 and 64-bit
Obviously nothing is actually making multicalls even on 32-bit so
this isn't tested.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:55 +00:00
Ian Campbell 1f2d966a61 xen: arm: guest stage 1 walks on 64-bit hypervisor
Still only supports non-LPAE 32-bit guests.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:55 +00:00
Ian Campbell db686bc7b0 xen: arm: handle 32-bit guest CP register traps on 64-bit hypervisor
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:55 +00:00
Ian Campbell 16636d9085 xen: arm: select_user_reg support for 64-bit hypervisor
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:55 +00:00
Ian Campbell 3606cdc804 xen: arm: Use 64-bit compatible registers in vtimer.
Also, don't crash the host if we fail to emulate a vtimer access,
just kill the guest.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:55 +00:00
Ian Campbell c95d4af5bb xen: arm: p2m: use 64-bit compatible registers.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:55 +00:00
Ian Campbell f04b8e6c7f xen: arm: time: use 64-bit compatible registers
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:54 +00:00
Ian Campbell b14f92d85e xen: arm: gic: use 64-bit compatible registers
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:54 +00:00
Ian Campbell 724a1b963b xen: arm: make dom0 builder work on 64-bit hypervisor
This still only builds a 32-bit dom0, although it lays a bit of
simple ground work for 64-bit dom0.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:54 +00:00
Ian Campbell b262f2a680 xen: arm: show_registers() support for 64-bit.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:54 +00:00
Ian Campbell 45cf4f84a8 xen: arm: guest context switching.
One side effect of this is that we now save the full 64-bit
TTBR[0,1] even on a 32-bit hypervisor. This is needed anyway to
support LPAE guests (although this patch doesn't implement anything
other than the context switch).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:54 +00:00
Ian Campbell f7aa5f0657 xen: arm64: percpu variable support.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:54 +00:00
Ian Campbell 2ab89f356c xen: arm: pcpu context switch
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:54 +00:00
Ian Campbell f83694a08e xen: arm: arm64 trap handling.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:54 +00:00
Ian Campbell d2c8913c32 xen: arm: move arm32 specific trap handlers to xen/arch/arm/arm32
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:53 +00:00
Ian Campbell 66e994a5e7 xen: arm64: add guest type to domain field.
Currently 32 bit PV is the only option.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:53 +00:00
Ian Campbell 1c38a1e937 xen: arm: separate guest user regs from internal guest state.
struct cpu_user_regs is currently used as both internal state
(specifically at the base of the stack) and a guest/toolstack
visible API (via struct vcpu_guest_context used by
XEN_DOMCTL_{g,s}etvcpucontext and VCPUOP_initialise).

This causes problems when we want to make the API 64-bit clean since
we don't really want to change the size of the on-stack struct.

So split into vcpu_guest_core_regs which is the API facing struct
and keep cpu_user_regs purely internal, translate between the two.

In the user API arrange for both 64- and 32-bit registers to be
included in a layout which does not differ depending on toolstack
architecture. Also switch to using the more formal banked register
names (e.g. with the _usr suffix) for clarity.

This is an ABI change. Note that the kernel doesn't currently use
this data structure so it affects the tools interface only.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:53 +00:00
Ian Campbell a51b368b64 xen: arm: add register_t type, native register size for the hypervisor
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-02-22 12:14:53 +00:00
Ian Campbell d923f41efe xen: arm: use vaddr_t more widely.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:53 +00:00
Ian Campbell 482b00b90e xen: arm: extend HSR struct definitions to 64-bit
The main change is that the 4-bit register specifiers are extended
to 5 bits by taking in an adjacent SBZP bit.

Also 64-bit has two other properties indicting whether or not the
target register was 64-bit (x<n>) or 32-bit (w<n>) and whether the
instruction has acquire/release semantics.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:53 +00:00
Ian Campbell 08551b9008 xen: arm64: add to foreign struct checks
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-02-22 12:14:53 +00:00
Ian Campbell fe47f73c59 xen: arm64: changes to setup_pagetables and mm.c
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:53 +00:00
Ian Campbell cc3664f49a xen: arm64: start of day changes to setup.c
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:52 +00:00
Ian Campbell 7e6f5b0c94 xen: arm64: div64
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:52 +00:00
Ian Campbell 8c75419129 xen: arm64: interrupt/abort mask/unmask
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:52 +00:00
Ian Campbell 8b93c06fd2 xen: arm64: xchg and cmpxchg
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:52 +00:00
Ian Campbell 058324a8b3 xen: arm64: barriers and wait for interrupts/events
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:52 +00:00
Ian Campbell 6f0fef84da xen: arm64: address translation
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2013-02-22 12:14:52 +00:00