]> xenbits.xensource.com Git - xen.git/log
xen.git
13 years agoAdded signature for changeset 82f6fd38f5c2
Keir Fraser [Sat, 21 May 2011 06:59:15 +0000 (07:59 +0100)]
Added signature for changeset 82f6fd38f5c2

13 years agoAdded tag 4.0.2-rc4 for changeset 82f6fd38f5c2
Keir Fraser [Sat, 21 May 2011 06:58:38 +0000 (07:58 +0100)]
Added tag 4.0.2-rc4 for changeset 82f6fd38f5c2

13 years agoUpdate Xen version to 4.0.2-rc4 4.0.2-rc4
Keir Fraser [Sat, 21 May 2011 06:58:25 +0000 (07:58 +0100)]
Update Xen version to 4.0.2-rc4

13 years agogcc-4.6 compile fix: build with -Wno-unused-but-set-variable
Olaf Hering [Sat, 21 May 2011 06:57:03 +0000 (07:57 +0100)]
gcc-4.6 compile fix: build with -Wno-unused-but-set-variable

Avoid "error: variable 'unused' set but not used
[-Werror=unused-but-set-variable]" with gcc 4.6.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
xen-unstable changeset:   23368:0f670f5146c8
xen-unstable date:        Sat May 21 07:55:46 2011 +0100

13 years agox86: clear CPUID output of leaf 0xd for Dom0 when xsave is disabled
Keir Fraser [Fri, 20 May 2011 12:56:31 +0000 (13:56 +0100)]
x86: clear CPUID output of leaf 0xd for Dom0 when xsave is disabled

Linux starting with 2.6.36 uses the XSAVEOPT instruction and has
certain code paths that look only at the feature bit reported through
CPUID leaf 0xd sub-leaf 1 (i.e. without qualifying the check with one
evaluating leaf 4 output). Consequently the hypervisor ought to mimic
actual hardware in clearing leaf 0xd output when not supporting xsave.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   23353:a768a10d32b4
xen-unstable date:        Fri May 20 08:54:45 2011 +0100

Make this unconditional for 4.0 (no pv xsave support) and fix for domU
guests as well (this was already okay in 4.1 and later).

Signed-off-by: Keir Fraser <keir@xen.org>
13 years agopci_remove_device: fix linked list discipline
Tim Deegan [Fri, 20 May 2011 12:51:44 +0000 (13:51 +0100)]
pci_remove_device: fix linked list discipline

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   23352:ea48976517af
xen-unstable date:        Fri May 20 08:52:22 2011 +0100

13 years agox86-64: remove left over uses of .got entries
Jan Beulich [Mon, 16 May 2011 12:41:58 +0000 (13:41 +0100)]
x86-64: remove left over uses of .got entries

These were caused by some declarations happening before the compiler
would have seen the visibility pragma.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   23345:ba4bd20e581a
xen-unstable date:        Mon May 16 13:32:37 2011 +0100

13 years agoVT-d: Fix resource leaks on error paths
Igor Mammedov [Mon, 16 May 2011 12:41:25 +0000 (13:41 +0100)]
VT-d: Fix resource leaks on error paths

On error exit from functions, maped pages should be unmapped
and acquired locks released.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Allen Kay <allen.m.kay@intel.com>
xen-unstable changeset:   23343:edcf8fc77b64
xen-unstable date:        Mon May 16 13:29:24 2011 +0100

13 years agox86/tsc: Remove incorrect assertion from cstate_restore_tsc()...
Keir Fraser [Mon, 16 May 2011 12:40:51 +0000 (13:40 +0100)]
x86/tsc: Remove incorrect assertion from cstate_restore_tsc()...

..fix and move to write_tsc().

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   23342:16d12acccacf
xen-unstable date:        Mon May 16 13:24:05 2011 +0100

13 years agox86/ioapic: avoid gcc 4.6 warnings about uninitialised variables
Ian Campbell [Mon, 16 May 2011 12:39:51 +0000 (13:39 +0100)]
x86/ioapic: avoid gcc 4.6 warnings about uninitialised variables

gcc 4.6 complains:
        io_apic.c: In function 'restore_IO_APIC_setup':
        /build/user-xen_4.1.0-3-amd64-zSon7K/xen-4.1.0/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/io_apic.h:150:26:
        error: '*((void *)&entry+4)' may be used uninitialized in this
        function [-Werror=uninitialized]
        io_apic.c:221:32: note: '*((void *)&entry+4)' was declared
        here
        /build/user-xen_4.1.0-3-amd64-zSon7K/xen-4.1.0/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/io_apic.h:150:26:
        error: 'entry' may be used uninitialized in this function
        [-Werror=uninitialized]
        io_apic.c:221:32: note: 'entry' was declared here
        cc1: all warnings being treated as errors

Add functions to read/write an entire IO APIC entry using an explicit
union to allow gcc to spot the initialisation.

Reported as Debian bug #625438, thanks to Matthias Klose.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   23341:87084ca76c9c
xen-unstable date:        Mon May 16 13:13:41 2011 +0100

14 years agox86, vtd: [CVE-2011-1898] Protect against malicious MSIs from untrusted devices.
Keir Fraser [Thu, 12 May 2011 17:07:45 +0000 (18:07 +0100)]
x86, vtd: [CVE-2011-1898] Protect against malicious MSIs from untrusted devices.

In the absence of VT-d interrupt remapping support, a device can send
arbitrary APIC messages to host CPUs. One class of attack that results
is to confuse the hypervisor by delivering asynchronous interrupts to
vectors that are expected to handle only synchronous
traps/exceptions.

We block this class of attack by:
(1) setting APIC.TPR=0x10, to block all interrupts below vector
0x20. This blocks delivery to all architectural exception vectors.
(2) checking APIC.ISR[vec] for vectors 0x80 (fast syscall) and 0x82
(hypercall). In these cases we BUG if we detect we are handling a
hardware interrupt -- turning a potentially more severe infiltration
into a straightforward system crash (i.e, DoS).

Thanks to Invisible Things Lab <http://www.invisiblethingslab.com>
for discovery and detailed investigation of this attack.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   23337:cc91832a02c7
xen-unstable date:        Thu May 12 16:39:31 2011 +0100

14 years agox86: use compat hypercall handlers for calls from 32-bit HVM guests
Tim Deegan [Thu, 12 May 2011 08:23:21 +0000 (09:23 +0100)]
x86: use compat hypercall handlers for calls from 32-bit HVM guests

On 64-bit Xen, hypercalls from 32-bit HVM guests are handled as
a special case, but not all the hypercalls are corrently redirected
to their compat-mode wrappers.  Use compat_* for xen_version,
sched_op and set_timer_op for consistency.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   23333:fabdd682420c
xen-unstable date:        Thu May 12 09:13:18 2011 +0100

14 years agotools/xm-test: portability fix: Avoid using == in /bin/sh script
Christoph Egger [Thu, 12 May 2011 08:21:30 +0000 (09:21 +0100)]
tools/xm-test: portability fix: Avoid using == in /bin/sh script

From: David Brownlee <abs@netbsd.org>
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
xen-unstable changeset:   23328:6767d92dff13
xen-unstable date:        Thu May 12 08:55:12 2011 +0100

14 years agolibxc: [CVE-2011-1583] pv kernel image validation
Ian Jackson [Mon, 9 May 2011 14:06:17 +0000 (15:06 +0100)]
libxc: [CVE-2011-1583] pv kernel image validation

The functions which interpret the kernel image supplied for a
paravirtualised guest, and decompress it into memory when booting the
domain, are incautious.  Specifically:

 (i) Integer overflow in the decompression loop memory allocator might
    result in overrunning the buffer used for the decompressed image;
 (ii) Integer overflows and lack of checking of certain length fields
    can result in the loader reading its own address space beyond the
    size of the supplied kernel image file.
 (iii) Lack of error checking in the decompression loop can lead to an
    infinite loop.

This patch fixes these problems.

CVE-2011-1583.

Signed-off-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agox86: Clean up smp_call_function handling.
Keir Fraser [Mon, 9 May 2011 11:20:24 +0000 (12:20 +0100)]
x86: Clean up smp_call_function handling.

We don't need so many communication fields between caller and
handler.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   23285:a7ac0a0170b0
xen-unstable date:        Sun May 01 09:32:48 2011 +0100

14 years agopv-grub: Fix for incorrect dom->p2m_host[] list initialization
Daniel Kiper [Wed, 27 Apr 2011 12:31:04 +0000 (13:31 +0100)]
pv-grub: Fix for incorrect dom->p2m_host[] list initialization

Introduction of Linux Kernel git commit
ceefccc93932b920a8ec6f35f596db05202a12fe (x86: default
CONFIG_PHYSICAL_START and CONFIG_PHYSICAL_ALIGN to 16 MB) revealed
deeply hidden bug in pv-grub. During kernel load stage dom->p2m_host[]
list has been incorrectly initialized.

At the beginning of kernel load stage dom->p2m_host[] list is
populated with current PFN->MFN layout. Later during memory allocation
(memory is allocated page by page in kexec_allocate()) page order is
changed to establish linear layout in new domain. It is done by
exchanging subsequent MFNs with newly allocated MFNs. dom->p2m_host[]
list is indexed by currently requested PFN (it is incremented from 0)
and PFN of newly allocated paged. If PFN of newly allocated page is
less than currently requested PFN then earlier allocated MFN is
overwritten which leads to domain crash later. This patch corrects
that issue. If PFN of newly allocated page is less then currently
requested PFN then relevant PFN/MFN pair is properly calculated and
usual exchange occurs later.

Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
xen-unstable changeset:   23249:83fe79c0225f
xen-unstable date:        Wed Apr 27 13:29:14 2011 +0100

14 years agox86: No need for disable_tsc_sync when full 64-bit TSC cannot be written
Keir Fraser [Tue, 26 Apr 2011 13:15:15 +0000 (14:15 +0100)]
x86: No need for disable_tsc_sync when full 64-bit TSC cannot be written

During boot we only write zero to the TSCs, which is safe.

Signed-off-by: Keir Fraser <keir@xen.org>
14 years agox86: Bail from hpet_disable_legacy_broadcast() if legacy_hpet_event is uninitialised.
Keir Fraser [Tue, 26 Apr 2011 13:12:26 +0000 (14:12 +0100)]
x86: Bail from hpet_disable_legacy_broadcast() if legacy_hpet_event is uninitialised.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-4.1-testing changeset:   23034:7c7ef1b6f4e5
xen-4.1-testing date:        Tue Apr 26 14:11:18 2011 +0100

14 years agox86: don't write_tsc() non-zero values on CPUs updating only the lower 32 bits
Keir Fraser [Mon, 25 Apr 2011 12:45:06 +0000 (13:45 +0100)]
x86: don't write_tsc() non-zero values on CPUs updating only the lower 32 bits

This means suppressing the uses in time_calibration_tsc_rendezvous(),
cstate_restore_tsc(), and synchronize_tsc_slave(), and fixes a boot
hang of Linux Dom0 when loading processor.ko on such systems that
have support for C states above C1.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   23228:1329d99b4f16
xen-unstable date:        Fri Apr 15 08:52:08 2011 +0100

14 years agoAdded signature for changeset 5a74ec3e0cca
Keir Fraser [Wed, 13 Apr 2011 08:48:17 +0000 (09:48 +0100)]
Added signature for changeset 5a74ec3e0cca

14 years agoAdded tag 4.0.2-rc3 for changeset 5a74ec3e0cca
Keir Fraser [Wed, 13 Apr 2011 08:48:07 +0000 (09:48 +0100)]
Added tag 4.0.2-rc3 for changeset 5a74ec3e0cca

14 years agoUpdate Xen version to 4.0.2-rc3 4.0.2-rc3
Keir Fraser [Wed, 13 Apr 2011 08:47:59 +0000 (09:47 +0100)]
Update Xen version to 4.0.2-rc3

14 years agox86, amd, MTRR: correct DramModEn bit of SYS_CFG MSR
Wei Huang [Thu, 7 Apr 2011 14:44:19 +0000 (15:44 +0100)]
x86, amd, MTRR: correct DramModEn bit of SYS_CFG MSR

Some buggy BIOS might set SYS_CFG DramModEn bit to 1, which can cause
unexpected behavior on AMD platforms. This patch clears DramModEn bit
if it is 1.

Signed-off-by: Wei Huang <wei.huang2@amd.com>
xen-unstable changeset:   23153:8fb61c9ebe49
xen-unstable date:        Wed Apr 06 09:01:31 2011 +0100

14 years agoX86: Fix mce offline page bug
Liu, Jinsong [Thu, 7 Apr 2011 14:42:16 +0000 (15:42 +0100)]
X86: Fix mce offline page bug

c/s 19913 break mce offline page logic:
For page_state_is(pg, free), it's impossible to trigger the case;
For page_state_is(pg, offlined), it in fact didn't offline related
page;

This patch fix the bug, and remove an ambiguous comment.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
xen-unstable changeset:   23177:d8bb2de119de
xen-unstable date:        Thu Apr 07 12:12:01 2011 +0100

14 years agox86/hvm: load CPU structures from xen versions <=3.4
George Dunlap [Thu, 7 Apr 2011 14:41:05 +0000 (15:41 +0100)]
x86/hvm: load CPU structures from xen versions <=3.4

Xen 4.0 added "msr_tsc_aux" in the middle of the hvm_hw_cpu structure,
making it incompatible with pre-3.4 savefiles.  This patch uses the
recently introduced backwards-compatibility infrastructure to convert
the old to the new.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
Committed-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   23172:dc8b05d22a59
xen-unstable date:        Wed Apr 06 11:40:54 2011 +0100

14 years agohvm: infrastructure for backwards-compatible loading
George Dunlap [Thu, 7 Apr 2011 14:40:44 +0000 (15:40 +0100)]
hvm: infrastructure for backwards-compatible loading

The hvm_save code is used to save and restore hypervisor-related hvm
state, either for classic save/restore, or for migration (including
remus).  This is meant to be backwards-compatible across some
hypervisor versions; but if it does change, there is no way to handle
the old format as well as the new.

This patch introduces the infrastructure to allow a single older
version ("compat") of any given "save type" to be defined, along with
a function to turn the "old" version into the "new" version.  If the
size check fails for the "normal" version, it will check the "compat"
version, and if it matches, will read the old entry and call the
conversion function.

This patch involves some preprocessor hackery, but I'm only extending
the hackery that's already there.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
Committed-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   23171:6a5830de7b54
xen-unstable date:        Wed Apr 06 11:40:51 2011 +0100

14 years agohvm save: Introduce hvm_load_entry_zeroextend().
Keir Fraser [Thu, 7 Apr 2011 14:40:02 +0000 (15:40 +0100)]
hvm save: Introduce hvm_load_entry_zeroextend().

In certain cases this will allow us to load old HVM save images where
an HVM saved chunk has subsequently been extended with new
fields. Rather than fail to load the chunk, we can pad the extended
structure with zeroes, if the caller knows how to handle that.

Signed-off-by: Keir Fraser <keir@xen.org>
Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   22524:1f08b2932a52
xen-unstable date:        Wed Dec 15 10:21:05 2010 +0000

14 years agohvm save: Move some inline functions into common/hvm/save.c
Keir Fraser [Thu, 7 Apr 2011 14:38:58 +0000 (15:38 +0100)]
hvm save: Move some inline functions into common/hvm/save.c

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22523:6dda9f988ef3
xen-unstable date:        Wed Dec 15 10:15:45 2010 +0000

14 years agoxen: fix reloc.S generation for non-gnu toolchain
Christoph Egger [Sat, 2 Apr 2011 15:09:21 +0000 (16:09 +0100)]
xen: fix reloc.S generation for non-gnu toolchain

The output of AT&T UNIX and GNU od(1) are different.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
xen-unstable changeset:   23130:0e88c781a8a8
xen-unstable date:        Sat Apr 02 15:53:35 2011 +0100

14 years agox86: __pirq_guest_eoi() must check it is called for a fully
Keir Fraser [Sat, 2 Apr 2011 15:08:21 +0000 (16:08 +0100)]
x86: __pirq_guest_eoi() must check it is called for a fully
guest-bound irq before accessing desc->action.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   23103:48dac730a93b
xen-unstable date:        Sat Mar 26 09:42:01 2011 +0000

14 years agotools/blktap, blktap2: include <sys/mount.h> instead of <linux/fs.h>
Ian Campbell [Sat, 26 Mar 2011 09:34:08 +0000 (09:34 +0000)]
tools/blktap, blktap2: include <sys/mount.h> instead of <linux/fs.h>

The former is a userspace sanitised header which contains the
definitions we need. In some distros linux/fs.h defines WRITE which
conflicts with blktaps own use of that name.

Also there is no reason to use <linux/errno.h> over the more normal
<errno.h>.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   22765:0dbad563a659
xen-unstable date:        Mon Jan 17 17:14:20 2011 +0000

14 years agoinit.d: Fix xencommons init script chkconfig configuration
Keir Fraser [Fri, 25 Mar 2011 09:05:49 +0000 (09:05 +0000)]
init.d: Fix xencommons init script chkconfig configuration

Fix the xencommons init script chkconfig configuration since the
priority was missing here and chkconfig was complaining about invalid
chkconfig script so I added both start and stop priorities to the
chkconfig line and it was working fine, the script was successfully
added to chkconfig when using `chkconfig --add xencommons` and
management using the chkconfig utility was now possible.

Tested on RHEL-5 Server with Xen-4.1-unstable installed, running on
PVops kernel 2.6.32.15 and it was working fine.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
xen-unstable changeset:   21657:e2f5e4f3481c
xen-unstable date:        Tue Jun 22 16:22:30 2010 +0100

14 years agox86: run-time callers of map_pages_to_xen() must check for errors
Jan Beulich [Tue, 15 Mar 2011 13:57:11 +0000 (13:57 +0000)]
x86: run-time callers of map_pages_to_xen() must check for errors

Again, (out-of-memory) errors must not cause hypervisor crashes, and
hence ought to be propagated.

This also adjusts the cache attribute changing loop in
get_page_from_l1e() to not go through an unnecessary iteration. While
this could be considered mere cleanup, it is actually a requirement
for the subsequent now necessary error recovery path.

Also make a few functions static, easing the check for potential
callers needing adjustment.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22997:5f28dcea1355
xen-unstable date:        Wed Mar 09 16:15:36 2011 +0000

x86: don't BUG() post-boot in alloc_xen_pagetable()

Instead, propagate the condition to the caller, all of which also get
adjusted to check for that situation.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22996:1eeccafe9042
xen-unstable date:        Wed Mar 09 16:14:59 2011 +0000

14 years ago_csched_cpu_pick(): don't return CPUs outside vCPU's affinity mask
Jan Beulich [Mon, 14 Mar 2011 17:21:52 +0000 (17:21 +0000)]
_csched_cpu_pick(): don't return CPUs outside vCPU's affinity mask

This fixes a fairly blatant bug I introduced in c/s 20377:cff23354d026
- I wonder how this went unnoticed for so long.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   23039:c40da47621d8
xen-unstable date:        Mon Mar 14 17:19:22 2011 +0000

14 years agox86_64: fix error checking in arch_set_info_guest()
Tim Deegan [Mon, 14 Mar 2011 17:00:58 +0000 (17:00 +0000)]
x86_64: fix error checking in arch_set_info_guest()

Cannot specify user mode execution without specifying user-mode
pagetables.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   23034:c79aae866ad8
xen-unstable date:        Mon Mar 14 16:59:49 2011 +0000

14 years agolibxc: fix incorrect scanning of pfn array in pagebuf during migration
Shriram Rajagopalan [Mon, 14 Mar 2011 16:58:08 +0000 (16:58 +0000)]
libxc: fix incorrect scanning of pfn array in pagebuf during migration

xc_domain_restore.c:apply_batch function makes two passes over the
pfn_types array in pagebuf to allocate the needed MFNs. The curbatch
parameter to this function specifies the array offset in pfn_types,
from where the current scan should begin. But this variable is not
taken into account (index always starts at 0) during the two
passes. While this [bug] does not manifest itsef during save/restore
or live migration, under Remus, xc_domain_restore fails due to corrupt
guest page tables.

(This appears to have been broken by 21588:6c3d8aec202d which reverted
two changesets from before Remus support was added and hence
reintroduced some none-Remus compatible bits.)

Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   22967:5bc39222773d
xen-unstable date:        Thu Mar 03 16:55:27 2011 +0000

14 years agox86/HPET: fix initialization order
Jan Beulich [Sat, 12 Mar 2011 13:28:05 +0000 (13:28 +0000)]
x86/HPET: fix initialization order

At least the legacy path can enter its interrupt handler callout while
initialization is still in progress - that handler checks whether
->event_handler is non-NULL, and hence all other initialization must
happen before setting this field.

Do the same to the MSI initialization just in case (and to keep the
code in sync).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Wei Gang <gang.wei@intel.com>
xen-unstable changeset:   23030:87aa1277eae0
xen-unstable date:        Sat Mar 12 13:19:02 2011 +0000

14 years agotools: provide startup script for libxl
Ian Jackson [Thu, 10 Mar 2011 18:39:48 +0000 (18:39 +0000)]
tools: provide startup script for libxl

In Xen 4.0 there is no /etc/init.d/xencommons.  This means that in
most situations you don't get xenstored, and xl doesn't work, unless
you do something shonky like starting and then immediately stopping
xend.

To test xl, my automatic testing system therefore provides its own
init script to start xenstored and xenconsoled.  This script was
created by borrowing from /etc/init.d/xend and other init scripts in
various versions of xen.hg.

Here it is[1], as a new "xencommons" script.  The user will still have
to add appropriate rc links, and only a script for Linux is provided.

We do not want to backport the refactoring of /etc/init.d/xend, so
xend users should not enable this script.

[1] Copied from osstest.git#78c59993ab536b8c39c5a00a xenlightdaemons.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
14 years agox86_emulate: FPU 0xda instructions have a 32-bit memory operand, not 64-bit.
Keir Fraser [Tue, 8 Mar 2011 16:25:02 +0000 (16:25 +0000)]
x86_emulate: FPU 0xda instructions have a 32-bit memory operand, not 64-bit.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22993:22eb31eb688a
xen-unstable date:        Tue Mar 08 16:14:55 2011 +0000

14 years agox86_emulate: Fix emulation of FIMUL m32i.
Keir Fraser [Tue, 8 Mar 2011 16:24:51 +0000 (16:24 +0000)]
x86_emulate: Fix emulation of FIMUL m32i.

Need to emit assembler instruction fimull not fimul/fimuls.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22992:e93392bd6b66
xen-unstable date:        Tue Mar 08 16:10:13 2011 +0000

14 years agox86, libxc: Fix xc_translate_foreign_address() for PV guests of
Keir Fraser [Tue, 8 Mar 2011 16:23:19 +0000 (16:23 +0000)]
x86, libxc: Fix xc_translate_foreign_address() for PV guests of
different bitness than dom0 (32-bit vs 64-bit).

Original patch by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22966:de49500f344a
xen-unstable date:        Thu Mar 03 17:46:44 2011 +0000

14 years agoamd-k8-mce: remove a stray break statement
Keir Fraser [Thu, 24 Feb 2011 09:36:23 +0000 (09:36 +0000)]
amd-k8-mce: remove a stray break statement

This was a leftover of converting from a switch to an if/else
somewhere between 3.4 and 4.0.

It also looks suspicious that MCEQUIRK_K7_BANK0 is not actually used
anywhere. Perhaps amd_k7_mcheck_init() and amd_k8_mcheck_init() were
intended to get (partially) folded?

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22947:598d1fc295b6
xen-unstable date:        Thu Feb 24 09:33:19 2011 +0000

14 years ago[IA64] fix missing header: asm/fpswa.h
KUWAMURA Shin'ya [Fri, 18 Feb 2011 10:24:36 +0000 (10:24 +0000)]
[IA64] fix missing header: asm/fpswa.h

This patch fixes the following error in recent kernel:
  ia64/asm/dom_fw_common.h:47:23: error: asm/fpswa.h: No such file or
  directory

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
xen-unstable changeset:   22941:d12a28ef91b9
xen-unstable date:        Fri Feb 18 10:21:19 2011 +0000

14 years agoUpdate Xen version to 4.0.2-rc3-pre
Keir Fraser [Thu, 10 Feb 2011 17:26:19 +0000 (17:26 +0000)]
Update Xen version to 4.0.2-rc3-pre

14 years agoAdded signature for changeset 52a073532ff2
Keir Fraser [Thu, 10 Feb 2011 17:25:59 +0000 (17:25 +0000)]
Added signature for changeset 52a073532ff2

14 years agoAdded tag 4.0.2-rc2 for changeset 52a073532ff2
Keir Fraser [Thu, 10 Feb 2011 17:25:45 +0000 (17:25 +0000)]
Added tag 4.0.2-rc2 for changeset 52a073532ff2

14 years agoUpdate Xen version to 4.0.2-rc2 4.0.2-rc2
Keir Fraser [Thu, 10 Feb 2011 17:25:36 +0000 (17:25 +0000)]
Update Xen version to 4.0.2-rc2

14 years agoamd iommu: Fix a xen crash after pci-attach
Keir Fraser [Thu, 10 Feb 2011 09:04:05 +0000 (09:04 +0000)]
amd iommu: Fix a xen crash after pci-attach

pci-detach triggers IO page table deallocation if the last passthru
device has been removed from pdev list, and this will result a BUG on
amd systems for next pci-attach. This patch fixes this issue.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
xen-unstable changeset:   22872:cba9a84d32fb
xen-unstable date:        Sun Feb 06 16:54:01 2011 +0000

14 years agox86/hvm: don't let domains call HVMOP_set_mem_type on themselves.
Tim Deegan [Wed, 9 Feb 2011 09:02:12 +0000 (09:02 +0000)]
x86/hvm: don't let domains call HVMOP_set_mem_type on themselves.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   22879:098c8a6483c9
xen-unstable date:        Mon Feb 07 09:39:59 2011 +0000

14 years agoRevert 21334:993458f6c5a0 (xen-unstable 22071:c5aed2e049bc).
Keir Fraser [Mon, 7 Feb 2011 10:01:19 +0000 (10:01 +0000)]
Revert 21334:993458f6c5a0 (xen-unstable 22071:c5aed2e049bc).

Signed-off-by: Keir Fraser <keir@xen.org>
14 years agotrace: Change trace_var argument to void*, to match __trace_var
Keir Fraser [Sun, 6 Feb 2011 17:40:19 +0000 (17:40 +0000)]
trace: Change trace_var argument to void*, to match __trace_var

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
xen-unstable changeset:   22877:575d2f40acc4
xen-unstable date:        Sun Feb 06 17:22:44 2011 +0000

14 years agohvm amd: Fix 32bit guest VM save/restore issues associated with SYSENTER MSRs
Keir Fraser [Sun, 6 Feb 2011 17:39:10 +0000 (17:39 +0000)]
hvm amd: Fix 32bit guest VM save/restore issues associated with SYSENTER MSRs

This patch turn-on SYSENTER MSRs interception for 32bit guest VMs on
AMD CPUs. With it, hvm_svm.guest_sysenter_xx fields always contain the
canonical version of SYSENTER MSRs and are used in guest save/restore.
The data fields in VMCB save area are updated as necessary.

Reported-by: James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Wei Huang <wei.huang2@amd.com>
xen-unstable changeset:   22873:186162762071
xen-unstable date:        Sun Feb 06 17:03:09 2011 +0000

14 years agox86: Fix pirq teardown on domain destruction.
Wei Gang [Wed, 26 Jan 2011 09:05:53 +0000 (09:05 +0000)]
x86: Fix pirq teardown on domain destruction.

The privilege check in unmap_domain_pirq() fails since the teardown
completes in RCU (idle domain) context. We can remove the check since
it is covered in physdev_op() already, which is the only potentially
unprivileged caller.

Signed-off-by: Wei Gang <gang.wei@intel.com>
xen-unstable changeset:   22816:e7f44fb4ecc3
xen-unstable date:        Wed Jan 26 08:54:12 2011 +0000

14 years agox86: blacklist new AMD CPUID bits for PV domains
Keir Fraser [Wed, 26 Jan 2011 09:04:36 +0000 (09:04 +0000)]
x86: blacklist new AMD CPUID bits for PV domains

there are some new CPUID bits (and leaves) which Dom0 and PV domains
should not see to avoid trouble, since we don't emulate the features.
The most prominent one is a topology leaf, which contains information
specific to the physical CPU, not the virtual one. To avoid confusion
(and possibly crashes) due to a confused Dom0 scheduler simply disable
these bits.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22815:4785c70c2b6d
xen-unstable date:        Wed Jan 26 08:45:40 2011 +0000

14 years agox86: Do not pollute namespace with asm defns of PERFC_*.
Keir Fraser [Wed, 26 Jan 2011 09:01:17 +0000 (09:01 +0000)]
x86: Do not pollute namespace with asm defns of PERFC_*.

This fixes the build with perfc=y.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22814:b9017fdaad4d
xen-unstable date:        Wed Jan 26 08:35:24 2011 +0000

14 years agox86/tsc: remove misleading printk on HVM restore path.
Keir Fraser [Tue, 25 Jan 2011 14:54:42 +0000 (14:54 +0000)]
x86/tsc: remove misleading printk on HVM restore path.

This warning no longer corresponds to what the code actually does.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   22800:c50ae9d5dda4
xen-unstable date:        Tue Jan 25 14:05:25 2011 +0000

14 years agox86_emulate: set the operand size for SMSW/reg writeback.
Keir Fraser [Fri, 21 Jan 2011 16:03:04 +0000 (16:03 +0000)]
x86_emulate: set the operand size for SMSW/reg writeback.
Otherwise it defaults to 0 bytes.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22782:fe8a177ae9cb
xen-unstable date:        Wed Jan 19 15:29:04 2011 +0000

14 years agoxen: fix XEN_DOMCTL_memory_mapping to not return with domain RCU lock held
Keir Fraser [Tue, 18 Jan 2011 12:25:54 +0000 (12:25 +0000)]
xen: fix XEN_DOMCTL_memory_mapping to not return with domain RCU lock held

Broken in 20358:ecc649ec3675

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
xen-unstable changeset:   22775:e4688c57c230
xen-unstable date:        Tue Jan 18 09:04:04 2011 +0000

14 years agoxen: stringify assertion condition for printing sooner.
Keir Fraser [Tue, 18 Jan 2011 12:25:16 +0000 (12:25 +0000)]
xen: stringify assertion condition for printing sooner.

So that:
(XEN) Assertion '!(((*({ unsigned long __ptr; __asm__ ("" :
"=r"(__ptr) : "0"(&per_cpu____preempt_count));
(typeof(&per_cpu____preempt_count)) (__ptr +
(get_cpu_info()->per_cpu_offset)); }))) ||
((irq_stat[(((get_cpu_info()->processor_id)1...
becomes:
(XEN) Assertion '"!in_atomic()"' failed at softirq.c:61

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
xen-unstable changeset:   22774:96441daf4a5b
xen-unstable date:        Tue Jan 18 09:01:57 2011 +0000

14 years agopv-drivers: use PCI interfaces to request IO and MEM resources on platform device
Keir Fraser [Fri, 14 Jan 2011 08:17:07 +0000 (08:17 +0000)]
pv-drivers: use PCI interfaces to request IO and MEM resources on platform device

This is the correct interface to use and something has broken the use
of the previous incorrect interface (which fails because the request
conflicts with the resources assigned for the PCI device itself
instead of nesting like the PCI interfaces do).

pci_request_region() has been available since at least Linux 2.6.5.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22747:7bc5e072d986
xen-unstable date:        Fri Jan 14 08:02:26 2011 +0000

14 years agokexec: fix ia64 build for 21300:8bdf09baff30
KUWAMURA Shin'ya [Fri, 14 Jan 2011 08:14:00 +0000 (08:14 +0000)]
kexec: fix ia64 build for 21300:8bdf09baff30

On ia64, 21300:8bdf09baff30 introduces the following error:
  xen/common/kexec.c:490: undefined reference to
  `continue_hypercall_on_cpu'

The function continue_hypercall_on_cpu() is defined only on x86.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
14 years agoVT-d: fix ia64 build
Keir Fraser [Fri, 14 Jan 2011 08:13:09 +0000 (08:13 +0000)]
VT-d: fix ia64 build

The identifier `dest_LowestPrio' is defined on only x86.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
xen-unstable changeset:   22092:e0ec7b10f8ce
xen-unstable date:        Thu Sep 02 13:36:23 2010 +0100

14 years agostubdom: Fix stubdom-dm using "grep" improperly
John Weekes [Fri, 14 Jan 2011 08:04:48 +0000 (08:04 +0000)]
stubdom: Fix stubdom-dm using "grep" improperly

stubdom-dm uses "grep" on "xm list" output to determine whether it is
already running. The existing behavior is to use "grep $domname-dm"
but this will result in a false-positive in the case of another domU
running whose name ends with the full new name; for instance, if
"abctest-dm" is running, a new "test-dm" will spin forever, waiting
for it the end.

Any easy fix is to have it use "grep -w" instead of "grep", searching
for the whole word only.

It also might be worth considering a switch to "xl list" from "xm
list", here and in other places.

Signed-off-by: John Weekes <lists.xen@nuclearfallout.net>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   22714:6852e3e7ef58
xen-unstable date:        Tue Jan 11 16:42:41 2011 +0000

14 years agox86: don't crash when a CPU cannot be brought online during boot
Keir Fraser [Tue, 11 Jan 2011 10:41:01 +0000 (10:41 +0000)]
x86: don't crash when a CPU cannot be brought online during boot

x86_cpu_to_apicid[] gets set to BAD_APICID when bringup of a secondary
CPU fails, yet srat_detect_node() wants to use this as array index.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
14 years agoUpdate Xen version to 4.0.2-rc2-pre
Keir Fraser [Tue, 11 Jan 2011 10:40:17 +0000 (10:40 +0000)]
Update Xen version to 4.0.2-rc2-pre

14 years agoAdded signature for changeset 0bd829255a3f
Keir Fraser [Mon, 10 Jan 2011 15:43:13 +0000 (15:43 +0000)]
Added signature for changeset 0bd829255a3f

14 years agoAdded tag 4.0.2-rc1 for changeset 0bd829255a3f
Keir Fraser [Mon, 10 Jan 2011 15:41:41 +0000 (15:41 +0000)]
Added tag 4.0.2-rc1 for changeset 0bd829255a3f

14 years agoUpdate Xen version to 4.0.2-rc1 4.0.2-rc1
Keir Fraser [Mon, 10 Jan 2011 15:41:30 +0000 (15:41 +0000)]
Update Xen version to 4.0.2-rc1

14 years agox86: Fix atomic_write*() macros to correctly inform GCC that memory
Keir Fraser [Sat, 8 Jan 2011 10:45:22 +0000 (10:45 +0000)]
x86: Fix atomic_write*() macros to correctly inform GCC that memory
it knows about is being written to.

The bug is a copy-and-paste error from inline asm that writes to I/O
memory. In that case, as with asm for accessign guest memory,
specifying memory as a read-only parameter is acceptable because the
memory cannot alias with anything that GCC reads directly.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22683:533d6e5c0099
xen-unstable date:        Sat Jan 08 10:05:55 2011 +0000

14 years agoUpdate my email address to long-term stable address.
Keir Fraser [Fri, 7 Jan 2011 13:32:36 +0000 (13:32 +0000)]
Update my email address to long-term stable address.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22675:0ab058a55c24
xen-unstable date:        Fri Jan 07 13:30:04 2011 +0000

14 years agokexec: correct _domain offset info in elf-notes
Keir Fraser [Thu, 6 Jan 2011 19:05:06 +0000 (19:05 +0000)]
kexec: correct _domain offset info in elf-notes

The hypervisor writes some data structure infos into the elf note
section of the vmcore to enable interpretation of the xen structures
by kexec/kdump.

The info of the offset of _domain in page_info was just wrong on
non-ia64 systems.

Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
xen-unstable changeset:   22666:cb756381087c
xen-unstable date:        Thu Jan 06 19:02:36 2011 +0000

14 years agoUpdate QEMU_TAG
Keir Fraser [Thu, 6 Jan 2011 18:57:28 +0000 (18:57 +0000)]
Update QEMU_TAG

14 years agorelax vCPU pinned checks
Keir Fraser [Wed, 5 Jan 2011 10:01:11 +0000 (10:01 +0000)]
relax vCPU pinned checks

Both writing of certain MSRs and VCPUOP_get_physid make sense also for
dynamically (perhaps temporarily) pinned vcpus.

Likely a couple of other MSR writes (MSR_K8_HWCR, MSR_AMD64_NB_CFG,
MSR_FAM10H_MMIO_CONF_BASE) would make sense to be restricted by an
is_pinned() check too, possibly also some MSR reads.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22649:39194f457534
xen-unstable date:        Wed Jan 05 09:57:15 2011 +0000

14 years agoVT-d: fix and improve print_vtd_entries()
Keir Fraser [Fri, 24 Dec 2010 10:29:50 +0000 (10:29 +0000)]
VT-d: fix and improve print_vtd_entries()

Fix leaking of mapped domain pages (root_entry and ctxt_entry when
falling out of the level traversing loop). Do this by re-arranging
things slightly so that a mapping is retained only as long as it
really is needed.

Fix the failure to use map_domain_page() in the level traversing loop
of the function.

Add a mssing return statement in one of the error paths.

Also I wonder whether not being able to call print_vtd_entries() from
iommu_page_fault_do_one() in ix86 is still correct, now that
map_domain_page() is IRQ safe.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22632:7cc87dcf30a1
xen-unstable date:        Fri Dec 24 10:14:01 2010 +0000

14 years agore-add calls accidentally deleted from run_all_nonirq_keyhandlers()
Keir Fraser [Fri, 24 Dec 2010 10:29:14 +0000 (10:29 +0000)]
re-add calls accidentally deleted from run_all_nonirq_keyhandlers()

c/s 22538:a3a29e67aa7e, having got applied in a form different from
the one submitted, resulted in the calls to
console_{start,end}_log_everything() getting removed without
replacement. Add them back since, other than run_all_keyhandlers(),
this doesn't run with log-everything already in effect.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22631:dca1b7cf2e2c
xen-unstable date:        Fri Dec 24 10:12:58 2010 +0000

14 years agox86 hvm ept: Remove EPT guest linear address validation
Keir Fraser [Fri, 24 Dec 2010 10:28:35 +0000 (10:28 +0000)]
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>
xen-unstable changeset:   22574:b5418c045d02
xen-unstable date:        Tue Dec 21 18:09:34 2010 +0000

14 years agotools/python: fix xm list for Python 2.7
Keir Fraser [Mon, 20 Dec 2010 10:21:20 +0000 (10:21 +0000)]
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>
xen-unstable changeset:   22045:2940165380de
xen-unstable date:        Thu Aug 19 17:09:30 2010 +0100

14 years agotools: fetch remote changesets when force refetching/resetting qemu
Keir Fraser [Fri, 17 Dec 2010 17:57:33 +0000 (17:57 +0000)]
tools: fetch remote changesets when force refetching/resetting qemu

This makes "make tools/ioemu-dir-force-update" usable for picking up
an entirely new QEMU_TAG.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   22425:d6c2695f05eb
xen-unstable date:        Tue Nov 23 19:29:13 2010 +0000

14 years agotools: provide explicit target for refetching/resetting qemu
Keir Fraser [Fri, 17 Dec 2010 17:56:52 +0000 (17:56 +0000)]
tools: provide explicit target for refetching/resetting qemu

This patch adds an explicit update mechanism:
  make tools/ioemu-dir-force-update
This isn't brilliant but is better than doing "cd tools/ioemu-remote
&& git reset --hard <sha1...>" by hand.

Note that invoking this target will destroy all working tree changes
made to qemu-xen.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   22381:2bedffabbcab
xen-unstable date:        Tue Nov 09 18:15:25 2010 +0000

14 years agotools/python: Replace python string exceptions with ValueError exceptions
Keir Fraser [Fri, 17 Dec 2010 17:56:00 +0000 (17:56 +0000)]
tools/python: Replace python string exceptions with ValueError exceptions

There are at least some syntax errors when trying to use the xen utils
with python2.6.  The attached patch changes these string exception
into ValueErrors:

   - tools/python/xen/util/bugtool.py (getBugTitle)
   - tools/python/xen/xend (class XendBase): not catched
   - tools/python/xen/xm/xenapi_create.py (sxp2xmlconvert_sxp_to_xml):
     the method already raises a ValueError for similiar condition.
   - tools/python/xen/xm/main.py (xm_network_attach): not catched.

For all but maybe the first one, the replacement of the string
exceptions into ValueErrors seems to be safe.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   22153:95c90bd63aed
xen-unstable date:        Tue Sep 14 17:46:21 2010 +0100

14 years agotools/hotplug/Linux: Avoid dependency on iptables conntrack module.
Keir Fraser [Fri, 17 Dec 2010 16:13:54 +0000 (16:13 +0000)]
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>
xen-unstable changeset:   22573:ff1b80ccecd9
xen-unstable date:        Fri Dec 17 16:12:37 2010 +0000

tools/hotplug/Linux: supply --physdev-is-bridged in iptables runes

With newer (pvops) kernels logs get flooded with this iptables
warning: physdev match: using --physdev-out in the OUTPUT, FORWARD and
POSTROUTING chains for non-bridged traffic is not supported anymore

Using the --physdev-is-bridged option prevents this.
See also: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=571634#10

Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   22385:b0fe8260cefa
xen-unstable date:        Wed Nov 10 14:37:19 2010 +0000

14 years agox86, atomic: Fix 32-bit version of atomic_write64().
Keir Fraser [Fri, 17 Dec 2010 14:17:31 +0000 (14:17 +0000)]
x86, atomic: Fix 32-bit version of atomic_write64().

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22572:e3fd86244491
xen-unstable date:        Fri Dec 17 14:16:41 2010 +0000

14 years agovtd: Reinstate ACPI DMAR on system shutdown or S3/S4/S5.
Keir Fraser [Fri, 17 Dec 2010 10:48:30 +0000 (10:48 +0000)]
vtd: Reinstate ACPI DMAR on system shutdown or S3/S4/S5.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22570:f2dba7ff0828
xen-unstable date:        Fri Dec 17 10:46:43 2010 +0000

14 years agoxentrace: Clean up initialisation.
Keir Fraser [Thu, 16 Dec 2010 20:18:11 +0000 (20:18 +0000)]
xentrace: Clean up initialisation.

Allocate no memory and print no debug messages when disabled.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22567:f5f3cf4e001f
xen-unstable date:        Thu Dec 16 20:07:03 2010 +0000

14 years agox86: Define pte_{read,write}[_atomic] in terms of atomic_readN
Keir Fraser [Thu, 16 Dec 2010 20:13:47 +0000 (20:13 +0000)]
x86: Define pte_{read,write}[_atomic] in terms of atomic_readN

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22565:1cc551716430
xen-unstable date:        Thu Dec 16 19:36:35 2010 +0000

14 years agox86: Define atomic_{read,write}{8,16,32,64} accessor functions.
Keir Fraser [Thu, 16 Dec 2010 20:10:32 +0000 (20:10 +0000)]
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>
xen-unstable changeset:   22564:aa33ab320f7e
xen-unstable date:        Thu Dec 16 19:29:08 2010 +0000

14 years agovtd: Require unmap_vtd_domain_page() on a couple of early exit paths.
Keir Fraser [Thu, 16 Dec 2010 15:40:51 +0000 (15:40 +0000)]
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>
xen-unstable changeset:   22549:aa18b8ddaf05
xen-unstable date:        Thu Dec 16 15:38:57 2010 +0000

14 years agox86/32on64: zero-extend hypercall index before use in memory access (debug mode only)
Keir Fraser [Wed, 15 Dec 2010 12:14:05 +0000 (12:14 +0000)]
x86/32on64: zero-extend hypercall index before use in memory access (debug mode only)

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22540:d8279118b4bb
xen-unstable date:        Wed Dec 15 12:10:31 2010 +0000

14 years agox86-64: fix restoring of hypercall arguments after trace callout
Keir Fraser [Wed, 15 Dec 2010 12:13:47 +0000 (12:13 +0000)]
x86-64: fix restoring of hypercall arguments after trace callout

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22539:20c65aa19075
xen-unstable date:        Wed Dec 15 12:09:41 2010 +0000

14 years agoReduce side effects of handling '*' debug key
Keir Fraser [Wed, 15 Dec 2010 12:06:56 +0000 (12:06 +0000)]
Reduce side effects of handling '*' debug key

NMI watchdog should be suppressed when dumping IRQ handlers. Softirqs
should be handled periodically while processing non-IRQ handlers.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22538:a3a29e67aa7e
xen-unstable date:        Wed Dec 15 12:04:34 2010 +0000

14 years agoept: Remove lock in ept_get_entry, replace with access-once semantics.
Keir Fraser [Wed, 15 Dec 2010 10:47:52 +0000 (10:47 +0000)]
ept: Remove lock in ept_get_entry, replace with access-once semantics.

This mirrors the RVI/shadow situation, where p2m read access is
lockless because it's done in the hardware (linear map of the p2m
table).

This fixes the original bug (call it bug A) without introducing bug B
(a deadlock).

Bug A was caused by a race when updating p2m entries: between testing
if it's valid, and testing if it's populate-on-demand, it may have
been changed from populate-on-demand to valid.

My original patch simply introduced a lock into ept_get_entry, but
that caused bug B, caused by circular locking order: p2m_change_type
[grabs p2m lock] -> set_p2m_entry -> ept_set_entry ->
ept_set_middle_level -> p2m_alloc [grabs hap lock] write cr4 ->
hap_update_paging_modes [grabes hap lock] -> hap_update_cr3 ->
gfn_to_mfn -> ept_get_entry -> [grabs p2m lock]

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
xen-unstable changeset:   22526:7a5ee3800417
xen-unstable date:        Wed Dec 15 10:47:05 2010 +0000

14 years agotmem: two wrongs (or three lefts and a wrong) make a right
Keir Fraser [Wed, 15 Dec 2010 10:32:22 +0000 (10:32 +0000)]
tmem: two wrongs (or three lefts and a wrong) make a right

These two bugs apparently complement each other enough that
they escaped problems in my testing, but eventually gum
up the works and are obviously horribly wrong.

Found while developing tmem for native Linux.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
xen-unstable changeset:   22525:01f3b3509023
xen-unstable date:        Wed Dec 15 10:27:18 2010 +0000

14 years agox86/iommu: account for necessary allocations when calculating Dom0's
Keir Fraser [Wed, 15 Dec 2010 10:31:59 +0000 (10:31 +0000)]
x86/iommu: account for necessary allocations when calculating Dom0's
initial allocation size

As of c/s 21812:e382656e4dcc, IOMMU related allocations for Dom0
happen only after it got all of its memory allocated, and hence the
reserve (mainly for setting up its swiotlb) may get exhausted without
accounting for the necessary allocations up front.

While not precise, the estimate has been found to be within a couple
of pages for the systems it got tested on.

For the calculation to be reasonably correct, this depends on the
patch titled "x86/iommu: don't map RAM holes above 4G" sent out
yesterday.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22506:618ba64260fa
xen-unstable date:        Tue Dec 14 09:54:10 2010 +0000

14 years agox86 acpi: Follow Windows behaviour more closely during reset.
Keir Fraser [Wed, 15 Dec 2010 10:31:08 +0000 (10:31 +0000)]
x86 acpi: Follow Windows behaviour more closely during reset.

This follows some changes proposed for upstream Linux:
 1. Do not check the FADT reset register size/offset
 2. Try ACPI poking twice during our reset attempt sequence

Hopefully this will help us reset reliably on a wider range of
platforms.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22482:91e0556f4d46
xen-unstable date:        Fri Dec 10 11:32:19 2010 +0000

x86: acpi: Fix reboot attempt sequence.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22483:901c118b363e
xen-unstable date:        Fri Dec 10 16:40:05 2010 +0000

14 years agotmem: Use of 'new' clashes with C++ reserved namespace.
Keir Fraser [Fri, 10 Dec 2010 11:39:01 +0000 (11:39 +0000)]
tmem: Use of 'new' clashes with C++ reserved namespace.

Rename to 'creat', which does not conflict.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22481:0353037c6b95
xen-unstable date:        Fri Dec 10 11:01:19 2010 +0000

14 years agohvm: Fix merging error in hvm_op.h
Keir Fraser [Fri, 10 Dec 2010 11:36:57 +0000 (11:36 +0000)]
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>
xen-unstable changeset:   22082:0eb89b465e46
xen-unstable date:        Wed Sep 01 10:17:29 2010 +0100

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>
xen-unstable changeset:   22090:4a628af0355c
xen-unstable date:        Thu Sep 02 13:30:26 2010 +0100

14 years agox86 hvm: Add a new HVMOP to get the current Xen system time
Keir Fraser [Fri, 10 Dec 2010 11:34:28 +0000 (11:34 +0000)]
x86 hvm: Add a new HVMOP to get the current Xen system time

Xen absolute system time, so that it can use SCHEDOP_poll in a
sensible fashion.  HVM PV drivers can't use the normal PV clock
because they might have TSC offsets that hey don't know about.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   21772:2662f9c881fa
xen-unstable date:        Fri Jul 09 17:16:03 2010 +0100

14 years agox86: time: tsc_set_info() must skip the idle domain.
Keir Fraser [Thu, 9 Dec 2010 16:15:55 +0000 (16:15 +0000)]
x86: time: tsc_set_info() must skip the idle domain.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22473:a04430925a8b
xen-unstable date:        Thu Dec 09 16:15:10 2010 +0000

14 years agoMove IDLE_DOMAIN_ID defn to public header, and change DOMID_INVALID to fix clash.
Keir Fraser [Thu, 9 Dec 2010 10:19:01 +0000 (10:19 +0000)]
Move IDLE_DOMAIN_ID defn to public header, and change DOMID_INVALID to fix clash.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22472:5ac189556629
xen-unstable ldate:        Thu Dec 09 10:09:59 2010 +0000

14 years agox86: Simplify tsc_set_info() slightly -- no domain has id DOMID_INVALID.
Keir Fraser [Thu, 9 Dec 2010 10:16:34 +0000 (10:16 +0000)]
x86: Simplify tsc_set_info() slightly -- no domain has id DOMID_INVALID.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22471:c9abf5fc5c52
xen-unstable date:        Thu Dec 09 09:57:08 2010 +0000