Commit Graph
8600 Commits
Author SHA1 Message Date
djm@kirby.fc.hp.com cff39e47eb Fix for !CONFIG_SMP compile
Signed-off-by: Dan Magenheimer <dan.magenheimer@hp.com>
2006-01-13 14:16:44 -06:00
djm@kirby.fc.hp.com 0070cb1f3a Merge 2006-01-13 14:12:24 -06:00
Ian.Campbell@xensource.com 0828aa84f7 Correctly handle dumping a VM86 guest's stack.
If the guest context is VM86 then we need to treat ss:sp as 16 bit
segment:offset rather than 32 bit selector:offset.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-01-13 16:56:09 +00:00
djm@kirby.fc.hp.com 542362015e Allow asm-offsets to work with vanilla binutils
Necessary because SHARED_ARCHINFO_ADDR is negative
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-01-13 10:38:44 -06:00
djm@kirby.fc.hp.com cafde138a1 correct implementation of flush_tlb_mask needed to reenable CONFIG_SMP
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-01-13 10:36:47 -06:00
djm@kirby.fc.hp.com 64d8a35871 Make xmexaple.vti support network option too and other small modifications for convenient use.
Signed-off-by Zhang xiantao <xiantao.zhang@intel.com>
2006-01-13 10:25:10 -06:00
djm@kirby.fc.hp.com a6be6177a3 Unused page struct fields commented out.
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-01-13 10:24:19 -06:00
djm@kirby.fc.hp.com 7f762c3f38 add prototype of guest_cpu_user_regs() which is used by ns16550_poll().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-01-13 10:23:01 -06:00
kaf24@firebug.cl.cam.ac.uk fc5423d8cd Introduce a locking protocol for acquiring the 'scheduler
lock' on a particular VCPU. Since this requires acquiring
the approrpiate per-CPU lock, we must re-check the VCPU's
current CPU binding after the lock is acquired.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-13 16:44:04 +01:00
kaf24@firebug.cl.cam.ac.uk c62fffdcdc Fix writable pagetables when a flush happens in a different
domain, which is temporarily made to run on the wrong
pagetables.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-13 16:27:45 +01:00
kaf24@firebug.cl.cam.ac.uk f9a0cd1238 Fix up the way we initialise and set the NMI heartbeat
timers. Also, compund updates to APIC ICR and ICR2 registers
must be done with interrupts disabled to ensure local
atomicity.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-13 16:09:45 +01:00
Ian.Campbell@xensource.com 82f5d7e034 Debug keyhandlers for triggering an NMI and examine current NMI state.
Add 'N' keyhandler to dump the current per CPU NMI counts and the
current NMI mask/pending status.

Add 'n' keyhandler to trigger an NMI by sending an IPI. For some
reason the destination shorthand for self is not valid when used with
the NMI delivery mode so we send the IPI to our own APIC ID
explicitly.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-01-13 14:59:40 +00:00
djm@kirby.fc.hp.com a3b63a0ab6 Enable warnings and fix a few one (those which occur in almost every file).
The next step is to fix warnings one by one.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
# User tristan.gingold@bull.net
2006-01-13 08:52:05 -06:00
kaf24@firebug.cl.cam.ac.uk 723bbd528f Fix xenbus_cleanup_devices() to cleanup proper subdirectories
of the deleted path, not merely paths mwith matching prefixes.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-13 15:22:36 +01:00
Ian.Campbell@xensource.com 8ffaf9c238 Ensure watchdog remains disabled unless enabled on the command line.
Bail out of setup_apic_nmi_watchdog() early if watchdog is not
enabled. Is the watchdog is disabled then increment
watchdog_disable_count to prevent it ever becoming enabled.

Unconditionally call setup_apic_nmi_watchdog() from setup_local_APIC()
so that the above is guaranteed to have occurred before the first call
of watchdog_enable().

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-01-13 14:09:39 +00:00
Ian.Campbell@xensource.com dd38458519 Fix x86/32 do_iret implementation, fixes VM86 mode.
Do not clobber a freshly restored esp when performing an iret.

Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-01-13 11:04:04 +00:00
kaf24@firebug.cl.cam.ac.uk 4c1b84163e Fix non-debug build.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-13 11:38:33 +01:00
kaf24@firebug.cl.cam.ac.uk cc00657854 Add a new timer operation kill_timer(). Effectively the
'opposite' of init_timer(), it marks the end of a timer's
lifetime. After this call the timer will not be pending,
its callback handler will not be running, and future calls
to set_timer() will silently fail.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-13 01:03:44 +01:00
kaf24@firebug.cl.cam.ac.uk c5c75c2926 Add missing renamed files. Oops.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-13 00:16:07 +01:00
kaf24@firebug.cl.cam.ac.uk 8a3652cb7e Rename ac_timer_* interfaces -> timer_*. The ac_ is
meaningless and unnecessary.

Rename rem_timer -> stop_timer.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-12 23:39:14 +01:00
kaf24@firebug.cl.cam.ac.uk 4207635014 Simplify vcpu_sleep_sync() and sched_adjdom(). Their
interaction with the scheduler locks was unnecessarily
complicated.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-12 23:25:02 +01:00
kaf24@firebug.cl.cam.ac.uk 9b7916cc5e Fix compile warning about uninitialised vars.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-12 21:48:51 +01:00
kaf24@firebug.cl.cam.ac.uk 9baabcabfe Update copyright on domain_page implementation. It's been
rewritten from scratch a couple of times now and it's safe
to assert that the original Linux heritage was deleted
long ago.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-12 16:10:12 +01:00
kaf24@firebug.cl.cam.ac.uk b1f0161822 More debug print cleanups.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-12 15:59:45 +01:00
kaf24@firebug.cl.cam.ac.uk 8a0da1c334 Quieten debug printing on memory_op hypercall. Don't warn
about disallowed multipage allocation attempts.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-12 15:44:44 +01:00
kaf24@firebug.cl.cam.ac.uk 6f7a043a6a Re-enable per-cpu cache on map_domain_page(). Fix the
offending caller that broke the vcpu cache (writable
pagetable code kept a mapping outstanding until flush,
which could occur on a different vcpu).

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-12 15:43:22 +01:00
kaf24@firebug.cl.cam.ac.uk 6889a045da fixes some compiler warnings due to new types used in
the xenbus.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-01-12 14:27:55 +01:00
kaf24@firebug.cl.cam.ac.uk 71e8ec899a Adds a check to vtpm_manager and vtpm Makefiles to verify openssl and
gmp dev files are installed. If files are missing, Makefile exits with a
message indicating that these tools will not be built, rather than an
error, which prevents Xen from building.

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
2006-01-12 14:27:20 +01:00
emellor@leeni.uk.xensource.com b85612442b Merged. 2006-01-12 13:20:04 +01:00
emellor@leeni.uk.xensource.com c6aed7c358 8604:a51fcb5de470 introduced a discrepancy between the declaration
and definition of xc_linux_save(). In particular the argument for
the suspend pointer to function was null in one and int in the other.
On inspection, int seemed to be correct, so I went with this.
I also fixed up a few other cosmetic discrepancies.

Signed-Off-By: Horms <horms@verge.net.au>
2006-01-12 13:13:34 +01:00
kaf24@firebug.cl.cam.ac.uk 8f2651280a Fix cpu_affinity memcpy() (bytes not longs!) add add a better
affinity map sanity check to avoid blowing up Xen if no
online cpu is included in the map.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-12 12:45:49 +01:00
Ian.Campbell@xensource.com 2c5ceaba04 Fix x86_64 domU build by conditionalizing NMI support on CONFIG_X86_LOCAL_APIC
The NMI handler is not built unless CONFIG_X86_LOCAL_APIC is defined, and 
CONFIG_X86_LOCAL_APIC requires a dom0 build.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-01-12 10:37:10 +00:00
kaf24@firebug.cl.cam.ac.uk 8a790edb70 More do_iret() fixes. We need to take care in restoring
EFLAGS that we do not pull in non-zero IOPL, then crash
the domain, and then bug out when dom0 gets vcpu context.
This could otherwise be triggered by a malicious guest.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-11 20:14:27 +01:00
kaf24@firebug.cl.cam.ac.uk 5ccd14f4cc map_domain_page per-vcpu cache still seems broken. Disable
while I fix it.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-11 20:03:53 +01:00
kaf24@firebug.cl.cam.ac.uk ab8eb5a3ef More code cleanups, mainly to do_iret() implementations.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-11 19:44:54 +01:00
kaf24@firebug.cl.cam.ac.uk a5f2116f79 merge 2006-01-11 19:26:03 +01:00
kaf24@firebug.cl.cam.ac.uk a7813c4bba Reassert nmi pending when a nmi handler is registered
if we lost a previous nmi.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-11 19:24:43 +01:00
Ian.Campbell@xensource.com 18f32f1ff6 merge 2006-01-11 18:23:34 +00:00
Ian.Campbell@xensource.com 82862b4cce merge 2006-01-11 18:22:24 +00:00
kaf24@firebug.cl.cam.ac.uk d02b79422b Add a per-vcpu lock-free cache of mappings to map_domain_page.
Improve mapping slot search by using a free bitmap.
Removed map_domain_pages (multi-page mapping functionality).
Noone uses it, nor should they use it in future,

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-11 19:18:21 +01:00
Ian.Campbell@xensource.com 046536e8ee Fixup some bogus formatting and remove a stray debug printk
Signed-off-by: Ian Campbell <Ian.Campbell@xensource.com>
2006-01-11 17:50:05 +00:00
Ian.Campbell@xensource.com 4e844e3d27 merge 2006-01-11 16:26:04 +00:00
emellor@leeni.uk.xensource.com a72cda2a94 Install in /usr/sbin, not /usr/local/sbin, for consistency with the rest of the
Xen distribution.  Closes bug #462.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-01-11 16:23:16 +00:00
Ian.Campbell@xensource.com 544a856af5 Pass NMIs to DOM0 via a dedicated callback, Xen/Linux x86_64 support.
Register our NMI handler with Xen. Do an iret via the hypervisor
whenever the return CS is > RING0.

Add include/asm-xen/asm-x86_64/nmi.h as a Xen modified copy of
include/asm-x86_64/nmi.h in order that we can implement
get_nmi_reason() in a manner suitable for Xen.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-01-11 15:53:59 +00:00
Ian.Campbell@xensource.com 716d68d4c2 Pass NMIs to DOM0 via a dedicated callback, Xen/Linux i386 support.
Register our NMI handler with Xen. Use a pseudo-flag in EFLAGS in
indicate that we should return from the NMI via a hypervisor iret.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-01-11 15:52:54 +00:00
Ian.Campbell@xensource.com dfafd0de0c Pass NMIs to DOM0 via a dedicated callback, Xen x86_64 support.
Handle NMI interrupts and dispatch to dom0 on x86_64.

Renames the switch_to_user hypercall to iret. Extend the semantics to
include returns to guest/kernel if CS indicates ring 1. Retain the old
semantics of returning to guest/user if CS indicates ring3.

Plumb in nmi_op hypercall to generic code.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-01-11 15:52:33 +00:00
Ian.Campbell@xensource.com f483c99420 Pass NMIs to DOM0 via a dedicated callback, Xen x86_32 support.
Handle NMI interrupts and dispatch to dom0 on x86_32.

Renames the switch_vm86 hypercall to iret and implements full iret
semantics instead only what is required by VM86 returns.

Plumb in nmi_op hypercall to generic code.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-01-11 15:52:12 +00:00
Ian.Campbell@xensource.com f071016a5c Pass NMIs to DOM0 via a dedicated callback, core Xen support.
This patch adds core and generic x86 support code to enable Xen to
pass NMI's to a dedicated NMI callback in DOM0 instead of raising a
VIRQ.

Introduces the nmi_op hypercall to allow DOM0 to (un)register the NMI
handler.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-01-11 15:51:56 +00:00
Ian.Campbell@xensource.com 1582d11750 Factor re-enabling the IOCK line out of io_check_error()
and into a machine specific function to.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-01-11 15:51:18 +00:00
vhanquez@kneesa.uk.xensource.com 6bc154ed1e make xs_test in xenstore compile.
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2006-01-11 12:02:54 +00:00