Commit Graph
22595 Commits
Author SHA1 Message Date
Ian Campbell fa0eebfd1b libxc: osdep: convert xc_gnttab_set_max_grants()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:47 +00:00
Ian Campbell e4371c99d8 libxc: osdep: convert xc_gnttab_munmap()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:47 +00:00
Ian Campbell fcc007081b libxc: osdep: convert xc_gnttab_map_{grant_ref,grant_refs,domain_grant_refs}()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:47 +00:00
Ian Campbell 3361a9deea libxc: osdep: convert xc_evtchn_{pending,unmask}()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:47 +00:00
Ian Campbell dbb5c70a0d libxc: osdep: convert xc_evtchn_unbind()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:47 +00:00
Ian Campbell 1fd1a4254d libxc: osdep: convert xc_evtchn_bind_virq()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:47 +00:00
Ian Campbell b491e4e05d libxc: osdep: convert xc_evtchn_bind_interdomain()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:47 +00:00
Ian Campbell cb1325b0d5 libxc: osdep: convert xc_evtchn_bind_unbound_port()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:47 +00:00
Ian Campbell 660aa26bec libxc: osdep: convert xc_evtchn_notify()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:47 +00:00
Ian Campbell 5cdff1952e libxc: osdep: convert xc_evtchn_fd()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:47 +00:00
Ian Campbell d52853b78c libxc: osdep: convert xc_map_foreign_ranges()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:47 +00:00
Ian Campbell 3143748ef6 libxc: osdep: convert xc_map_foreign_range()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:47 +00:00
Ian Campbell f32797d331 libxc: osdep: convert xc_map_foreign_{batch,bulk}
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:47 +00:00
Ian Campbell 2e04f9622f libxc: osdep: convert do_xen_hypercall()
do_privcmd() was only ever used by do_xen_hypercall() so remove it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:46 +00:00
Ian Campbell 02e4f47747 libxc: osdep: add framework for abstracting access to dom0 OS hypervisor interfaces.
This patch introduces the basic infrastructure and uses it for open
and close operations on privcmd, evtchn and gnttab devices.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:46 +00:00
Ian Campbell 94705cc4bf libxc: convert gnttab interfaces to use an opaque handle type
The xc_interface previously passed to xc_gnttab_* was only used for
logging which can now be done via the xc_gnttab handle instead.

This makes the interface consistent with the changes made to the main
interface in 21483:779c0ef9682c.

Also update QEMU_TAG to pull in the corresponding qemu change.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-23 15:32:52 +00:00
Ian Campbell 3e446a35ee libxc: convert evtchn interfaces to use an opaque handle type
This makes the interface consistent with the changes made to the main
interface in 21483:779c0ef9682c.

Also fix some references to "struct xc_interface" which should have
been simply "xc_interface" in tools/xenpaging, and update QEMU_TAG to
pull in the corresponding qemu change.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-23 15:25:57 +00:00
Ian Campbell 252cb308e3 libxc: some xc_gnttab_* functions are not Linux specific
They simply make hypercalls and perform other operations via the
abstract interface. Create xc_gnttab.c and move those functions there.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-23 15:08:21 +00:00
Ian Jackson 01fcfa3b96 tools/hotplug: read /etc/default/xencommons if appropriate
Since 22187:c41252a55a0a we have been installing our example
xencommons settings file in either /etc/sysconfig or /etc/default,
depending on whether /etc/sysconfig exists.

However I omitted to add the code to /etc/init.d/xencommons to
actually read either version of the file, although every other init
script seems to have it.

An effect of this misplaced/unread file is that the automatic tests
don't cause xenconsoled to collect serial logs, because the tester
edits whichever file actually exists.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-22 17:48:31 +00:00
Keir Fraser b4692a3899 EPT/VT-d: disable page sharing by default.
Currently sharing these page tables causes a hang on boot on some
hardware. Disable by default until this is resolved.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2010-12-21 18:10:46 +00:00
Keir Fraser aefe867d3f x86 hvm ept: Remove EPT guest linear address validation
For EPT violation resulting from an attempt to load the guest PDPTEs
as part of the execution of the MOV CR instruction, the EPT_GLA_VALID
is not valid.  This situation should not happen in most situation,
since we always populate guest memory. But this is not ture for PAE
guest under the PoD/Page sharing situation. In that situation, a page
pointed by CR3 may be un-populated, and we need handle it in such
situation.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
2010-12-21 18:09:34 +00:00
Keir Fraser 26637cd320 tools/hotplug/Linux: Avoid dependency on iptables conntrack module.
Checking for RELATED,ESTABLISHED traffic being sent to a domU requires
connection tracking, which adds unexpected (to most users) load to
dom0. Heavily loaded systems can fill the conntrack tables.

So avoid this, be more liberal in what we accept, and leave it to domU
to police its own input.

Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-17 16:12:37 +00:00
Keir Fraser 999fc9bc6c x86, atomic: Fix 32-bit version of atomic_write64().
Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-17 14:16:41 +00:00
Keir Fraser b924b8d761 x86 ept: Define and use atomic_{read,write}_ept_entry().
Signed-off-by: Keir Fraser <keir@xen.org>
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-12-17 11:51:10 +00:00
Keir Fraser 6c298ecc1f vtd: Reinstate ACPI DMAR on system shutdown or S3/S4/S5.
Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-17 10:46:43 +00:00
Keir Fraser 00b8b6c5db x86 hvm: Move CPUID.0xd (XSAVE) configuration into libxc.
Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-17 09:54:22 +00:00
Keir Fraser ee8ac49677 x86:xsaveopt: Enable xsaveopt feature in Xen and guest
This patch uses "xsaveopt" instead of "xsave" if the feature is
supported in hardware to optimize task switch performance in Xen. It
also exposes the feature to guest VMs.

Signed-off-by: Zhang Fengzhe <fengzhe.zhang@intel.com>
2010-12-17 09:25:00 +00:00
Keir Fraser 5ec363dfe9 xentrace: Clean up initialisation.
Allocate no memory and print no debug messages when disabled.

Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-16 20:07:03 +00:00
Keir Fraser 3b2ddb02d6 vtd: Clean up a recent printk message.
Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-16 20:06:36 +00:00
Keir Fraser 43acf92caf x86: Define pte_{read,write}[_atomic] in terms of atomic_readN
Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-16 19:36:35 +00:00
Keir Fraser d24d88e655 x86: Define atomic_{read,write}{8,16,32,64} accessor functions.
These absolutely guarantee to read/write a uint*_t with a single atomic
processor instruction.

Also re-define atomic_read/atomic_write (act on atomic_t) similarly.

Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-16 19:29:08 +00:00
Keir Fraser 49f09d64e4 x86/bitops.h: Remove unused smp_mb__* macros
Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-16 19:04:11 +00:00
Keir Fraser 4463aa35e5 x86/atomic.h: Clean up for Xen code style; remove unused smp_mb__*
Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-16 19:01:35 +00:00
Keir Fraser 165e3aba7c x86: Remove unnecessary LOCK/LOCK_PREFIX macros.
We don't support !CONFIG_SMP.

Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-16 18:46:55 +00:00
Keir Fraser ab134ffcc5 x86: move early page fault code into .init.text
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-12-16 18:37:30 +00:00
Keir Fraser c69d84d0a9 x86/asm: allow some unlikely taken branches to be statically predicted this way
... by moving the respective code out of line (into sub-section 1 of
the particular section). A few other branches could be eliminated
altogether.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-12-16 18:37:20 +00:00
Olaf Hering d4700445c1 tools/xcutils: xc_save: add missing whitespace
Add missing whitespace between the two error strings.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
2010-12-16 18:25:33 +00:00
Olaf Hering ca80bbc61a tools/libxc: fix comment typo in xc_domain_save
evey -> every

Signed-off-by: Olaf Hering <olaf@aepfle.de>
2010-12-16 18:24:57 +00:00
Christoph Egger 713a9df82f libxl: constify libxl_create_cpupool()
Attached patch constifies libxl_create_cpupool().

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-16 18:24:04 +00:00
Christoph Egger f6574fa1d4 tools, bsd: complete implementation of discard_file_cache
attached patch completes discard_file_cache() for NetBSD.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-16 18:21:56 +00:00
Ian Campbell cacf9acf52 xenstore: set implicit path for socket connections
For now assume all such connections come from domain 0.

Failure to do this breaks various scripts which assume that they
operate relative to the domains "home directory".

This matches the behaviour of the ocaml xenstored.

Thanks to report from Olaf Hering.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-16 18:04:08 +00:00
Ian Campbell e40c1e449e tools/hotplug: Do not recursively invoke xenstore_write on error
This fixes a possible infinite recursion.

From: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-16 17:58:00 +00:00
Ian Jackson 08d26f71bc tools/xl: fix race which can leave an xl monitor processing hanging
If the domain is destroyed (eg with xl destroy), it is possible that
the xl which is monitoring the domain for restart/preserve will not be
able to get the domain shutdown reason.

Before this patch, it would then ignore the domain death event and
carry on waiting, forever, for more events.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-16 17:39:24 +00:00
Ian Jackson 8231289385 QEMU_TAG update 2010-12-16 16:58:39 +00:00
Keir Fraser d3c04651b5 audit_p2m: fix syntax errors in disabled debug code
If P2M_PRINTK is re-defined as ordinary printk,
some (disabled) debug statements will not compile.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
2010-12-16 15:41:52 +00:00
Keir Fraser a5d9a4f4ae vtd: Require unmap_vtd_domain_page() on a couple of early exit paths.
From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-16 15:38:57 +00:00
Ian Jackson 261ad8cb9f Merge 2010-12-15 16:49:25 +00:00
Kouya Shimura 5d0efa621f tools/hotplug/Linux: force release lock if holder process is gone (fix)
22508:57907b28e51a was unsafe for mutual exclusion.  There is a case
that the owner file doesn't exist yet when an atomic mkdir operation
fails.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-15 16:49:06 +00:00
Keir Fraser b5b30386b4 svm: support VMCB cleanbits
Attached patch implements the VMCB cleanbits SVM feature.
Upcoming AMD CPUs introduce them and they are basically hints
for the CPU which vmcb values can be re-used from the previous
VMRUN instruction.

Each bit represents a certain set of fields in the VMCB.
Setting a bit tells the cpu it can re-use the cached value
from the previous VMRUN.
Clearing a bit tells the cpu to reload the values from the given VMCB.

Signed-off-by: Wei Huang <Wei.Huang2@amd.com>
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-15 16:34:11 +00:00
Keir Fraser 99b2c76382 EPT/VT-d page table sharing
Basic idea is to leverage 2MB and 1GB page size support in EPT by having
VT-d using the same page tables as EPT.  When EPT page table changes, flush
VT-d IOTLB cache.

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
2010-12-15 14:16:03 +00:00