Commit Graph
7411 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk 0fd482ecd5 There are only six fields in vcpuinfo.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2005-10-18 10:53:30 +01:00
kaf24@firebug.cl.cam.ac.uk 7126177413 In the shadow mode, thanks to recent patches, the shadow
reference counts (both general counts and type counts)
are now correct in all of my testing so far.  As a result,
we should remove the shadow_tainted_refcnt flag from
the domain structure.  Leaving this flag in place would
create confusion for programmers and would also prevent
future debugging of problems in handling general and type
reference counts in the shadow mode.  In addition, the
patch also (1) drops the requirement that shadow_mode_disable()
should only be called in the domain destruction sequence
(even though it is only used that way so far), and
(2) strictly assert that the type reference count must
be 0 when we free a page from the dom heap.

Signed-off-by: Khoa Huynh <khoa@us.ibm.com>
2005-10-18 10:45:29 +01:00
cl349@firebug.cl.cam.ac.uk 006b46b2d0 Fix transaction EAGAIN handling in xenstore client programs.
Redirect all output to a buffer and only print the buffer once the
transaction succeeds, discarding output from previous attempts.
In particular, fixes failures when the (block) backend driver would
not configure because reads from the hotplug script did get double
output when a transaction had to be redone.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-10-18 02:08:26 +01:00
emellor@leeni.uk.xensource.com fe453929d3 Put back the arg_check calls removed recently -- they aren't as useless as I
thought they were.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 20:34:10 +01:00
emellor@leeni.uk.xensource.com 6f4faa61b2 More removal of BE_DOMAIN flags. 2005-10-17 16:33:27 +01:00
emellor@leeni.uk.xensource.com ce4bbfbf11 Merged. 2005-10-17 16:23:26 +01:00
emellor@leeni.uk.xensource.com 706fcdf4de Have xenstored initialise its connections, meaning that xend can be out of
that loop completely -- the xc_init_store, initDomainStore calls can all go.

Have xenstored understand where the local domain information goes.  Xend no
longer has to generate a path and pass it to xenstored through
xs_introduce_domain -- we just allow xenstored to generate the path, and then
call GetDomainPath later.  There is still some work required to tidy this up.

Change the uuid module to generate uuids as lists of bytes, not in the
stringified form.  Added a unit test for that module.

Change the semantics of Xend restart, relying on these changes to the
xenstored semantics and earlier changes to add an opaque handle to the
hypervisor's domain-specific data block.  The semantics are now clearer, as
Xend can validate whether the details in the store match the current live
domain.

Added a usage statement to xenstored.

Some of this code is by Steven Hand.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 16:22:05 +01:00
kaf24@firebug.cl.cam.ac.uk dc66fe31f3 Remove useless SIF_XXX_BE_DOMAIN driver flags.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 15:54:28 +01:00
kaf24@firebug.cl.cam.ac.uk 3afe806f6f Make the event-channel pending and mask arrays consist of
longs. Thi sensures appropriate alignment for architectures
that require it, and also allows us to naturally support up
to 4096 event channels per 64-bit guest.

Moved 'n_vcpu' field from shared_info to start_info. Really it
ought to disappear altogether as the info can be derived from
xenstore.

Fix a weird bug in XendDomainInfo where 'vcpus' information for
a domain defaults to floating point value 1.0 rather than integer
1. This looks like a Python bug to me, but in any case it is
'fixed' by explicitly converting the default value to an integer.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 15:15:17 +01:00
emellor@leeni.uk.xensource.com dcd2f1cf1f Merged. 2005-10-17 14:12:20 +01:00
emellor@leeni.uk.xensource.com 238ca03bd4 Replace xm vcpu-enable and xm vcpu-disable with one command, xm set-vcpus,
which sets the number of active CPUs.  Xend then toggles the VCPUs to ensure a
contiguous group of them are enabled.

Added a server command to get VCPU information, and use this info to fix
xm vcpu-list.  That xm command now has extra information, too.  CPU == -1 is no
longer used as an indicator for a VCPU that is disabled -- a separate state
field is available, and the CPU is set merely to '-'.  Individual CPU time is
now available. 

Deprecated xm list -v.  -v is conventionally used for --verbose, so using it
to list vcpus is confusing.  Furthermore, we already have an equivalent command
xm vcpu-list.

Tidied up the horrendous xm list / xm vcpu-list code.

Removed the vcpus field from the dict returned by xc_domain_getinfo, and the
vcpu_to_cpu map from the sxpr returned for xm list.

Move the dom0_enforce_vcpus code into XendDomain.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 14:07:47 +01:00
kaf24@firebug.cl.cam.ac.uk 689c39e019 Force RTC driver to fail to load in domU by preventing it
from binding to IRQ8.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 14:02:36 +01:00
emellor@leeni.uk.xensource.com 37964af428 Added a TRACE log level, for those versions of Python that do not have it, and
moved XendDomainInfo.update's debugging onto that level, as it has become
overly verbose.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 13:50:28 +01:00
kaf24@firebug.cl.cam.ac.uk 981d9b117d Plumb GETVCPUINFO dom0_op through to Python. Remove
n_vcpu field from GETDOMAININFO: replaced with
nr_online_vcpus and max_vcpu_id (both plumbed through to
Python).

TODO: Remove 'vcpus' entry in getdomaininfo Python
      dictionary.

TODO: Don't represent 'cpumap' as a bitmap in Python.
      It would be more sensible to represent as a list
      of integer CPU numbers.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 11:36:36 +01:00
kaf24@firebug.cl.cam.ac.uk ec82f54895 Clean up debug tracing in mm and mm audit code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-16 17:25:15 +01:00
kaf24@firebug.cl.cam.ac.uk e21acec89d Small cleanup in hotplug script.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-16 12:34:37 +01:00
kaf24@firebug.cl.cam.ac.uk 8ac022c344 Fix local_irq_save() and irqs_disabled() to be preemption-safe.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-16 11:45:51 +01:00
kaf24@firebug.cl.cam.ac.uk ed80a0a187 Flush writable pagetable state whenever a domain is
synchronously paused (by Xen or by domain0), or when
it shuts down.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-15 17:19:43 +01:00
kaf24@firebug.cl.cam.ac.uk 70a2469320 Fix invalidation of shadow LDT on SMP systems.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-15 16:26:03 +01:00
kaf24@firebug.cl.cam.ac.uk 918a5c1de8 Remove bogus error message in libxenctrl.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-15 16:25:29 +01:00
kaf24@firebug.cl.cam.ac.uk 1fbda75445 Detect failure to create shutdown process and retry twice
per second until it succeeds.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-15 16:25:05 +01:00
emellor@leeni.uk.xensource.com da1385d8e8 Use new -t flag on xenstore-rm to keep the store pruned when devices go away.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-15 12:56:07 +01:00
emellor@leeni.uk.xensource.com 86234f86b5 Fix installation decision to make the DISTDIR and DESTDIR absolute before
comparing them.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-15 12:55:03 +01:00
emellor@leeni.uk.xensource.com 9f7fae040f Added --tidy flag to xenstore-rm that recursively removes any empty directories
left by the primary removal.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-15 12:52:38 +01:00
kaf24@firebug.cl.cam.ac.uk a9634a6106 At least for the time being, GETVCPUCONTEXT needs to work
even for uninitialised VCPUs. xc_linux_build() depends on
it (rather stupidly).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-15 09:32:10 +01:00
kaf24@firebug.cl.cam.ac.uk 5519fdc24a Extend VCPUINFO dom0_op to return status information about
run state of the VCPU. VCPUCONTEXT returns info about
hotplugged VCPUs.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-15 08:52:22 +01:00
kaf24@firebug.cl.cam.ac.uk 0044805a73 Fix NAT for domU checksum offload.
Signed-off-by: Jon Mason <jdmason@us.ibm.com>
2005-10-15 08:33:19 +01:00
kaf24@firebug.cl.cam.ac.uk b606206a63 add BT instruction support to VMX MMIO decoder.
Also extends TEST and OR instructions support for 16/32 bit operations,
these are needed for windows.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Chengyuan Li <chengyuan.li@intel.com>
Signed-off-by: Nakajima Jun <nakajima.jun@intel.com>
2005-10-15 07:43:08 +01:00
iap10@freefall.cl.cam.ac.uk 6a5cdc1492 Enable hotplug cpus in -xen x86_32 kernel.
Suggested by Ryan Harper
Signed-off-by: ian@xensource.com
2005-10-15 00:20:35 +01:00
kaf24@firebug.cl.cam.ac.uk 37df894164 machine_specific_memory_setup() makes the following call to setup e820:
add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);

Since max_pfn is (rightly) an unsigned long, we overflow for the current
definition of PFN_PHYS. Attached is my preferred solution as it will
hopefully avoid similar situations that may come up in the future.

Signed-off-by: srparish@us.ibm.com
2005-10-14 22:15:21 +01:00
kaf24@firebug.cl.cam.ac.uk 192fc23b5a This should fix time stopped / going slow problems that
various users have been seeing.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-14 18:27:25 +01:00
kaf24@firebug.cl.cam.ac.uk 349d3745d3 In addition to setting opaque handle during domain
creation, allow it to be changed after creation via
DOM0_SETDOMAINHANDLE operation (and libxc
xc_domain_sethandle, and via Pyhton wrapper fn).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-14 16:01:11 +01:00
kaf24@firebug.cl.cam.ac.uk 30ce2a9295 Store an opaque handle (tools uuid) in the domain structure
within Xen. Refactor GETVCPUCONTEXT into an op of the same
name plus a new op GETVCPUINFO. Move the cpumap and cpu info
arrays from GETDOMAININFO and move into new GETVCPUINFO.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-14 15:40:48 +01:00
iap10@firebug.cl.cam.ac.uk 5dc12fe242 Remove unused x86_64 functions.
Signed-off-by: ian@xensource.com
2005-10-14 01:42:34 +01:00
emellor@leeni.uk.xensource.com 86d80f8f02 Patch for typo causing multiple output in xm list -l, courtesy of Laura Ramirez
<laura.ramirez@hp.com>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-13 23:16:03 +01:00
jrb44@plym.cl.cam.ac.uk 1109d74507 Fixed 64 bit Linux build.
Fixes from Ian Pratt. extern declaration of bind_ipi was out of sync with
the definition of the function.

Signed-off-by: James Bulpin <james@xensource.com>
2005-10-13 20:16:02 +01:00
kaf24@firebug.cl.cam.ac.uk 1843c48dd1 Because of a bug with reference counting against the target guest page
when searching the list for L1 shadow pages to write protect that page
(at shadow_promote(), which is called by alloc_shadow_page()), the code
was always scanning _all_ the entries in the hash list. The length of
the hash list can be >500 for L1 shadow pages, and for each page we
needed to check all the PTEs in the page.

The patch attached does the following things:
- Correct the reference count (for the target guest page) so that=20
  it can exit the loop when all the L1 shadow pages to modify are found.
  Even with this, we can search the entire list if the page is at=20
  the end.
- Try to avoid the search in the hash list, by having a
  back pointer (as a hint) to the shadow page pfn. For most cases,=20
  there is a single translation for the guest page in the shadow.
- Cleanups, remove the nested function fix_entry

With those, the kernel build performance, for example, was improved
approximately by 20%, 40% on 32-bit, 64-bit unmodified Linux guests,
respectively. Tested log-dirty mode for plain 32-bit as well.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Asit Mallick <asit.k.mallick@intel.com>
2005-10-13 17:58:01 +01:00
emellor@leeni.uk.xensource.com 62164352c8 Revert accidental commit.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-13 17:55:15 +01:00
emellor@leeni.uk.xensource.com 0617a2049d Merged. 2005-10-13 17:51:35 +01:00
emellor@leeni.uk.xensource.com 7e6a2a3288 Remove the diagnostic/recovery when two domains end up with the same name. It
was working around bugs that have gone, and is now more dangerous than useful
-- deadlock is a possibility with this code now.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-13 17:49:56 +01:00
kaf24@firebug.cl.cam.ac.uk 9394398ccf Cleanup CPU hotplug and save/restore. Next step is to
simplify SMP initial boot and then should be easy to merge
i386 and x86/64 smpboot.c.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-13 17:08:59 +01:00
emellor@leeni.uk.xensource.com 633d294bb5 Merge. 2005-10-13 15:26:44 +01:00
emellor@leeni.uk.xensource.com 043da08cae Fix broken test for zombies.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-13 15:25:42 +01:00
kaf24@firebug.cl.cam.ac.uk 8abc2d5b4e Fix multi-cpu save/restore after the max_vcpu patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-13 15:19:29 +01:00
kaf24@firebug.cl.cam.ac.uk b5d8fa2d87 Fix client dependency on libxenstore in Makefile.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-13 11:12:11 +01:00
kaf24@firebug.cl.cam.ac.uk 349f04a5df NS_PER_TICK must be a s64 quantity. It is compared with
possibly -ve values which we do not want to 'promote' to
big +ve values.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-13 08:38:49 +01:00
kaf24@firebug.cl.cam.ac.uk ac9725dff6 Currently, we mark an IO request to STATE_IOREQ_READY state before
calling IO handlers in xen HV, i.e. vmx_portio_intercept or
vmx_mmio_intercept.  Actually, STATE_IOREQ_READY means it's ready for
DM handling, only if IO handlers in xen HV won't handle it, it should
be passed to DM. This patch fixes this issue.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Nakajima Jun <nakajima.jun@intel.com>
2005-10-13 08:06:27 +01:00
kaf24@firebug.cl.cam.ac.uk dfc0b259c1 Add memory barriers to console ring accesses. Similar to what
Rusty uses for xenbus messaging.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 21:10:14 +01:00
cl349@firebug.cl.cam.ac.uk 4e5630275d Disable watch callbacks only during driver registration instead of all probes.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-10-12 20:58:51 +01:00
cl349@firebug.cl.cam.ac.uk 22abd37313 Disable watch callbacks while running the driver probe callback.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-10-12 18:43:26 +01:00