Commit Graph
9175 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk db4d5fc53b Allow pciback to be built as a module.
From: Jan Beulich
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-08 18:41:12 +01:00
kaf24@firebug.cl.cam.ac.uk b1d3128dd8 Allow pciback to be placed into a permissive mode of operation whereby it allows
PCI config writes to succeed by default. Currently this is the only way to allow
control of a device that has device-specific registers in the config space from
a driver domain.

echo Y >/sys/module/pciback/parameters/permissive

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-08 17:32:36 +01:00
kaf24@firebug.cl.cam.ac.uk 5ed8e29dde Trivial fix for pcifront bringup.
From: Jan Beulich
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-08 15:51:28 +01:00
kaf24@firebug.cl.cam.ac.uk 9e2aaf8be8 Fix call to set_timer in vlapic.c. Should not set timer.expires
outside set_timer, since set_timer will do that for the caller.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-03-08 15:49:04 +01:00
kaf24@firebug.cl.cam.ac.uk 4507928009 Implement guest_access routines for copying to/from a sub-field of a structure.
Use this as part of a tidy-up of the multicall hypercall.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-08 15:39:59 +01:00
kaf24@firebug.cl.cam.ac.uk 99efc13eb8 Undo misapplied search replace.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-08 15:35:14 +01:00
kaf24@firebug.cl.cam.ac.uk 510fced78b Lower-casify some macros, and rename kernel_mode() to guest_kernel_mode().
Fix the macro so that it evaluates false if the given register context is
not a valid guest context.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-08 15:02:43 +01:00
kaf24@firebug.cl.cam.ac.uk 3d4188af3d Update Xen extraversion to reflect unstable status.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-08 11:54:48 +01:00
kaf24@firebug.cl.cam.ac.uk e638394771 The PAE guest can run on SMP 64-bit Xen0 now.
Optimize the save/restore action for EFER MSR during the context switch.

Signed-off-by: Jun Nakajima jun.nakajima@intel.com
Signed-off-by: Xiaohui Xin xiaohui.xin@intel.com
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
2006-03-08 11:53:39 +01:00
kaf24@firebug.cl.cam.ac.uk c2a1ed8d66 Keep totalram_pages in sync with current_pages in balloon driver.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-08 11:51:17 +01:00
kaf24@firebug.cl.cam.ac.uk 23abfb62a5 Add some bounds checking to values passed when changing the period and
slice of a domain using the sedf scheduler.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2006-03-08 11:48:34 +01:00
kaf24@firebug.cl.cam.ac.uk a5414d898b Ensure old Python files are overwritten during tools install.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2006-03-08 11:18:39 +01:00
kaf24@firebug.cl.cam.ac.uk b76d31960b Fix 64-bit Linux build.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-08 11:11:53 +01:00
kaf24@firebug.cl.cam.ac.uk 8ff6319e54 Fix up #PF error code before propagating to guest kernel.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-08 10:33:31 +01:00
kaf24@firebug.cl.cam.ac.uk 594630ebc4 Clean up vlapic code.
Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
2006-03-07 18:41:37 +01:00
kaf24@firebug.cl.cam.ac.uk 97bdaa5bdf Upgrade all hypercalls to use the new guest_handle interface (on the Xen side).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-07 18:40:42 +01:00
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