Commit Graph
9159 Commits
Author SHA1 Message Date
cl349@firebug.cl.cam.ac.uk 15c0d5d00a Cleanup i386 entry.S.
Many of the changes to entry.S can be removed because we don't support
CONFIG_PREEMPT anymore.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-07 15:48:36 +00:00
kaf24@firebug.cl.cam.ac.uk 5afef2d800 Tighten up the assertion conditions in the GUEST_MODE() macro.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-07 14:40:23 +01:00
kaf24@firebug.cl.cam.ac.uk 90e34b6775 SVM patch to add missing svm_asid() call into 64bit exits.S vmexit loop.
Signed-off-by: Tom Woller <thomas.woller@amd.com>
2006-03-06 23:50:30 +01:00
kaf24@firebug.cl.cam.ac.uk a5262c4630 Fix additional gdbstub issues.
- gdbstub.h uses atomic_t and PAGE_SIZE, so include those headers
- do not lie about setting breakpoints
- fix memory writing

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-03-06 23:49:48 +01:00
kaf24@firebug.cl.cam.ac.uk 6dab2f670d Add next/previous key bindings to XenMon curses mode.
Signed-off-by: Diwaker Gupta <dgupta@cs.ucsd.edu>
2006-03-06 23:47:53 +01:00
kaf24@firebug.cl.cam.ac.uk bcdecd7942 Fix reporting of time intervals in the log mode of XenMon.
Fix duration to sleep between iterations (earlier hardcoded to 1sec)
Signed-off-by: Diwaker Gupta <dgupta@cs.ucsd.edu>
2006-03-06 23:47:14 +01:00
kaf24@firebug.cl.cam.ac.uk 2c4f501f03 No need to re-set vm_pgoff before calling remap_pfn_range(). It will do
it itself in cases where it is necessary.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-06 20:29:39 +01:00
kaf24@firebug.cl.cam.ac.uk 0a19d4ac90 Make /proc/xen/xsd_kva with permissions 0600 so it can be opened
for write access (and mmap()ed with write permissions).

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-03-06 19:47:26 +01:00
kaf24@firebug.cl.cam.ac.uk 1d9f9d55bd Simplify ptrace_names array declaration.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-06 19:26:30 +01:00
cl349@firebug.cl.cam.ac.uk 343d7d9b01 Cleanup whitespace.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-06 17:15:10 +00:00
kaf24@firebug.cl.cam.ac.uk d3174e2e2e Fix build with some gcc versions.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-06 18:05:09 +01:00
kaf24@firebug.cl.cam.ac.uk 12456de899 Update microcode.c to linux-2.6.16-rc5 codebase.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-06 15:39:48 +01:00
kaf24@firebug.cl.cam.ac.uk df91533506 Allow NMI watchdog setup on newer P4 processors.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-06 15:30:12 +01:00
kaf24@firebug.cl.cam.ac.uk 9603c69e65 libxc: Verify Magic number when reading dump
The xen core files record a magic number, 
but when they are loaded it isn't checked.
This patch resolves this.

Signed-Off-By: Horms <horms@verge.net.au>
2006-03-06 15:04:18 +01:00
kaf24@firebug.cl.cam.ac.uk 67c8319788 Fix boot-memory layout description.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-06 15:02:26 +01:00
kaf24@firebug.cl.cam.ac.uk e265d47bd6 Consolidate xc_ptrace and xc_ptrace_core
* xc_ptrace
  - Merge xc_ptrace_core into xc_ptrace
  - ATTACH now reads the data argument. If non-zero then
    a corefile is being debuged. Otherwise a thread has
    been attached to. This allows xc_waitdomain_core() or
    xc_waitdomain() to be called as appropriate in
    subsequent xc_ptrace() calls.
* xc_waitdomain
  - Rename xc_waitdomain (xc_ptrace.c version) __xc_waitdomain
  - Rename xc_waitdomain (xc_ptrace_core.c version) xc_waitdomain_core
  - Create xc_waitdomain (in xc_ptrace.c), a wrapper for __xc_waitdomain
    and xc_waitdomain_core.
  Consolidation seemed difficult but ctxt needs to be
  passed into xc_waitdomain_core or made global.
  Alternatively, xc_waitdomain_core could be moved into xc_ptrace.c,
  but this seems messy.
* map_domain_va
  - Rename map_domain_va (xc_ptrace_core.c version) map_domain_va_core
  - Have it accept ctxt, like xc_waitdomain_core
* myptrace and myxcwait (linux-xen-low.c)
  Removed, call the now generic xc_ptrace() and xc_waitdomain() instead

When calling xc_ptrace ATTACH, if a corefile is in use, a fd will
be passed, otherwise a pid. The fd part is important, as this
is saved internally in xc_ptrace_core.c, and passed to xc_waitdomain_core()
as neccessary. Pereviously xc_waitdomain_core() received a pid and
thus could not open the corefile.

Signed-Off-By: Horms <horms@verge.net.au>
2006-03-06 12:06:55 +01:00
kaf24@firebug.cl.cam.ac.uk d531f7eb39 libxc: xc_ptrace cleanups
General Cleanups
* Use { after if consistently in xc_ptrace.c and xc_ptrace_core.c
  (But not in xc_ptrace_core() which should be removed shortly)
* Remove duplicate code and centralise around xc_ptrace.h
* Avoid ifing values covered by case in xc_ptrace()
  - PTRACE_GETREGS, PTRACE_GETFPREGS and PTRACE_GETFPXREGS are grouped into
    a single case, and then with the exception of a call to FETCH_REGS(),
    different code is executed based on ifing the values covered by the
    case.  The PTRACE_GETFPREGS and PTRACE_GETFPXREGS code is actually a
    duplicate.  This patch breaks the code out to two different cases.

Error Handling
* Eliminate FETCH_REGS macro as it forces several functions
  to have an otherwise uneeded error_out label, mittigating
  any code savins.
* Rework error handling in xc_ptrace().
  - Remove FETCH_REGS as above
  - Make sure that all dom0 errors are caught
  - Make sure errno is always set on error
* Eliminate gotos in xc_ptrace_core.c that do nothing but return

Signed-Off-By: Horms <horms@verge.net.au>
2006-03-06 12:05:44 +01:00
kaf24@firebug.cl.cam.ac.uk e827985a3c Fix DBG_LEVEL_VLAPIC_INTERRUPT definition.
It should be different from DBG_LEVEL_VLAPIC_TIMER.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-03-06 11:04:37 +01:00
kaf24@firebug.cl.cam.ac.uk 0d03c4fb66 Fix ia64 build.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-03-06 11:02:53 +01:00
kaf24@firebug.cl.cam.ac.uk 32f925190c Fix mkelf32 cross compilation support. The previous fix for
this was misapplied by me.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-06 11:01:43 +01:00
kaf24@firebug.cl.cam.ac.uk fff6b4192e Fix SVM guest destroy: I/O shared page is mapped globally so must unmap
with unmap_domain_page_global().

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-06 10:58:50 +01:00
emellor@leeni.uk.xensource.com 8ff99da748 Merged. 2006-03-04 19:16:36 +01:00
emellor@leeni.uk.xensource.com 8ee550dbe0 Allow callers to XendClient.xend_list_domains to specify the detail flag, and
turn detail off when doing vcpu-list.  This avoids calls to xenstore just to
get the list of domains for the vcpu-list call, significantly increasing
performance of that command on loaded systems.

Closes bug #545.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-04 19:15:36 +01:00
emellor@leeni.uk.xensource.com d34501c219 Log the tdb_error when a read fails with EIO. This is happening after a long
time under load -- hopefully this message will suggest why.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-04 19:12:37 +01:00
emellor@leeni.uk.xensource.com f8de6179af Added a 'state' field to the xenbus_device structure, which caches the state
at the local end of the xenbus connection (i.e. that value that is passed
through xenbus_switch_state).  This means that xenbus_probe can wait for all
the boot devices to become ready without having to hurt the store.

Also, fix this probing -- previously, the wrong value was being returned by 
all_devices_ready_, so this polling would only have waited for one device. 

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-04 19:10:56 +01:00
kaf24@firebug.cl.cam.ac.uk 1407199f89 Make guest_access implementation arch-specific.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-04 10:32:10 +01:00
kaf24@firebug.cl.cam.ac.uk 0a4522458b Fix some warnings when compiling tools.
Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-03-04 10:25:05 +01:00
kaf24@firebug.cl.cam.ac.uk ac75acdd60 Rename guest_handle() macro to GUEST_HANDLE() and define_guest_handle()
to DEFINE_GUEST_HANDLE(). All caps for datatype declarations and
definitions got the popular vote. :-)

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-03 19:21:48 +01:00
kaf24@firebug.cl.cam.ac.uk 262bd587ce /proc/xen/xsd_kva exports mmap interface that xenstored now uses to map the
domain0 xenbus page.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-03 19:07:55 +01:00
kaf24@firebug.cl.cam.ac.uk 74bb865dac Avoid floating point in hash table implementation.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-03 19:06:50 +01:00
kaf24@firebug.cl.cam.ac.uk d870b4b709 Move dom0_op hypercall to the guest_handle interface (inside Xen).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-03 18:26:41 +01:00
emellor@leeni.uk.xensource.com 39dbaabab7 Merged. 2006-03-03 15:56:34 +01:00
emellor@leeni.uk.xensource.com 6d879f9308 Wait for the devices configured at start-up, before allowing the boot to
proceed.  This avoids the race (bug #549) that would result in the infamous
VFS: Cannot open root device "sda1" or unknown-block(0,0) message even when
the hotplug layer had succeeded to configure the device.

Note that The Infamous Message has many possible root causes -- this change
only fixes one of them.  This particular root cause is characterised by
successful boots interleaved with unsuccessful ones, and diagnose.py showing
both front and backend drivers in the Connected state.

Closes bug #549.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-03 15:56:03 +01:00
emellor@leeni.uk.xensource.com ecabde4c14 Change the way that reboot-timeouts are handled. Rather than refreshing the
list of domains each time XendDomainInfo.refresh is called, and spawning
threads for each shutdown still in progress, we watch the control/shutdown
node and spawn just the one thread immediately.  When the daemon starts (say
after a crash) all domains are checked for entries in the store indicating a
reboot in progress.

This avoids a large cost on the store and in threads when the list of domains
is refreshed.  This happens every time the server is queried, so the cost can
be quite high.  It's especially a high cost when using xm shutdown -a -w --
this operation should perform a lot better now.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-03 15:41:56 +01:00
emellor@leeni.uk.xensource.com c84e1f2ac5 Added further integrity checking, this time checking for duplicate directory
entries and for orphaned nodes in the database.

Added two flags, -R and -L, to disable the recovery code and the remove of
/local at start-up.  This makes it much easier to analyse corrupted tdb files.

Added some missing talloc_free calls in the previous integrity checking code.

Removed the transaction handle from the trace_io message -- unfortunately,
the transaction is always null at this point, as it's not yet been looked up.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-03 15:37:28 +01:00
emellor@leeni.uk.xensource.com 988c0cb02e Cope when the filename returned by losetup for an existing loop device is not
fully qualified.  In this case, the readlink -f call to canonicalise that name
fails.

Closes bug #553.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-03 15:32:42 +01:00
kaf24@firebug.cl.cam.ac.uk 63c30e3123 Domain0 identifies IOAPIC by physical base address rather than BIOS-assigned identifier.
This seems a more reliable method since it seems that we always trust the base address
and we don't need to work around renumbering/rebasing as we do with APICIDs.

This is an alternative to the Yonah networking patch from Allen Kay at Intel.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-03 15:05:25 +01:00
kaf24@firebug.cl.cam.ac.uk 2f6b43b562 Clean up PIT-thru-ioapic setup. We don't need the legacy missed-tick
logic and so do not need to keep the PIT enabled thru the 8259 PIC.

Todo: arguable we should sync with x86/64 platform files, assuming they
do not throw out 'recent legacy' stuff (e.g., 32-bit only platforms
like P6). Getting rid of all the 82489DX and 486-era SMP stuff would be
great.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-03 14:10:35 +01:00
kaf24@firebug.cl.cam.ac.uk 0814867e26 Minor enhancements to gdbbuild, the build script for gdbserver-xen.
1. Use $MAKE if set
 2. Make mirror configurable from environment

From: Horms <horms@verge.net.au>

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-03 11:17:09 +01:00
kaf24@firebug.cl.cam.ac.uk 01d546796c It's not necessary to define a function for dumping virtual IOAPIC
table entry, that makes the code hard to comply with condition
compiling of HVM_DBG_LOG.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-03-03 10:58:42 +01:00
kaf24@firebug.cl.cam.ac.uk 596095de11 Add a description of the virtual TPM interface to the interface
document and explain some of the internals of the device driver.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-03-03 10:57:37 +01:00
kaf24@firebug.cl.cam.ac.uk 59d0a0335d This patch undoes 8697 and makes xm reboot/shutdown work again. This code
does expose a bug in xenstored when it is killed & restarted, but that
is not caused by this code.

My sincere appology to Ke Yu for the long wait and assuming his code
was broken.  His code was perfectly fine. Its just that my test scripts
did something for a historical reason that I should have removed a long
time ago.

Signed-Off-By: Leendert van Doorn <leendert@watson.ibm.com>
2006-03-03 10:56:54 +01:00
kaf24@firebug.cl.cam.ac.uk da53848714 Raises an explicit error message when the domain config file specifies
an incorrect path to a file-backed VBD (disk image) or the file-backed
VBD does not exist.

Without this patch, if someone mis-types the path to the disk image,
he/she would have no indication as to what's wrong when the domain
fails to get created.

Signed-off-by: Khoa Huynh <khoa@us.ibm.com>
2006-03-03 10:56:13 +01:00
kaf24@firebug.cl.cam.ac.uk 6d794f8a04 VTPM fixes:
- fixes a problem in the vTPM backend where the timer was killed when
the timer function was run
- removes a variable from being put in the ring by the frontend
- reformatting due to indent tool running over some of the files

Has been tested with the vtpm-relevant parts of xm-test.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-03-03 10:55:11 +01:00
kaf24@firebug.cl.cam.ac.uk 7cca11754f Fix up some issues I found when porting PPC to the new common gdb stub code:
- cosmetic changes in the messages printed
- 'flags' must always be unsigned long.
- explicitly calling initialize_gdb() is not difficult. For x86 and ia64 I 
placed this call immediately before do_initcalls(), since that's where it's 
being called from now so we know it's safe. Architecture people can move it 
earlier as appropriate.
- I don't understand all these ASSERT(!local_irq_is_enabled()) statements, 
sometimes bracketing a single call like receive_command(). How exactly would 
receive_command() manage to re-enable irqs? Also, a failing ASSERT would just 
call into the stub again anways...
- initialize_gdb() was overcomplicated. serial_parse_handle() already handles 
the parsing for us, and there's no need to panic there.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-03-03 10:53:58 +01:00
kaf24@firebug.cl.cam.ac.uk b8d1d84a4f VTPM_Tools: Fix error when closing only vtpm, and fix restore bug when
no dmis exist

The first bug prevented the TPM tests from running successfully more
than once in a row.

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
2006-03-03 10:46:06 +01:00
kaf24@firebug.cl.cam.ac.uk f7145c633e Ignore external (user-provided) CFLAGS when building vmxassist and hvmloader.
They do more harm than good.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-03 10:44:40 +01:00
kaf24@firebug.cl.cam.ac.uk 3e16170919 Add a 'clear trap table' path to set_trap_table hypercall, taken when
the input table is NULL.

Also, no need for set_trap_table to take the per-domain biglock.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-03 10:34:03 +01:00
emellor@leeni.uk.xensource.com 2700e32492 Cope if xenstore is down.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-02 21:45:13 +01:00
emellor@leeni.uk.xensource.com 186f0e02a1 Added hashtable implementation, to support the reachability check against the
store.  This code is by Christopher Clark.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-02 21:44:49 +01:00