Commit Graph
24908 Commits
Author SHA1 Message Date
Roger Pau Monne 51efccc2cd install: remove old checks from install.sh
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-02-29 14:36:04 +00:00
Olaf Hering 9c33ab91c5 libxl: use libxl wrapper for yajl_gen_alloc
To fix compile errors with libyajl2:
 * use libxl_yajl_gen_alloc()
 * use libxl_yajl_length
 * link xl with -lyajl for yajl_gen_string()

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-02-29 14:32:51 +00:00
Olaf Hering 244ae51879 libxl: rename libxl__yajl_gen_alloc
libxl__yajl_gen_alloc() is called by generic code,
rename it to libx_yajl_gen_alloc().

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-02-29 14:31:59 +00:00
Dietmar Hahn 9e459f88d1 vpmu: No need for two initialisation functions
With the changeset 24529:87854d3bed93 we got 2 initialisation
functions for the arch specific stuff. This is no more needed.

Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-29 13:51:42 +00:00
Dietmar Hahn f3ff1b2db4 vpmu: cleanup structures
- struct msr_load_store_entry is unused
- struct pmumsr is only used in the vmx part

Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-29 13:51:12 +00:00
Daniel De Graaf 88683bd373 xsm: expose context of event channel peers
This hypercall allows a domain to identify the security context of a
domain that it is communicating with using the interdomain event
channel that it is using for the communication. This can be used to
augment Xen's security permissions with intra-domain security checks.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-29 13:48:41 +00:00
Daniel De Graaf 42d446c595 xsm/flask: buffer AVC messages for output
When multiple CPUs hit an AVC audit message, the resulting output in
the ring buffer and serial console is garbled due to the audit process
using many separate printk invocations for each message. Change the
AVC audit process to use a temporary buffer and output the contents
once the entire audit message is complete.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-29 13:47:41 +00:00
Daniel De Graaf 4e7cbab278 xsm/flask: clean interdomain event channel hook
Don't attempt to relabel the already-bound half of the event channel
pair created by an interdomain event channel. This relabeling also
performed an incorrect check that the destination domain is permitted
to create the reverse event channel, which may not be true if the
unbound channel was created by the domain builder (like the xenstore
channel).

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-29 13:47:11 +00:00
Daniel De Graaf b34f2c3750 xsm: label xen-consumer event channels
Event channels created during the domain build process for HVM domains
did not call the XSM creation hook. Since these channels are used
internally by Xen, redirect them to DOMAIN_INVAID instead of failing
to create if the XSM hook fails the permissions check.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-29 13:46:32 +00:00
Keir Fraser c5d88f34ce Update autoconf-generated configure script.
Signed-off-by: Keir Fraser <keir@xen.org>
2012-02-29 13:43:44 +00:00
Daniel De Graaf 305ea73d1b build: Export configure variables to hypervisor build
Since the introduction of autoconf, builds with XSM enabled in .config
have been broken unless FLASK_ENABLE was explicitly set. Since the
setting in .config has apparently been deprecated in favor of an
autoconf --enable-xsm, add config/Xen.mk to export this to Xen. This
also makes --disable-debug and some paths to be pulled from the
configure process in the hypervisor build.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-29 13:40:25 +00:00
Attilio Rao 0c2dccd724 hvmloader: drop the ovmf32 support and rename ovmf64 -> ovmf.
- Remove the 15cpus hack from ovmf because it should be unnecessary on
nowadays windows/EFI supported.

Signed-off-by: Attilio Rao <attilio.rao@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-29 13:33:51 +00:00
Tim Deegan 7802d99398 arm: Handle booting on SMP platforms
Make all non-boot CPUs wait forever instead of trying to boot in parallel.

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-02-28 10:17:27 +00:00
Tim Deegan 214d8be8b9 arm: strip xen binary
The symbols in it are wrong anyway and will only confuse people
who ought to be looking at xen-syms.

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-02-28 10:17:27 +00:00
Liu, Jinsong 6af7deded7 X86: expose HLE/RTM features to dom0
Intel recently release 2 new features, HLE and TRM.
Refer to http://software.intel.com/file/41417.
This patch expose them to dom0.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
2012-02-28 09:06:27 +01:00
Ian Campbell 2e20f9102d Update SEABIOS_UPSTREAM_TAG
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
2012-02-27 17:05:18 +00:00
David Vrabel ce67d283a8 arm: fix unaligned memcpy() and memmove()
If memcpy() and memmove() were used with source and destination of
different alignment then the result would be all jumbled.

When their implementations were imported from Linux some macros for
big-endian platforms were taken instead of the correct little-endian
ones (specifically, the push and pull macros in assembler.h).

Fix this by taking Linux's arch/include/asm/assembler.h as-is and
making only the minimum changes necessary for Xen.

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-02-27 17:05:18 +00:00
Ian Campbell f2f180d09c SEABIOS_UPSTREAM_TAG Update
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
2012-02-27 16:12:24 +00:00
Keir Fraser f20e5f80da Revert 24875:a59c1dcfe968 "blkif.h: Define and document the request number/size/segments extension"
Breaks the build.

Signed-off-by: Keir Fraser <keir@xen.org>
2012-02-27 12:10:29 +00:00
Jan Beulich a8078b0235 passthrough: release assigned PCI devices earlier during domain shutdown
At least with xend, where there's not even a tool stack side attempt to
de-assign devices during domain shutdown, this allows immediate re-
starts of a domain to work reliably. (There's no apparent reason why
c/s 18010:c1577f094ae4 chose to put this in the asynchronous part of
domain destruction).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2012-02-24 11:46:32 +01:00
Jan Beulich e1dc98e3c3 x86/vMCE: save/restore MCA capabilities
This allows migration to a host with less MCA banks than the source
host had, while without this patch accesses to the excess banks' MSRs
caused #GP-s in the guest after migration (and it depended on the guest
kernel whether this would be fatal).

A fundamental question is whether we should also save/restore MCG_CTL
and MCi_CTL, as the HVM save record would better be defined to the
complete state that needs saving from the beginning (I'm unsure whether
the save/restore logic allows for future extension of an existing
record).

Of course, this change is expected to make migration from new to older
Xen impossible (again I'm unsure what the save/restore logic does with
records it doesn't even know about).

The (trivial) tools side change may seem unrelated, but the code should
have been that way from the beginning to allow the hypervisor to look
at currently unused ext_vcpucontext fields without risking to read
garbage when those fields get a meaning assigned in the future. This
isn't being enforced here - should it be? (Obviously, for backwards
compatibility, the hypervisor must assume these fields to be clear only
when the extended context's size exceeds the old original one.)

A future addition to this change might be to allow configuration of the
number of banks and other MCA capabilities for a guest before it starts
(i.e. to not inherits the values seen on the first host it runs on).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2012-02-24 09:07:54 +01:00
Jan Beulich b272353fe9 x86/vMCE: don't advertise features we don't support
... or even know of. Apart from CMCI, which was masked off already,
this now also suppresses the advertising of extended state registers
(reading of which would likely be meaningless in a guest and represent
an information leak).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2012-02-24 09:03:43 +01:00
Olaf Hering 8295fa0d82 mem_event: use C99 initializers for mem_event_request_t users
Use C99 initializers for mem_event_request_t users to make sure req is
always cleared, even with local debug patches that shuffle code around
to have a single exit point.
The common case is to use and send req, so it does not add significant
overhead to always clear req.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
2012-02-20 22:16:32 +01:00
Olaf Hering 6eac9387aa mem_event: remove type member
When mem_event was added the type flag should indicate who the consumer
is. But the concept of a single ring buffer for multiple event types can
not work for two reasons. One is that no multiplexer exists which
provides individual event types to the final consumer, and second is
that even if such multiplexer can not work reliable because a request
needs to be answered with a response. The response should be sent
roughly in the order of received events. But with multiple consumers one
of them can so stall all the others.

For that reason the single mem_event buffer for all types of events was
split into individual ring buffers with commit 23842:483c5f8319ad. This
commit made the type member already obsolete because the meaning of each
buffer is now obvious.

This change removes the type member and increases the flags field.

Even though this is an ABI incompatible change, it will have no practical
impact on existing binaries because the changeset referenced above already
bumped the SONAME. So these binaries have to be recompiled anyway for the
upcoming major release.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
2012-02-20 22:09:40 +01:00
Tim Deegan b38c115140 x86/mm: Don't check for invalid bits in non-present PTEs.
If _PAGE_PRESENT is clean in a pagetable entry, any pattern of bits
is valid in the rest of the entry.  OSes that special-case
PFEC_invalid_bits (since it should never happen) will be confused
by our setting it in this way.

Signed-off-by: Tim Deegan <tim@xen.org>
2012-02-23 10:29:27 +00:00
George Dunlap 8367c5c179 libxl: Rename libxl_sched_* to include _domain
In preparation for introducing a schedule parameter-based structure,
rename libxl_sched_{credit,credit2,sedf} to libxl_sched_{}_domain.

No functional changes.

v2: Wrap long lines while I'm at it

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-23 10:19:57 +00:00
George Dunlap 83421b2079 libxc: Implement SCHEDOP sysctl for credit scheduler
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-23 10:17:50 +00:00
George Dunlap 3ffbb6bf35 scheduler: Implement SCHEDOP sysctl for credit scheduler
Allow tslice_ms and ratelimit_us to be modified.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-23 10:17:21 +00:00
George Dunlap 7a191adcfb scheduler: Print ratelimit in scheduler debug key
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-23 10:16:10 +00:00
George Dunlap 558ab89512 scheduler: Add a #define for the default ratelimit
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-23 10:15:40 +00:00
George Dunlap 07f06f76ec cleanup: Remove dependency files in efi directory during a make clean
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-23 10:14:55 +00:00
Attilio Rao 4775b620fb hvmloader: Add OVMF UEFI support and directly use it
...when specified in the guest configuration file.

This work is somewhat based on Bei Guan effort during the SoC 2011 and
relies on upstream edk2/ovmf Tianocore ROM to be built separately and
manually copied as:
Build/OvmfX64/DEBUG_GCC44/FV/OVMF.fd ->
tools/firmware/ovmf/ovmf-x64.bin
Build/OvmfIa32/DEBUG_GCC44/FV/OVMF.fd ->
toolf/firmware/ovmf/ovmf-ia32.bin

A way to integrate OVMF build directly into XEN has still be discussed
on the mailing list appropriately.

Signed-off-by: Attilio Rao <attilio.rao@citrix.com>

Disable CONFIG_OVMF by default as ovmf is not integrated into the
build.

Signed-off-by: Keir Fraser <keir@xen.org>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-23 10:11:58 +00:00
Justin T. Gibbs 15c018eb32 blkif.h: Define and document the request number/size/segments extension
Note: As of __XEN_INTERFACE_VERSION__ 0x00040201 the definition of
      BLKIF_MAX_SEGMENTS_PER_REQUEST has changed.  Drivers must be
      updated to, at minimum, use BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK,
      before being recompiled with a __XEN_INTERFACE_VERSION greater
      than or equal to this value.

This extension first appeared in the FreeBSD Operating System.

Signed-off-by: Justin T. Gibbs <justing@spectralogic.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-23 10:03:07 +00:00
Justin T. Gibbs 829f2a9c6d blkif.h: Document the Red Hat and Citrix blkif multi-page ring extensions
No functional changes.

Signed-off-by: Justin T. Gibbs <justing@spectralogic.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-23 10:02:30 +00:00
Justin T. Gibbs 2fa701e534 blkif.h: Provide more complete documentation of the blkif interface
o Document the XenBus nodes used in this protocol.
  o Add a state diagram illustrating the roles and responsibilities
    of both the front and backend during startup.
  o Correct missed BLKIF_OP_TRIM => BLKIF_OP_DISCARD conversion in a
    comment.

No functional changes.

Signed-off-by: Justin T. Gibbs <justing@spectralogic.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-23 10:01:59 +00:00
Justin T. Gibbs be78b28619 blkif.h: Miscelaneous style fixes
o Remove trailing whitespace.
  o Remove a blank line so that a comment block is adjacent to the
    code it documents.

No functional changes.

Signed-off-by: Justin T. Gibbs <justing@spectralogic.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-23 10:01:26 +00:00
Ian Campbell 9c881a8b39 xen: add missing unlock from gnttab_get_version
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reported-by: Francisco Rocha <f.e.liberal-rocha@newcastle.ac.uk>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-23 09:59:35 +00:00
Andrew Cooper 23c3c39665 IO-APIC: Prevent using EOI broadcast suppression if user specified ioapic_ack=new on the command line.
Currently, if EOI broadcast suppression is advertised on the BSP
LAPIC, Xen will discard any user specified option regarding IO-APIC
ack mode.

This patch introduces a check which prevents EOI Broadcast suppression
from forcing the IO-APIC ack mode to old if the user has explicitly
asked for the new ack mode on the command line.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-02-23 09:58:47 +00:00
Ian Campbell d77aed8fda arm: lr register in hyp mode is really LR_usr.
Save and restore it in the same way for both hypervisor and user stack frames
rather than saving both individually in the user stack frame.

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>
2012-02-22 14:33:24 +00:00
Ian Campbell c52f64c8dc arm: restore ELR_hyp and SPSR_hyp on return from hypervisor to hypervisor.
This is necessary to handle nested traps to the hypervisor more than one deep.

I've not seen an actually failure relating to this but I'm not quite sure how
we've managed to get away with not doing it (I suppose multiply nested traps
are uncommon).

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>
2012-02-22 14:33:23 +00:00
David Vrabel 5d22304c12 arm: move check for CONFIG_DTB_FILE to xen/arch/arm/Makefile
CONFIG_DTB_FILE only needs to be set when building Xen itself.

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-02-22 14:33:23 +00:00
Ian Campbell 755e512957 arm: use a per-VCPU stack
We do not do any lazy state switching. Outside of context_switch() the current
stack is always that of the VCPU which current returns.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
2012-02-22 14:33:22 +00:00
Ian Jackson 6fa67ade26 autoconf: Rerun autogen.sh
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-02-22 14:27:18 +00:00
Roger Pau Monne 6821262ce9 autoconf: clean brctl options
This bit was missing, sorry.

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-02-22 13:06:42 +00:00
Roger Pau Monne 6221f9c26b autoconf: remove udev checks from build
There's no need to have udev when building Xen since it's only used at
run time.

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-02-22 11:56:24 +00:00
Roger Pau Monne 05a6820066 autoconf: remove brctl check
Remove brctl check since it's usually only available to users with
high privileges, but Xen should be buildable by regular users.

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-02-22 11:54:16 +00:00
Ian Jackson 14a307e271 .gitignore: add autoconf-related files
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2012-02-22 01:55:04 +00:00
Ian Jackson 85896a7c4d build: add autoconf to replace custom checks in tools/check
Added autotools magic to replace custom check scripts. The previous
checks have been ported to autoconf, and some additional ones have
been added (plus the suggestions from running autoscan). Two files are
created as a result from executing configure script, config/Tools.mk
and config.h.

conf/Tools.mk is included by tools/Rules.mk, and contains most of the
options previously defined in .config, that can now be set passing
parameters or defining environment variables when executing configure
script.

config.h is only used by libxl/xl to detect yajl_version.h.

[ tools/config.sub and config.guess copied from
  autotools-dev 20100122.1 from Debian squeeze i386,
  which is GPLv2.

  tools/configure generated using the included ./autogen.sh
  which ran autoconf 2.67-2 from Debian squeeze i386.  autoconf
  is GPLv3+ but has a special exception for the autoconf output;
  this exception applies to us and exempts us from complying
  with GPLv3+ for configure, which is good as Xen is GPL2 only.

  - Ian Jackson ]

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Tested-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2012-02-22 01:55:03 +00:00
Bamvor Jian Zhang fa674239ae libxl: Export libxl_event.h
This fixes a compile error in libvirt.

Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-02-21 18:01:04 +00:00
George Dunlap 85c49351f7 libxl: cleanup: Remove pointless ERRNOVAL
Just call LIBXL__LOG rather than passing a meaningless ERRNOVAL.

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>
2012-02-21 17:45:59 +00:00