]> xenbits.xensource.com Git - people/vhanquez/xen.git/log
people/vhanquez/xen.git
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

14 years agox86:vlapic: Fix possible guest tick losing after save/restore
Keir Fraser [Thu, 9 Dec 2010 10:16:03 +0000 (10:16 +0000)]
x86:vlapic: Fix possible guest tick losing after save/restore

Guest vcpu may totally lose all ticks if the vlapic->pt.irq was not
restored during save/restore process. Fix it.

Signed-off-by: Wei Gang <gang.wei@intel.com>
xen-unstable changeset:   22470:0c97247c64d6
xen-unstable date:        Thu Dec 09 08:34:59 2010 +0000

14 years agox86/mm: change ASSERTs to BUG_ONs in mem_sharing.c
Keir Fraser [Thu, 9 Dec 2010 10:14:57 +0000 (10:14 +0000)]
x86/mm: change ASSERTs to BUG_ONs in mem_sharing.c

These two ASSERTs have important side-effects so make them into
BUG_ONs
consistent with the rest of the file.
Bug found by Jui-Hao Chiang <juihaochiang@gmail.com>.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   22467:89116f28083f
xen-unstable date:        Wed Dec 08 10:46:31 2010 +0000

14 years agox86: remove BUG_ON() from QUIRK_IOAPIC_*_REGSEL handler
Keir Fraser [Tue, 7 Dec 2010 18:37:31 +0000 (18:37 +0000)]
x86: remove BUG_ON() from QUIRK_IOAPIC_*_REGSEL handler

Since (non-pvops, 32-bit only up to 2.6.27) Linux would report "BAD"
unconditionally on all SiS chipset versions (it only looks for a PCI
device at 0000:00:00.0 with SiS as the vendor), we must not crash if
the report on a 64-bit hypervisor doesn't match the #define (which is
zero).

While we could honor the quirk indication even on 64-bit, it doesn't
seem worthwhile, as there's no evidence that newer SiS chipsets
(supporting 64-bit CPUs) are actually affected.

This should also address bug 1687 (mis-reported, however, afaict).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22466:bfd13358b8bf
xen-unstable date:        Tue Dec 07 18:32:04 2010 +0000

14 years agox86: fix IRQ migration when using directed EOI (broken with c/s 20465)
Keir Fraser [Wed, 1 Dec 2010 20:14:56 +0000 (20:14 +0000)]
x86: fix IRQ migration when using directed EOI (broken with c/s 20465)

In directed-EOI mode, there is no chance to do the migration in
mask_and_ack_level_ioapic_irq(), as the remote IRR bit can't possibly
be clear after issuing the EOI to the LAPIC. Consequently, there's no
point to even try. Instead, migration must be done in
end_level_ioapic_irq(), and it requires masking the interrupt source
prior to issuing the EOI to the IO-APIC.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22452:62bf12040b0f
xen-unstable date:        Wed Dec 01 20:10:27 2010 +0000

14 years agox86 hvm: Do not overwrite boot-cpu capability data on VMX/SVM startup.
Keir Fraser [Tue, 30 Nov 2010 11:38:16 +0000 (11:38 +0000)]
x86 hvm: Do not overwrite boot-cpu capability data on VMX/SVM startup.

Apparently required back in the earliest days of Xen, we now properly
initialise CPU capabilities early during bootstrap. Re-writing
capability data later now causes problems if specific features have
been deliberately masked out.

Thanks to Weidong Han at Intel for finding such a bug where XSAVE
feature is masked out by default, but then erroneously written back
during VMX initialisation. This would cause memory corruption problems
during boot for XSAVE-capable systems.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22451:8420b82c22c2
xen-unstable date:        Tue Nov 30 11:34:08 2010 +0000

14 years agox86: tighten filter on ptwr_do_page_fault()
Keir Fraser [Mon, 29 Nov 2010 14:46:43 +0000 (14:46 +0000)]
x86: tighten filter on ptwr_do_page_fault()

Even not-so-recent Linux may, due to post-2.6.18 changes to the
process creation code, cause quite a number (depending on environment
and argument size) of faulting accesses to user space originating from
kernel mode. Generally those happen for non-present pages and would
lead to a nested page fault from guest_get_eff_l1e(). They can be
avoided by checking for PFEC_page_present as long as the guest isn't
running on shadow page tables.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22449:3afb5ecbf69f
xen-unstable date:        Mon Nov 29 14:40:55 2010 +0000

14 years agox86-64: don't crash Xen upon direct pv guest access to GDT/LDT mapping area
Keir Fraser [Mon, 29 Nov 2010 14:46:01 +0000 (14:46 +0000)]
x86-64: don't crash Xen upon direct pv guest access to GDT/LDT mapping area

handle_gdt_ldt_mapping_fault() is intended to deal with indirect
accesses (i.e. those caused by descriptor loads) to the GDT/LDT
mapping area only. While for 32-bit segment limits indeed prevent the
function being entered for direct accesses (i.e. a #GP fault will be
raised even before the address translation gets done, on 64-bit even
user mode accesses would lead to control reaching the BUG_ON() at the
beginning of that function.

Fortunately the fix is simple: Since the guest kernel runs in ring 3,
any guest direct access will have the "user mode" bit set, whereas
descriptor loads always do the translations to access the actual
descriptors as kernel mode ones.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Further, relax the BUG_ON() in handle_gdt_ldt_mapping_fault() to a
check-and-bail. This avoids any problems in future, if we don't
execute x86_64 guest kernels in ring 3 (e.g., because we use a
lightweight HVM container).

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22448:5cd9612db2bb
xen-unstable date:        Mon Nov 29 14:34:32 2010 +0000

14 years agox86 hvm: Fix VPMU issue on Nehalem cpus
Keir Fraser [Mon, 22 Nov 2010 19:18:10 +0000 (19:18 +0000)]
x86 hvm: Fix VPMU issue on Nehalem cpus

Fix an issue on Nehalem cpus where performance counter overflows may
lead to endless interrupt loops on this cpu.

Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
xen-unstable changeset:   22417:c0c1f5f0745e
xen-unstable date:        Mon Nov 22 19:16:34 2010 +0000

14 years agox86: Check for MWAIT in CPUID before using it in ACPI idle code.
Keir Fraser [Mon, 22 Nov 2010 19:14:09 +0000 (19:14 +0000)]
x86: Check for MWAIT in CPUID before using it in ACPI idle code.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22416:0cc4ed1ce1f3
xen-unstable date:        Mon Nov 22 19:13:00 2010 +0000

14 years agoamd iommu: Fix HV crash with 32bit pv_ops kernel
Keir Fraser [Tue, 16 Nov 2010 11:54:48 +0000 (11:54 +0000)]
amd iommu: Fix HV crash with 32bit pv_ops kernel

Signed-off-by: Wei Wang <wei.wang2@amd.com>
Tested-by: Conny Seidel <conny.seidel@amd.com>
xen-unstable changeset:   22389:9b2ca938cfe6
xen-unstable date:        Tue Nov 16 11:28:33 2010 +0000

14 years agox86: Automatically EOI guest-bound interrupts if guest takes too long.
Keir Fraser [Tue, 16 Nov 2010 11:53:33 +0000 (11:53 +0000)]
x86: Automatically EOI guest-bound interrupts if guest takes too long.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   22051:59ff5820534f
xen-unstable date:        Sun Aug 22 09:37:08 2010 +0100

14 years agohvmloader: fix off-by-one-bit error when initialising PCI devices
Keir Fraser [Wed, 10 Nov 2010 14:16:45 +0000 (14:16 +0000)]
hvmloader: fix off-by-one-bit error when initialising PCI devices

hvmloader is responsible for - amoungst other things - initialising
the PCI device BARs prior to loading the guest BIOS.  The previous
code only probed for devfn up to 128.  The lower 3 bits are function
IDs so this meant that only devices in slots 0-15 were actually being
initialized.

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
Acked-by: Gianni Tedesco <gianni.tedesco@citrix.com>
xen-unstable changeset:   22383:cba667fb80cf
xen-unstable date:        Wed Nov 10 13:58:16 2010 +0000

hvmloader: Fix 22383:cba667fb80cf iterating over defns 0..255

We need to declare devfn as wider than 8 bits for a loop 0<devfn<256
to terminate.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22384:c19e3371f31b
xen-unstable date:        Wed Nov 10 14:15:23 2010 +0000

14 years agox86 hvm: Fix MTRR physaddr-width check.
Keir Fraser [Tue, 9 Nov 2010 20:42:20 +0000 (20:42 +0000)]
x86 hvm: Fix MTRR physaddr-width check.

Should be checking against physaddr width presented to teh guest,
rather than the host physaddr width.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22374:9997a1418633
xen-unstable date:        Tue Nov 09 11:48:43 2010 +0000

14 years agotools: gdbsx: Check return of write()
Keir Fraser [Mon, 8 Nov 2010 15:39:37 +0000 (15:39 +0000)]
tools: gdbsx: Check return of write()

Not checking leads to warn_unused_result checks triggering in some
libraries and compilers.  Combined with -Werror this breaks the build.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   22349:3f98881703aa
xen-unstable date:        Wed Nov 03 11:58:25 2010 +0000

14 years agoFix "Error: Device 51952 not connected" error when using pygrub
Keir Fraser [Mon, 8 Nov 2010 15:36:58 +0000 (15:36 +0000)]
Fix "Error: Device 51952 not connected" error when using pygrub

The following is the process of booting a DomU with 'mounted-blktap2'
(VHD
for example) and 'pygrub' as bootloader:

1. Connect boot-device to Dom0 as '/dev/xpvd'
2. Pygrub get info for load DomU
3. Disconnect boot-device from Dom0
4. Boot DomU

During step 3 the created device is disconnected from Dom0, but
xenstore does not scrape away after the device is disconnected so you
get the following error:

    "Error: Device /dev/xvdp (51952, tap2) is already connected."

During step 3 xend calls destroyDevice always with 'tap' as argument.

Signed-off-by: eXeC001er <execooler@gmail.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen-unstable changeset:   21999:cd5b4135fe03
xen-unstable date:        Mon Aug 16 17:11:30 2010 +0100

14 years agotools/xenpaging: Add _XOPEN_SOURCE to fix build problems with recent gcc
Keir Fraser [Mon, 8 Nov 2010 15:35:30 +0000 (15:35 +0000)]
tools/xenpaging: Add _XOPEN_SOURCE to fix build problems with recent gcc

This patch fixes compilation issues with
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21).

Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   22023:af6799abc6e9
xen-unstable date:        Wed Aug 18 16:48:25 2010 +0100

14 years agoVT-d: fix device assignment failure (regression from Xen c/s 19805:2f1fa2215e60)
Keir Fraser [Wed, 3 Nov 2010 08:28:36 +0000 (08:28 +0000)]
VT-d: fix device assignment failure (regression from Xen c/s 19805:2f1fa2215e60)

If the device at <secbus>:00.0 is the device the mapping operation was
initiated for, trying to map it a second time will fail, and hence
this second mapping attempt must be prevented (as was done prior to
said c/s).

While at it, simplify the code a little, too.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Weidong Han <weidong.han@intel.com>
xen-unstable changeset:   22348:2dfba250c50b
xen-unstable date:        Wed Nov 03 08:18:51 2010 +0000

14 years agox86_emulate: Fix build with some versions of gcc targeting i386.
Keir Fraser [Sun, 31 Oct 2010 19:02:13 +0000 (19:02 +0000)]
x86_emulate: Fix build with some versions of gcc targeting i386.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22341:b6c553f62ede
xen-unstable date:        Sun Oct 31 19:01:33 2010 +0000

14 years agoVT-d: only scan secondary functions on multi-function devices
Keir Fraser [Fri, 29 Oct 2010 17:46:25 +0000 (18:46 +0100)]
VT-d: only scan secondary functions on multi-function devices

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22337:7afd8dd1d6cb
xen-unstable date:        Fri Oct 29 18:06:17 2010 +0100

14 years agoXen: fix various checks of unsigned integers < 0
Keir Fraser [Fri, 29 Oct 2010 17:44:54 +0000 (18:44 +0100)]
Xen: fix various checks of unsigned integers < 0

Some of these could be benignly discarded by the compiler but some are
actual bugs.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   22336:49803ac994f4
xen-unstable date:        Fri Oct 29 18:05:50 2010 +0100

14 years agopygrub: support grub2 "(hdX,msdosY)" partition syntax
Keir Fraser [Fri, 29 Oct 2010 09:44:23 +0000 (10:44 +0100)]
pygrub: support grub2 "(hdX,msdosY)" partition syntax

This appeared in Debian Squeeze at some point.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen-unstable changeset:   22238:6eaab8297681
xen-unstable date:        Wed Oct 13 11:45:26 2010 +0100

14 years agoia64: fix build in tmem code
Keir Fraser [Sun, 24 Oct 2010 12:30:17 +0000 (13:30 +0100)]
ia64: fix build in tmem code

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22283:3cc432c22073
xen-unstable date:        Sun Oct 24 13:17:42 2010 +0100

14 years agox86: delete not really used ioapic_renumber_irq variable
Keir Fraser [Sun, 24 Oct 2010 12:27:45 +0000 (13:27 +0100)]
x86: delete not really used ioapic_renumber_irq variable

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22281:2f87a77dc7b9
xen-unstable date:        Sun Oct 24 13:15:48 2010 +0100

14 years agox86/kexec: fix very old regression and make compatible with modern Linux
Keir Fraser [Sun, 24 Oct 2010 12:26:45 +0000 (13:26 +0100)]
x86/kexec: fix very old regression and make compatible with modern Linux

c/s 13829 lost the (32-bit only) cpu_has_pae argument passed to the
primary kernel's stub (in the 32-bit Xen case only), and Linux
2.6.27/.30 (32-/64-bit) introduced a new argument (for KEXEC_JUMP)
which for now simply gets passed a hardcoded value.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22280:d6e3cd10a9a6
xen-unstable date:        Sun Oct 24 13:15:06 2010 +0100

14 years agoAllow max_pages to be set to less than tot_pages
Keir Fraser [Sun, 24 Oct 2010 12:26:17 +0000 (13:26 +0100)]
Allow max_pages to be set to less than tot_pages

The memory allocation code sometimes needs to enforce that a guest
that's been told to balloon down isn't going to expand further
(because it's still executing a previous balloon-up operation).  That
means being able to set the desired max_pages even before the balloon
driver has brought tot_pages down to the right level.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   22279:2208a036f8d9
xen-unstable date:        Sun Oct 24 13:13:04 2010 +0100

14 years agoMiniOS: Fix continue; in netfront receive loop
Keir Fraser [Wed, 20 Oct 2010 12:35:07 +0000 (13:35 +0100)]
MiniOS: Fix continue; in netfront receive loop

To properly ignore some requests through the use of continue;, indexes
need to
be updated.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen-unstable changeset:   22236:6e8dd34122e7
xen-unstable date:        Tue Oct 12 10:27:56 2010 +0100

14 years agox86-64: workaround for BIOSes wrongly enabling LAHF_LM feature indicator
Keir Fraser [Wed, 20 Oct 2010 12:34:36 +0000 (13:34 +0100)]
x86-64: workaround for BIOSes wrongly enabling LAHF_LM feature indicator

This workaround is taken from Linux, and the main motivation (besides
such workarounds indeed belonging in the hypervisor rather than each
kernel) is to suppress the warnings in the Xen log each Linux guest
would cause due to the disallowed wrmsr.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22232:eb964c4b4f31
xen-unstable date:        Mon Oct 11 09:02:36 2010 +0100

14 years agotmem: Fix build for some versions of gcc.
Keir Fraser [Mon, 18 Oct 2010 10:27:23 +0000 (11:27 +0100)]
tmem: Fix build for some versions of gcc.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86_32: sh_clear_up_pointer is only used if CONFIG_PAGING_LEVELS >= 4
Keir Fraser [Mon, 4 Oct 2010 11:53:03 +0000 (12:53 +0100)]
x86_32: sh_clear_up_pointer is only used if CONFIG_PAGING_LEVELS >= 4

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
xen-unstable changeset:   22225:fe3018c6976d
xen-unstable date:        Mon Oct 04 12:52:14 2010 +0100

14 years agox86 shadow: reset up-pointers on all l3s when l3s stop being pinnable.
Keir Fraser [Sat, 2 Oct 2010 14:13:01 +0000 (15:13 +0100)]
x86 shadow: reset up-pointers on all l3s when l3s stop being pinnable.

Walking the pinned-shadows list isn't enough: there could be an
unpinned (but still shadowed) l3 somewhere and if we later try to
unshadow it it'll have an up-pointer of PAGE_LIST_NULL:PAGE_LIST_NULL.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   22224:a4016a257672
xen-unstable date:        Sat Oct 02 15:05:50 2010 +0100

14 years agoVt-d: fix dom0 graphics problem on Levnovo T410.
Keir Fraser [Sat, 2 Oct 2010 14:10:53 +0000 (15:10 +0100)]
Vt-d: fix dom0 graphics problem on Levnovo T410.

The patch is derived from a similar quirk in Linux kernel by David
Woodhouse and Adam Jackson.  It checks for VT enabling bit in IGD GGC
register.  If VT is not enabled correctly in the IGD, Xen does not
enable VT-d translation for IGD VT-d engine.  In case where iommu boot
parameter is set to force, Xen calls panic().

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
xen-unstable changeset:   22223:4beee5779122
xen-unstable date:        Sat Oct 02 15:04:21 2010 +0100

14 years agox86: fix boot failure (regression from pre-4.0 IRQ handling changes)
Keir Fraser [Sat, 2 Oct 2010 14:10:22 +0000 (15:10 +0100)]
x86: fix boot failure (regression from pre-4.0 IRQ handling changes)

With the change to index irq_desc[] by IRQ rather than by vector, the
prior implicit change of the used flow handler when altering the IRQ
routing path to go through the 8259A didn't work anymore, and hence
on boards needing the ExtINT delivery workaround failed to boot.

Make make_8259A_irq() a real function again, thus allowing the flow
handler to be changed there.

Also eliminate the generally superfluous and (at least theoretically)
dangerous hard coded setting of the flow handler for IRQ0: Earlier
code should have set this already based on information coming from
ACPI/MPS, and non-standard systems may e.g. have this IRQ level
triggered.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Tested-by: Markus Schuster <ml@markus.schuster.name>
xen-unstable changeset:   22222:aed9fd361340
xen-unstable date:        Sat Oct 02 15:03:15 2010 +0100

14 years agoVt-d: fix feature boot messages
Keir Fraser [Sat, 2 Oct 2010 14:10:01 +0000 (15:10 +0100)]
Vt-d: fix feature boot messages

Changed vt-d feature boot messages from "supported" to "enabled" since
they reflect what is currently enabled in this Xen boot - not what is
supported by VT-d hardware.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
xen-unstable changeset:   22221:3518149c4d5d
xen-unstable date:        Sat Oct 02 15:00:05 2010 +0100

14 years agox86: check CPUID level before enabling xsave
Keir Fraser [Fri, 24 Sep 2010 14:58:28 +0000 (15:58 +0100)]
x86: check CPUID level before enabling xsave

While not as relevant after c/s 21894, is still seems safer to check
the CPUID level here, just like Linux does. The is particularly
relevant for the 4.0 tree (which doesn't have said c/s), but also
possibly for nested environments where writing MSR_IA32_MISC_ENABLE
may not actually take effect (Xen itself ignores such writes).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22213:eb247ea9db8c
xen-unstable date:        Fri Sep 24 15:53:31 2010 +0100

14 years agoxsm: return unlabeled instead of failing with ENOENT in get_page_sid
Keir Fraser [Fri, 24 Sep 2010 14:57:35 +0000 (15:57 +0100)]
xsm: return unlabeled instead of failing with ENOENT in get_page_sid

It is better to return an unlabeled SID in the case where dsec is NULL
instead of bailing out with an error.

From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Keir Fraser <Keir.Fraser@eu.citrix.com>
xen-unstable changeset:   22207:20f139010445
xen-unstable date:        Wed Sep 22 18:26:01 2010 +0100

14 years agotmem: disallow bad gmfns from PV domains
Keir Fraser [Wed, 22 Sep 2010 07:55:09 +0000 (08:55 +0100)]
tmem: disallow bad gmfns from PV domains

Mfns for PV domains were not properly checked, potentially
allowing a buggy or malicious PV guest to crash Xen.  Also,
use get_page/put_page to claim a reference to the pages
so they can't disappear out from under tmem's feet.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
xen-unstable changeset:   22194:e8e3aeed3eba
xen-unstable date:        Wed Sep 22 08:54:08 2010 +0100

14 years agoRevert 22186:7167d6dd5c7c "x86: Retry do_mmu_update() a few times"
Keir Fraser [Wed, 22 Sep 2010 07:49:53 +0000 (08:49 +0100)]
Revert 22186:7167d6dd5c7c "x86: Retry do_mmu_update() a few times"

It does not work reliably for a couple of reasons:
(1) page_lock() fails if a page is !PGT_validated, and a page can
remain in that state for unbounded time.
(2) in the kernel-side race that motivated this patch, pgd_pin() can
lose to vmalloc_sync_all() -- pgd_pin() can try to chaneg a pmd page's
type to l2_pagetable while
vmalloc_sync_all()->set_pmd()->do_mmu_update() has it temporarily
pinned as writable. This is hard to fix on the Xen side.

Hence I give up on this approach, revert the patch, and settle for
kernel-side patching only.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   22193:35a1a14c408e
xen-unstable date:        Wed Sep 22 08:49:09 2010 +0100

14 years agox86: Retry do_mmu_update() a few times when called on a pte whose type is in flux.
Keir Fraser [Mon, 20 Sep 2010 19:20:57 +0000 (20:20 +0100)]
x86: Retry do_mmu_update() a few times when called on a pte whose type is in flux.

This can really happen -- all our PV Linux kernels have a race
between vmalloc_sync_all() and pgdir pinning/unpinning. The former is
protected by pgd_lock while the latter by mm->page_table_lock. Hence
they can happen concurrently, and vmalloc_sync_all() can attempt to
set_pmd() on a page directory which is in the process of being
pinned. This can confuse the hypervisor which may see a type change,
and hence fail do_mmu_update(). Until this patch. :-)

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   22186:7167d6dd5c7c
xen-unstable date:        Mon Sep 20 20:11:43 2010 +0100

14 years agox86/hvm: fix extra size passed to __trace_var()
Keir Fraser [Mon, 20 Sep 2010 19:20:28 +0000 (20:20 +0100)]
x86/hvm: fix extra size passed to __trace_var()

While removing the casts on the last arguments to __trace_var() I
noticed the bogus addition of 1 here.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22185:9cebb977e9d8
xen-unstable date:        Mon Sep 20 18:53:18 2010 +0100

14 years agoEliminate unnecessary casts from __trace_var() invocations
Keir Fraser [Mon, 20 Sep 2010 19:19:58 +0000 (20:19 +0100)]
Eliminate unnecessary casts from __trace_var() invocations

This is possible now that its last parameter's type is 'const void *'.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22184:62a44418d8a0
xen-unstable date:        Mon Sep 20 18:52:48 2010 +0100

14 years agoia64: fix gcc 4.5 warnings
Keir Fraser [Mon, 20 Sep 2010 19:19:01 +0000 (20:19 +0100)]
ia64: fix gcc 4.5 warnings

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22183:a1d2d8222d01
xen-unstable date:        Mon Sep 20 18:51:19 2010 +0100

14 years agosched_credit: Raise bar for inter-socket migrations on mostly-idle systems
Keir Fraser [Mon, 20 Sep 2010 19:18:25 +0000 (20:18 +0100)]
sched_credit: Raise bar for inter-socket migrations on mostly-idle systems

The credit scheduler ties to keep work balanced, even on a mostly idle
system.  Unfortunately, if you have one VM burning cpu and another VM
idle, the effect is that the busy VM will flip back and forth between
sockets.

This patch addresses this, by only migrating to a different socket if
the number of idle processors is twice that of the socket the vcpu is
currently on.

This will only affect mostly-idle systems; as the system becomes more
busy, other load-balancing code will come into effect.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
xen-unstable changeset:   22180:0bc640853cfd
xen-unstable date:        Mon Sep 20 18:49:15 2010 +0100

14 years agox86_32: [un]map_domain_page() is now IRQ safe.
Keir Fraser [Mon, 20 Sep 2010 19:16:41 +0000 (20:16 +0100)]
x86_32: [un]map_domain_page() is now IRQ safe.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   22177:7405e0ddb912
xen-unstable date:        Sat Sep 18 08:57:15 2010 +0100

14 years agox86: Fix indentation in irq.c.
Keir Fraser [Mon, 20 Sep 2010 19:16:22 +0000 (20:16 +0100)]
x86: Fix indentation in irq.c.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   22176:0da4bfd2bc23
xen-unstable date:        Sat Sep 18 08:34:15 2010 +0100

14 years agox86: irq_enter()/irq_exit() covers all of do_IRQ().
Keir Fraser [Mon, 20 Sep 2010 19:15:57 +0000 (20:15 +0100)]
x86: irq_enter()/irq_exit() covers all of do_IRQ().

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   22175:ee3c64073231
xen-unstable date:        Sat Sep 18 08:31:55 2010 +0100

14 years agohvm pmtimer: correct pmtimer accuracy
Keir Fraser [Fri, 17 Sep 2010 16:06:57 +0000 (17:06 +0100)]
hvm pmtimer: correct pmtimer accuracy

Several seconds of backward time drift per minute can be seen on a
RHEL6 HVM guest by switching the clocksource to 'acpi_pm' and then
running gettimeofday() in a loop. This is due to the accumulation
of small inaccuracies that are caused by shifting out the lower 32
bits when pmt_update_time() computes 'tmr_val'.

The patch makes sure that the lower 32 bits of the computed value
are not lost. They are saved in a new field 'not_accounted' in the
PMTState structure and are accounted the next time pmt_update_time()
is called.

From: Ulrich Obergfell <uobergfe@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   22174:632c02167f97
xen-unstable date:        Fri Sep 17 16:59:21 2010 +0100

14 years agomem_event: Clean up and remove over-sized paused_vcpus[] array.
Keir Fraser [Wed, 15 Sep 2010 14:47:24 +0000 (15:47 +0100)]
mem_event: Clean up and remove over-sized paused_vcpus[] array.

This cuts the size of the domain structure by around 30kB! It is now a
little over a page in size.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   22162:cf70ef051a82
xen-unstable date:        Wed Sep 15 15:45:42 2010 +0100

14 years agoC6 state with EOI issue fix for some Intel processors
Keir Fraser [Wed, 15 Sep 2010 08:02:10 +0000 (09:02 +0100)]
C6 state with EOI issue fix for some Intel processors

There is an errata in some of Intel processors.

AAJ72. EOI Transaction May Not be Sent if Software Enters Core C6
During an Interrupt Service Routine

If core C6 is entered after the start of an interrupt service routine
but before a write to the APIC EOI register, the core may not send an
EOI transaction (if needed) and further interrupts from the same
priority level or lower may be blocked.

This patch fix this issue, by checking if ISR is pending before enter
deep Cx state. If so, it would use power->safe_state instead of deep
Cx state to prevent the above issue happen.

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   22160:1087f9a03ab6
xen-unstable date:        Wed Sep 15 09:00:35 2010 +0100

14 years agonotify_via_xen_event_channel() should check for dying domain.
Keir Fraser [Wed, 15 Sep 2010 07:22:44 +0000 (08:22 +0100)]
notify_via_xen_event_channel() should check for dying domain.

Else we can fail on either ASSERTion in that function.

From: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   22159:62edd2611cbb
xen-unstable date:        Wed Sep 15 08:18:53 2010 +0100

14 years agox86: restore handling of "reboot=no"
Keir Fraser [Wed, 15 Sep 2010 07:22:16 +0000 (08:22 +0100)]
x86: restore handling of "reboot=no"

Somewhere between 3.2 and 3.3 this got dropped (as I noticed on a
[rarely used] box that didn't crash on me since then).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22158:869a0fdf8686
xen-unstable date:        Wed Sep 15 07:48:27 2010 +0100

14 years agox86: fix debug key 'i' handling with no IO-APICs
Keir Fraser [Wed, 15 Sep 2010 07:21:42 +0000 (08:21 +0100)]
x86: fix debug key 'i' handling with no IO-APICs

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   22157:d4976434b8bb
xen-unstable date:        Wed Sep 15 07:47:54 2010 +0100

14 years agoFix fd leak in xenstore
Keir Fraser [Wed, 15 Sep 2010 07:19:58 +0000 (08:19 +0100)]
Fix fd leak in xenstore

Missing from commit 'libxl: Backported stuff from unstable'
Without this change, xs_daemon_open/xs_daemon_close will leak
file descriptors.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
14 years agoFix an IO-APIC error message
Keir Fraser [Mon, 13 Sep 2010 16:51:50 +0000 (17:51 +0100)]
Fix an IO-APIC error message

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   22149:9c1e3863c588
xen-unstable edate:        Mon Sep 13 17:44:19 2010 +0100

14 years agoFix serial interrupt's destination
Keir Fraser [Mon, 13 Sep 2010 16:51:28 +0000 (17:51 +0100)]
Fix serial interrupt's destination

Lowest Priority can't use with invalid cpu_mask, and the default value
of CPU_MASK_ALL may cover CPU which wasn't online.

From: "Yang, Sheng" <sheng.yang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   22148:a254d1236c1a
xen-unstable date:        Mon Sep 13 17:37:25 2010 +0100

14 years agoxsm: Avoid null dereference in flask get_page_sid
Keir Fraser [Mon, 13 Sep 2010 16:50:14 +0000 (17:50 +0100)]
xsm: Avoid null dereference in flask get_page_sid

From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
xen-unstable changeset:   22144:ec31bb01c424
xen-unstable date:        Mon Sep 13 17:27:22 2010 +0100

14 years agotmem (tools): move to new ABI version to handle long object-ids
Keir Fraser [Mon, 13 Sep 2010 16:21:06 +0000 (17:21 +0100)]
tmem (tools): move to new ABI version to handle long object-ids

After a great deal of discussion and review with linux
kernel developers, it appears there are "next-generation"
filesystems (such as btrfs, xfs, Lustre) that will not
be able to use tmem due to an ABI limitation... a field
that represents a unique file identifier is 64-bits in
the tmem ABI and may need to be as large as 192-bits.
So to support these guest filesystems, the tmem ABI must be
revised, from "v0" to "v1".

I *think* it is still the case that tmem is experimental
and is not used anywhere yet in production.

The tmem ABI is designed to support multiple revisions,
so the Xen tmem implementation could be updated to
handle both v0 and v1.  However this is a bit
messy and would require data structures for both v0
and v1 to appear in public Xen header files.

I am inclined to update the Xen tmem implementation
to only support v1 and gracefully fail v0.  This would
result in only a performance loss (as if tmem were
disabled) for newly launched tmem-v0-enabled guests,
but live-migration between old tmem-v0 Xen and new
tmem-v1 Xen machines would fail, and saved tmem-v0
guests will not be able to be restored on a tmem-v1
Xen machine.  I would plan to update both pre-4.0.2
and unstable (future 4.1) to only support v1.

I believe these restrictions are reasonable at this
point in the tmem lifecycle, though they may not
be reasonable in the near future; should the tmem
ABI need to be revised from v1 to v2, I understand
backwards compatibility will be required.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
xen-unstable changeset:   22137:fd2e5008c2e0
xen-unstable date:        Mon Sep 13 17:11:04 2010 +0100

14 years agotmem (hv): move to new ABI version to handle long object-ids
Keir Fraser [Mon, 13 Sep 2010 16:19:34 +0000 (17:19 +0100)]
tmem (hv): move to new ABI version to handle long object-ids

After a great deal of discussion and review with linux
kernel developers, it appears there are "next-generation"
filesystems (such as btrfs, xfs, Lustre) that will not
be able to use tmem due to an ABI limitation... a field
that represents a unique file identifier is 64-bits in
the tmem ABI and may need to be as large as 192-bits.
So to support these guest filesystems, the tmem ABI must be
revised, from "v0" to "v1".

I *think* it is still the case that tmem is experimental
and is not used anywhere yet in production.

The tmem ABI is designed to support multiple revisions,
so the Xen tmem implementation could be updated to
handle both v0 and v1.  However this is a bit
messy and would require data structures for both v0
and v1 to appear in public Xen header files.

I am inclined to update the Xen tmem implementation
to only support v1 and gracefully fail v0.  This would
result in only a performance loss (as if tmem were
disabled) for newly launched tmem-v0-enabled guests,
but live-migration between old tmem-v0 Xen and new
tmem-v1 Xen machines would fail, and saved tmem-v0
guests will not be able to be restored on a tmem-v1
Xen machine.  I would plan to update both pre-4.0.2
and unstable (future 4.1) to only support v1.

I believe these restrictions are reasonable at this
point in the tmem lifecycle, though they may not
be reasonable in the near future; should the tmem
ABI need to be revised from v1 to v2, I understand
backwards compatibility will be required.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
xen-unstable changeset:   22136:b7f0ea22880d
xen-unstable date:        Mon Sep 13 17:10:14 2010 +0100

14 years agopage_alloc: Hold heap_lock while adjusting page states to/from PGC_state_free.
Keir Fraser [Mon, 13 Sep 2010 16:19:06 +0000 (17:19 +0100)]
page_alloc: Hold heap_lock while adjusting page states to/from PGC_state_free.

This avoids races with buddy-merging logic in free_heap_pages().

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   22135:69e8bb164683
xen-unstable date:        Mon Sep 13 17:08:31 2010 +0100

14 years agotools/debugger/gdbsx: use MTF flag for HVM guests for single step
Keir Fraser [Mon, 13 Sep 2010 16:18:07 +0000 (17:18 +0100)]
tools/debugger/gdbsx: use MTF flag for HVM guests for single step

The attached patch first tries the MTF flag for HVM guest
single step, reverting to manually setting the TF flag  if MTF fails.

Tested on 4.0.1. Compile tested on unstable.

Signed-off-by: mukesh.rathor@oracle.com
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   22115:cd87550cea5e
xen-unstable date:        Tue Sep 07 19:17:16 2010 +0100

14 years agox86 intel: Disable XSAVE support.
Keir Fraser [Wed, 1 Sep 2010 09:22:05 +0000 (10:22 +0100)]
x86 intel: Disable XSAVE support.

It breaks HVM save/restore.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   ae0cd4e5cc01
xen-unstable date:        Wed Sep 01 10:19:14 2010 +0100

14 years agox86_64: Ensure frame-table compression leaves MAX_ORDER aligned
Keir Fraser [Wed, 1 Sep 2010 09:21:41 +0000 (10:21 +0100)]
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>
xen-unstable changeset:   972d90ff3134
xen-unstable date:        Wed Sep 01 10:17:49 2010 +0100

14 years agoept: Put locks around ept_get_entry
Keir Fraser [Mon, 30 Aug 2010 07:59:46 +0000 (08:59 +0100)]
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>
xen-unstable changeset:   22071:c5aed2e049bc
xen-unstable date:        Mon Aug 30 08:39:52 2010 +0100

14 years agoVT-d: Hardware require RH bit to be set in IRTE when delivery mode is LPR
Keir Fraser [Mon, 30 Aug 2010 07:57:08 +0000 (08:57 +0100)]
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>
xen-unstable changeset:   3c4c3d48a835
xen-unstable date:        Thu Aug 26 11:16:56 2010 +0100

14 years agoFix bind_irq_vector() destination
Keir Fraser [Mon, 30 Aug 2010 07:56:37 +0000 (08:56 +0100)]
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>
xen-unstable: changeset:   3eb5127e4636
xen-unstable: date:        Thu Aug 26 11:16:14 2010 +0100

14 years agoFix typo in audit_p2m(), SHARED_P2M_ENTRY does not exist.
Keir Fraser [Mon, 30 Aug 2010 07:56:07 +0000 (08:56 +0100)]
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>
xen-unstable changeset:   a67b98978f5b
xen-unstable date:        Tue Aug 24 16:15:56 2010 +0100

14 years agobuildconfigs: update enable-xen-config
Keir Fraser [Mon, 30 Aug 2010 07:55:34 +0000 (08:55 +0100)]
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>
xen-unstable changeset:   143eb656084b
xen-unstable date:        Tue Aug 24 16:14:14 2010 +0100

14 years agotimers: Improve debug-key printing.
Keir Fraser [Mon, 30 Aug 2010 07:52:33 +0000 (08:52 +0100)]
timers: Improve debug-key printing.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   d20cbccb6fea
xen-unstable date:        Wed Aug 18 14:22:48 2010 +0100

timers: Fix printk format specifier

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   60746a2c14a6
xen-unstable date:        Thu Aug 19 16:24:13 2010 +0100

14 years agox2APIC: Improve x2APIC suspend/resume
Keir Fraser [Mon, 30 Aug 2010 07:50:52 +0000 (08:50 +0100)]
x2APIC: Improve x2APIC suspend/resume

x2apic depends on interrupt remapping, so it should disable interrupt
remapping behind x2apic disabling. And also this patch wraps
__enable_x2apic to get rid of duplicated code.

Signed-off-by: Weidong Han <weidong.han@intel.com>
xen-unstable changeset:   3cee41690fa2
xen-unstable date:        Fri Aug 13 14:58:06 2010 +0100

14 years agoUpdate Xen version to 4.0.2-rc1-pre
Keir Fraser [Mon, 30 Aug 2010 07:47:20 +0000 (08:47 +0100)]
Update Xen version to 4.0.2-rc1-pre

14 years agoAdded signature for changeset b536ebfba183
Keir Fraser [Wed, 25 Aug 2010 08:23:31 +0000 (09:23 +0100)]
Added signature for changeset b536ebfba183

14 years agoAdded tag RELEASE-4.0.1 for changeset b536ebfba183
Keir Fraser [Wed, 25 Aug 2010 08:22:52 +0000 (09:22 +0100)]
Added tag RELEASE-4.0.1 for changeset b536ebfba183

14 years agoUpdate Xen version to 4.0.1 RELEASE-4.0.1
Keir Fraser [Wed, 25 Aug 2010 08:22:42 +0000 (09:22 +0100)]
Update Xen version to 4.0.1

14 years agoio: make shared ring pad field less enticing for users by adding a __ prefix
Keir Fraser [Tue, 17 Aug 2010 18:27:20 +0000 (19:27 +0100)]
io: make shared ring pad field less enticing for users by adding a __ prefix

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Daniel Stodden <daniel.stodden@citrix.com>
Cc: Dongxiao Xu <dongxiao.xu@intel.com>
xen-unstable changeset:   a8c5e5e12ec1
xen-unstable date:        Fri Jul 02 18:58:28 2010 +0100

14 years agoblktap2: make protocol specific usage of shared sring explicit
Keir Fraser [Sun, 15 Aug 2010 20:48:06 +0000 (21:48 +0100)]
blktap2: make protocol specific usage of shared sring explicit

I don't think protocol specific data really belongs in this header
but since it is already there and we seem to be stuck with it let's at
least make the users explicit lest people get caught out by future new
fields moving the pad field around.

This is the Xen portion of this change. The kernel portion will be
sent separately. There is no dependency between the two.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Daniel Stodden <daniel.stodden@citrix.com>
Cc: Dongxiao Xu <dongxiao.xu@intel.com>
xen-unstable changeset:   feee0abed6aa
xen-unstable date:        Fri Jul 02 18:58:02 2010 +0100

14 years agoFix IOAPIC S3 with interrupt remapping enabled
Keir Fraser [Fri, 13 Aug 2010 14:06:24 +0000 (15:06 +0100)]
Fix IOAPIC S3 with interrupt remapping enabled

In ioapic_suspend, it reads and saves ioapic RTEs. But when interrupt
remapping is enabled, io_apic_read will call io_apic_read_remap_rte to
convert remapped format interrupt to compatible format, this results
in 'dest' field may be changed in remap_entry_to_ioapic_rte. When in
ioapic_resume, it will write the saved RTEs with incorrect 'dest' to
interrupt remapping table.

Actually it needn't to convert RTEs regardless interrupt remapping is
enabled or not. It just needs to save and restore RTE values
directly. This patch just uses __io_apic_read and __io_apic_write,
which won't call Interrupt remapping functions to convert, to save and
restore RTEs in ioapic_suspend and ioapic_resume. Thus fix this issue.

Signed-off-by: Weidong Han <weidong.han@intel.com>
xen-unstable changeset:   01d185dab39e
xen-unstable date:        Fri Aug 13 14:57:35 2010 +0100

14 years agoAdded signature for changeset c467b2e6fabd
Keir Fraser [Fri, 13 Aug 2010 08:25:46 +0000 (09:25 +0100)]
Added signature for changeset c467b2e6fabd

14 years agoAdded tag 4.0.1-rc6 for changeset c467b2e6fabd
Keir Fraser [Fri, 13 Aug 2010 08:18:08 +0000 (09:18 +0100)]
Added tag 4.0.1-rc6 for changeset c467b2e6fabd

14 years agoUpdate Xen version to 4.0.1-rc6 4.0.1-rc6
Keir Fraser [Fri, 13 Aug 2010 08:18:02 +0000 (09:18 +0100)]
Update Xen version to 4.0.1-rc6

14 years ago[Xen-devel] [PATCH] PoD: Fix domain build populate-on-demand cache
Keir Fraser [Fri, 13 Aug 2010 08:05:07 +0000 (09:05 +0100)]
[Xen-devel] [PATCH] PoD: Fix domain build populate-on-demand cache
allocation Rather than trying to count the number of PoD entries we're
putting in, we simply pass the target # of pages - the vga hole, and
let the hypervisor do the calculation.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen-unstable changeset:   6f059a340cdf
xen-unstable date:        Wed Aug 11 15:56:21 2010 +0100

14 years agolinux buildconfig: Fix quoting error
Keir Fraser [Fri, 13 Aug 2010 08:01:19 +0000 (09:01 +0100)]
linux buildconfig: Fix quoting error

Prevent shell syntax error if $(XEN_LINUX_CONFIG) is empty.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
xen-unstable changeset:   1f8a2d024379
xen-unstable date:        Fri Aug 13 08:46:45 2010 +0100

14 years agoxl: Fix xl vcpu-list output on machines with more than 16 cores
Keir Fraser [Fri, 13 Aug 2010 08:00:48 +0000 (09:00 +0100)]
xl: Fix xl vcpu-list output on machines with more than 16 cores
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen-unstable changeset:   cb71d0d30f0c
xen-unstable date:        Tue Aug 10 15:35:13 2010 +0100

14 years agoClean up event-channel debug-key output, and use spin_lock().
Keir Fraser [Fri, 13 Aug 2010 08:00:18 +0000 (09:00 +0100)]
Clean up event-channel debug-key output, and use spin_lock().

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   7d02b1046d14
xen-unstable date:        Fri Aug 13 08:39:11 2010 +0100

14 years agox86: Allow dom0 pstate control to access APERF/MPERF/HWCR MSRs
Keir Fraser [Fri, 13 Aug 2010 07:59:52 +0000 (08:59 +0100)]
x86: Allow dom0 pstate control to access APERF/MPERF/HWCR MSRs

The current version of the powernow driver uses the APERF/MPEF
and the HWCR MSRs.  Add cases in traps.c to let dom0 access
those MSRs.

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
xen-unstable changeset:   6471b8b71401
xen-unstable date:        Fri Aug 13 08:38:35 2010 +0100

14 years agosvm: increment RIP over PAUSE instruction when emulating it
Keir Fraser [Fri, 13 Aug 2010 07:53:26 +0000 (08:53 +0100)]
svm: increment RIP over PAUSE instruction when emulating it

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
xen-unstable changeset:   31d200e5b922
xen-unstable date:        Fri Aug 13 08:31:49 2010 +0100

14 years agomsi: Avoid uninitialized msi descriptors
Keir Fraser [Fri, 13 Aug 2010 07:52:56 +0000 (08:52 +0100)]
msi: Avoid uninitialized msi descriptors

When __pci_enable_msix() returns early, output parameter (struct
msi_desc **desc) will not be initialized.  On my machine, a Broadcom
BCM5709 nic has both MSI and MSIX capability blocks and when guest
tries to enable msix interrupts but __pci_enable_msix() returns early
for encountering a msi block, the whole system will crash for fatal
page fault immediately.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
xen-unstable changeset:   786b163da49b
xen-unstable date:        Wed Aug 11 17:01:02 2010 +0100

14 years agoxc: fix segfault in pv domain create if kernel is an invalid image
Keir Fraser [Fri, 13 Aug 2010 07:52:08 +0000 (08:52 +0100)]
xc: fix segfault in pv domain create if kernel is an invalid image

If libelf calls elf_err() or elf_msg() before elf_set_log() has been
called then it could potentially read an uninitialised log handling
callback function pointer from struct elf_binary. Fix this in libxc by
zeroing the structure before calling elf_init().

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen-unstable changeset:   1d67dd785ef4
xen-unstable date:        Mon Aug 09 17:43:18 2010 +0100

14 years agoUpdate default pv_ops kernel to 2.6.32.x
Keir Fraser [Fri, 13 Aug 2010 07:48:28 +0000 (08:48 +0100)]
Update default pv_ops kernel to 2.6.32.x

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
14 years agoUpdate git pull machinery
Keir Fraser [Fri, 13 Aug 2010 07:48:08 +0000 (08:48 +0100)]
Update git pull machinery

This is needed to pull a non-default branch, and to allow the test
infrastructure's bisection machinery to work.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
14 years agox86: Detect and handle unexpected platform-timer counter wrap.
Keir Fraser [Wed, 11 Aug 2010 15:44:03 +0000 (16:44 +0100)]
x86: Detect and handle unexpected platform-timer counter wrap.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   21346:7d4deb86b966
xen-unstable date:        Tue May 11 11:21:27 2010 +0100

14 years agoDefine ABS() library function. Use it.
Keir Fraser [Wed, 11 Aug 2010 15:43:44 +0000 (16:43 +0100)]
Define ABS() library function. Use it.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   21345:2077d6ad6078
xen-unstable date:        Tue May 11 11:19:23 2010 +0100

14 years agox86: Correctly cook command lines for GRUB2.
Keir Fraser [Tue, 10 Aug 2010 14:49:20 +0000 (15:49 +0100)]
x86: Correctly cook command lines for GRUB2.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   21883:4207549948a4
xen-unstable date:        Wed Jul 28 08:32:01 2010 +0100

14 years agovt-d: Fix ioapic_rte_to_remap_entry error path.
Keir Fraser [Mon, 9 Aug 2010 15:51:30 +0000 (16:51 +0100)]
vt-d: Fix ioapic_rte_to_remap_entry error path.

When ioapic_rte_to_remap_entry fails, currently it just writes value
to ioapic. But the 'mask' bit may be changed if it writes to the upper
half of RTE. This patch ensures to recover the original value of
'mask' bit in this case.

Signed-off-by: Weidong Han <weidong.han@intel.com>
xen-unstable changeset:   21934:befd1814c0a2
xen-unstable date:        Mon Aug 09 16:33:45 2010 +0100

14 years agovt-d: Fix ioapic write order in io_apic_write_remap_rte
Keir Fraser [Mon, 9 Aug 2010 15:51:03 +0000 (16:51 +0100)]
vt-d: Fix ioapic write order in io_apic_write_remap_rte

At the end of io_apic_write_remap_rte, it writes new entry (remapped
interrupt) to ioapic. But it writes low 32 bits before high 32 bits,
it unmasks interrupt before writing high 32 bits if 'mask' bit in low
32 bits is cleared. Thus it may result in issues. This patch fixes
this issue by writing high 32 bits before low 32 bits.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
xen-unstable changeset:   21933:add40eb47868
xen-unstable date:        Mon Aug 09 16:32:45 2010 +0100

14 years agox86: Fix NMI injection to PV guests
Keir Fraser [Mon, 9 Aug 2010 15:50:37 +0000 (16:50 +0100)]
x86: Fix NMI injection to PV guests

Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
xen-unstable changeset:   21926:6f07d9ac1e7c
xen-unstable date:        Thu Aug 05 14:41:14 2010 +0100

14 years agogdbsx: Install into correct directory $(SBINDIR)
Keir Fraser [Mon, 2 Aug 2010 16:19:06 +0000 (17:19 +0100)]
gdbsx: Install into correct directory $(SBINDIR)

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
xen-unstable changeset:   21903:668f71224241
xen-unstable date:        Mon Aug 02 16:58:50 2010 +0100

14 years agokexec: Clean up shutdown logic. Reinstate ACPI DMAR during kexec.
Keir Fraser [Mon, 2 Aug 2010 16:18:37 +0000 (17:18 +0100)]
kexec: Clean up shutdown logic. Reinstate ACPI DMAR during kexec.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   21886:578ed14c3c67
xen-unstable date:        Thu Jul 29 10:31:21 2010 +0100