Commit Graph
22094 Commits
Author SHA1 Message Date
Keir Fraser 4c0688367d [IA64] Rename irq_cfg->domain to irq_cfg->cpu_mask
This patch is ia64 part of 22070:20920c12bc48.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2010-09-02 13:36:53 +01:00
Keir Fraser 2d367541f4 VT-d: fix ia64 build
The identifier `dest_LowestPrio' is defined on only x86.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2010-09-02 13:36:23 +01:00
Keir Fraser 89506d2f34 Disable ACPI APEI feature for ia64
The apei-io.c cannot be built on ia64.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2010-09-02 13:35:40 +01:00
Keir Fraser 5c11702074 hvm_op: Remove use of uint64_aligned_t from guest header file.
Manually pad to the required alignment instead.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-09-02 13:30:26 +01:00
Keir Fraser 9e24317d4e Revert 5b03813d8d6e "Make uint64_aligned_t and GUEST_HANDLE_64 visible to guests."
This introduced non-ANSI gcc-isms into the guest-visible sections of
public headers. Not allowed after all.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-09-02 13:29:45 +01:00
Tim Deegan 09cae24637 x86 shadow: allocate all shadow memory in single pages
now that multi-page shadows need not be contiguous.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-09-01 11:23:49 +01:00
Tim Deegan 3117617710 x86 shadow: remove the assumption that multipage shadows are contiguous
and move from page to page using the linked list instead.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-09-01 11:23:48 +01:00
Tim Deegan 1c7493f100 x86 shadow: explicitly link the pages of multipage shadows
together using their list headers.  Update the users of the
pinned-shadows list to expect l2_32 shadows to have four entries
in the list, which must be kept together during updates.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-09-01 11:23:48 +01:00
Tim Deegan c385d27079 x86 shadow: for multi-page shadows, explicitly track the first page
(where the refcounts are) and check that none of the routines
that do refcounting ever see the second, third or fourth page.
This is just stating and enforcing an existing implicit requirement.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-09-01 11:23:47 +01:00
Keir Fraser f7d0b9960f x86 intel: Disable XSAVE support.
It breaks HVM save/restore.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-09-01 10:19:14 +01:00
Keir Fraser bdb5439c3f x86_64: Ensure frame-table compression leaves MAX_ORDER aligned
contiguous ranges of page_info structs. This allows page-pointer
arithmetic in places like our buddy allocator.

This restriction was already implicitly guaranteed, but it is good to
make it explicit in the pdx-related initialisation.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-09-01 10:17:49 +01:00
Keir Fraser 4e3645c1b0 hvm: Fix merging error in hvm_op.h
A couple of new hvm_op commands were erroneously ifdef'ed to be
accessible only to the toolstack.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-09-01 10:17:29 +01:00
Keir Fraser 03634129fb Make uint64_aligned_t and GUEST_HANDLE_64 visible to guests.
No reason to hide them and they're useful for building 32/64-bit
invariant hypercall structures.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-09-01 10:17:16 +01:00
Keir Fraser bbfcb03ac2 x86 p2m: Fix comment regarding mfn_valid().
MMIO pages are not always above max_page (e.g., >=4GB system with MMIO
in the RAM hole below 4GB).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-09-01 10:16:39 +01:00
Allen Kay allen.m.kay@intel.com 5cd887a615 x86 mm: revert check in clear_mmio_p2m_entry() changed in 21940:e7afe98afd43
valid_mfn() cannot be used here as MMIO pages are always above max_mem.
Also added sanity checking for type == p2m_mmio_direct before clearing
page table entry.  This should fix both VT-d and SR-IOV issues reported
recently as there are no SR-IOV specific code in Xen.  As far as Xen
is concern, SR-IOV virtual function is just another PCI device.

Signed-off-by: Allen Kay allen.m.kay@intel.com
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-09-01 09:48:52 +01:00
Ian Campbell 4883b4ee76 libxl: builtin list types should be pass-by-reference
This makes all _destroy functions consistent wrt freeing the actual
reference passed in. Previously we were relying on the reference
contained within the type itself which worked but was semantically a
little confusing.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-31 19:16:23 +01:00
Ian Campbell a703824d6d libxl: correct indentation of _libxl_types.c
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-31 19:15:42 +01:00
Ian Campbell b89c3d320f libxl: correctly free Reference types in autogenerated destroy functions
References types should be recursively destroyed and then the actual
reference itself should be destroyed.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-31 19:14:57 +01:00
Stefano Stabellini 5b67996cc6 libxl: drop libxl_set_vcpucount, introduce libxl_set_vcpuonline
This patch renames libxl_set_vcpucount to libxl_set_vcpuonline and
modifies the function to take a bitmap of online/offline vcpus as
parameter.

It also introduces a xenstore transaction to write the available cpus
to xenstore.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-31 19:05:01 +01:00
Christoph Egger fbf24c664b libxl: run libxlgentypes with $(PYTHON)
Attached patch fixes libxl build that broke in
changeset 22032:fa82b0540e8c.

It is common these days to use $(PYTHON) in the build system.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-31 17:51:51 +01:00
Daniel De Graaf bef8b1c5fd Missing include in libxl_pci.c
Missing include in tools/libxl/libxl_pci.c: lstat() call requires
<sys/stat.h>.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-08-30 14:59:12 +01:00
Daniel De Graaf 8753bc456e libxl: fix xenstore connection when run in domU
When used in a domain other than the one running xenstore,
libxl_ctx_init will fail to connect even when xenstore is actually
available. Add a call to xs_domain_open to handle this case.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-08-30 13:58:07 +01:00
Keir Fraser 5c3f41d408 ept: Put locks around ept_get_entry
There's a subtle race in ept_get_entry, such that if tries to read an
entry that ept_set_entry is modifying, it gets neither the old entry
nor the new entry, but empty.  In the case of multi-cpu
populate-on-demand guests, this manifests as a guest crash when one
vcpu tries to read a page which another page is trying to populate,
and ept_get_entry returns p2m_mmio_dm.

This bug can also be fixed by making both ept_set_entry and
ept_next_level access-once (i.e., ept_next_level reads full ept_entry
and then works with local value; ept_set_entry construct the entry
locally and then sets it in one write).  But there doesn't seem to be
any major performance implications of just making ept_get_entry use
locks; so the simpler, the better.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2010-08-30 08:39:52 +01:00
Keir Fraser d644899c1c Rename irq_cfg->domain to irq_cfg->cpu_mask
From: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-08-30 08:38:26 +01:00
Keir Fraser 8fbb79aaf2 Update MAINTAINERS file with AMD maintainers
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Andre Przywara <andre.przywara@amd.com>
Acked-by: Wei Huang <wei.huang2@amd.com>
Acked-by: Wei Wang <wei.wang2@amd.com>
Acked-by: Mark Langsdorf <mark.langsdorf@amd.com>
2010-08-30 08:31:57 +01:00
Keir Fraser 8de22c95b4 VT-d: Hardware require RH bit to be set in IRTE when delivery mode is LPR
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
2010-08-26 11:16:56 +01:00
Keir Fraser 128e862878 Fix bind_irq_vector() destination
The "mask" covered all online cpus in the "domain". It should be used
as destination later, instead of using "domain" directly.

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
2010-08-26 11:16:14 +01:00
Ian Campbell 6993e9f5ce # HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1282671421 -3600
# Node ID d1dd29a470ef1b9d2c77478a123326036dfe90bb
# Parent  d7a4adad9c328decbd384d87b23001aea8951b86
tools/libxc, tools/libelf: Relicense under LGPL v2.1

Relicense these two libraries under LGPL v2.1 only except where
individual files already included the "or later" provision.

Copyright holders have been contacted by Stephen Spector and have all
agreed this change.

Removed tools/libxc/ia64/aclinux.h since it appeared to be
unused. There is a separate, more up to date, copy in
xen/include/acpi/platform/aclinux.h which does appear to be used.

Clarify the license of MiniOS privcmd.h under the same terms as other
tools/include/xen-sys headers.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stephen Spector <stephen.spector@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-24 18:42:59 +01:00
Ian Campbell d14db9f863 libxc: remove xc_ptrace
It has been unused since 21732:eb34666befcc. There was no response to
my RFC regarding its removal
http://marc.info/?l=xen-devel&m=128170404422822 and unfortunately we
have not been able to trace down all copyright holders of this code
for the purposes of relicensing libxc.

The code will be available in mercurial if we need to retrieve it in
the future.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-24 18:34:46 +01:00
Olaf Hering 4fc7d71bc2 tools/xenpaging: call pageout policy function in xenpaging_evict_page
Notify policy about a page that was just paged out to disk.
Up to now the code called the opposite function, which clears the
(xenpaging internal) reference bit, instead of setting it and marking
the page as gone.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Patrick Colp <pjcolp@cs.ubc.ca>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-24 18:33:25 +01:00
Ian Campbell e7ebcafdbf xl: treat sub-command main function like a regular C main() function
Currently xl passes the entire argc+argv to each subcommand and relies
on the preservation of the global optind variable to ensure that the
subcommand correctly handles argument parsing (e.g. accounting for "xl
[command]" vs "xl -v [command]").

This requirement for individual sub-commands to parse arguments
relative to optind is subtle and prone to being forgotten (or simply
not expected). Several sub-commands have recently been broken in this
way (now fixed).

Therefore arrange that the argv+argc passed to the sub-commands looks
like you would expect for a regular C main function and includes
argv[0] equal to the command name with command specific arguments in
argv[1] onwards.

Since all sub-commands (currently) correctly obey the optind it is
sufficient to reset it to 1 (as described in getopt(3)) in order to
not break the sub-commands' own argument parsing.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-24 18:30:07 +01:00
Ian Campbell 763cad8558 xl: correct argument parsing for some sub-commands.
XL sub-commands are expected to parse their arguments relative to the
global variable "optind" rather than treating argc+argv as zero
based. This is because the argc+argv passed to sub-commands include
the entire original command line, not just the sub command specific bits.

Not all commands do this and they are therefore broken if the user
uses "xl -v command", correct such problems

dump-core:
  - did not handle "-h" option.

{network,network2,block}-{attach,list,detach} :
  - handled arguments without reference to optind
  - checked number of arguments before processing getopt loop,
    breaking "-h" option handling

An example of the breakage:
    # xl -v block-list d32-2
    Vdev  BE  handle state evt-ch ring-ref BE-path
    block-list is an invalid domain identifier
    51712 0   1      4     13     8        /local/domain/0/backend/vbd/1/

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-24 18:29:21 +01:00
Ian Campbell 86316089e4 libxl: do not leak path to dom0 attached disk after running bootloader
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-24 18:28:26 +01:00
Ian Campbell 3ebec8fa65 libxl: xc_domain_restore returns 0 on success, 1 on error
Fix restore_common to handle it this way.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-24 18:26:08 +01:00
Andre Przywara 317b6ccda5 xl: improve vif2 parsing
vif2 parsing relies on counted strncmp() statements. Replace this
with a more robust automatic version.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-24 18:19:19 +01:00
Andre Przywara 6c5e7d69b6 xl: fix strtok() call in vif2 parsing
Fix fixes a hang when parsing the vif2 parameter.

According to the manpage subsequent calls to strtok() must use
NULL in the string parameter to keep the iteration going.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-24 18:18:20 +01:00
Keir Fraser 9810095a10 Fix typo in audit_p2m(), SHARED_P2M_ENTRY does not exist.
Without this change, p2m.c fails to compile if P2M_AUDIT is enabled.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
2010-08-24 16:15:56 +01:00
Keir Fraser 3699ba2cce Fix mce erst bug to pass build under i386.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
2010-08-24 16:14:50 +01:00
Keir Fraser 8dedf64313 buildconfigs: update enable-xen-config
Enable a bunch of new Xen options, primarily blktap, PCI passthrough
and platform PCI device (PVHVM).

Also set default for a bunch of non-Xen options which are not covered
by the defconfig.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2010-08-24 16:14:14 +01:00
Keir Fraser 7878f447f1 Document how 4gb_segment_notify notifys 2010-08-22 09:53:51 +01:00
Keir Fraser c8cb30cfc8 mce: Provide ERST interface
This patch is used to provide ERST write/read/clear operation
interface to Xen MCE.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
2010-08-22 09:53:15 +01:00
Keir Fraser 96590ca760 Implement ACPI APEI ERST feature
APEI are ACPI4.0 new features. It consists of ERST, BERT, HEST, and
EINJ.  ERST is used to save fault error log to a platform persistent
storage, so that when reboot os can retrieve the error log and handle
it.

This patch is used to implement ERST feature to Xen.  It consists of
3-level hierarchy: operation level, action level, and instru= ction
level.  Instruction do basic io; Action done by sequential
instructions parsed from ACPI ERST table; Operation done by
sequential actions defined by ACPI spec, providing erst_write/
erst_read/ erst_clear interfaces to MCE/ NMI/ PCIe error handling
mechanism, etc.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
2010-08-22 09:52:18 +01:00
Keir Fraser 37eb6d05fe x86: Automatically EOI guest-bound interrupts if guest takes too long.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-08-22 09:37:08 +01:00
Gianni Tedesco f69a68961f xl: poison data objects in auto-generated destructors
Increase the probability of blowing up badly up during any
use-after-destroy scenarios.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-20 17:12:00 +01:00
Brendan Cully 603b00dba7 libxc: remus: unbreak after 21488:dd6bbdc42033
The aforementioned patch missed several calls to read_exact, causing spurious
timeouts under Remus.

Also add a couple of additional error reports to rdexact.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-19 18:24:12 +01:00
Stefano Stabellini 8ef0c5ff6c libxl: Disable opengl if info->opengl == 0 (correct sense of test)
Disable opengl if info->opengl == 0

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-19 18:15:44 +01:00
Ian Jackson 73eafe46b4 QEMU_TAG update 2010-08-19 18:13:01 +01:00
Ian Jackson 8b139bdc02 QEMU_TAG update 2010-08-19 17:51:39 +01:00
Michael Young 4053efae85 tools/python: fix xm list for Python 2.7
This patch fixes
  Unexpected error: <type 'exceptions.AttributeError'>
This is due to xmlrpc changes in Python 2.7.  This patch should
fixe it for both old and new versions.

Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-19 17:09:30 +01:00
Keir Fraser 90d0bd9ffb timers: Fix printk format specifier
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-08-19 16:24:13 +01:00