Commit Graph
355 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk 2442eccf6d Sanitise the trace-buffer hypervisor<->user interface.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-31 10:45:31 +01:00
kaf24@firebug.cl.cam.ac.uk f6556b0d17 This is a set of changes which allow the tracebuffer functionality to
be enabled and disabled dynamically while the system is running. The
existing DOM0_TBUFCONTROL hypercall is used, and three new operations
have been added: enable, disable, and set_size. This is to address
concerns that use of the trace buffers impacts system performance.

The initial value of opt_tbuf_size is set to zero, so that trace
buffers remain disabled by default. They can be enabled as they used
to be, by adding tbuf_size= to the xen command line at boot time. They
can also be turned on and off any time when the system is running. The
size of the trace buffer allocation can also be changed dynamically
while the system is running. The trace buffers may be completely
deallocated by setting the size to zero. No change in buffer size can
be done while tracing is enabled;

Other Changes made:
 - Update the constants in tools/xentrace/formats to match those in 
public/trace.h
 - libxc functions for enable/disable, get/set size
Still left to do:
 - remove all ifdef's for trace buffers and the 'trace' build option
 - xm command to do enable/disable trace buffers and get/set size
 
Signed-off-by: Rob Gardner  <rob.gardner@hp.com>
2005-10-30 22:31:45 +01:00
kaf24@firebug.cl.cam.ac.uk 1464591d5f merge 2005-10-29 09:51:35 +01:00
kaf24@firebug.cl.cam.ac.uk 7429bfd50d This patch provide local APIC support for vmx guest.
A configure option is also added to disable it, which is off by default.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Li Xin <xin.b.li@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
2005-10-28 09:48:46 +01:00
kaf24@firebug.cl.cam.ac.uk 8fa033460a To allow kernel to handle radically different hypervisors in the future,
I thought a magic field in the start_info might be useful.  I just chose
"Xen-<major>.<minor>", but feel free to change it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (authored)
2005-10-27 17:47:53 +01:00
kaf24@firebug.cl.cam.ac.uk 9485da60b7 Use standard int typedefs.
Signed-off-by: John Levon <levon@movementarian.org>
2005-10-27 17:16:12 +01:00
djm@kirby.fc.hp.com 8620f56614 Necessary change to support ia64/vti domain build in common code.
Signed-off-by Ke Yu <ke.yu@intel.com>
Signed-off-by Anthony Xu <anthony.xu@intel.com>
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2005-10-24 20:57:47 -06:00
djm@kirby.fc.hp.com 9f69bceba2 Image builder for ia64/vti domain, together with a example config file.
Signed-off-by Ke Yu <ke.yu@intel.com>
Signed-off-by Anthony Xu <anthony.xu@intel.com>
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2005-10-24 20:56:53 -06:00
djm@kirby.fc.hp.com 8250e0c500 Merge 2005-10-24 09:08:13 -06:00
kaf24@firebug.cl.cam.ac.uk 74df472110 some fixes to VMX:
1) enable ACPI in VMXAssist by default.
2) do nothing when emulating wbinvd instruction in VMXAssist.
3) use MACRO in cpu number setting/getting code.
4) remove useless parameter flags from xc_vmx_build.
5) remove usage of dsi.v_start in xc_vmx_build when not handling
vmxloader elf.
6) unmap shared_page_va when destroy VMX domain.
7) change virtual_platform_def to vmx_platform.
8) remove useless code in vmx_setup_platform.
9) change parameter of vmx_setup_platform from vcpu to domain.
10) in xen HV, vmx domain get domain processor number from the reserved
E820 area.
11) in domain.c, don't define some functions when on i386 platform or no
CONFIG_VMX.
Also removed some ugly tailing space.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-10-23 11:51:15 +01:00
emellor@leeni.uk.xensource.com 2b99d6e3a9 Take advantage of the new UUID (handle) stored for us in Xen to improve the
recreation semantics.

Remove the unpause at the end of xc_linux_restore, and move it to
XendDomainInfo.  This is necessary because xenstored now allocates the domain
path when the domain is introduced, which means that the new domain cannot
start running until that introduce is performed and the new devices
configured.

Give restore a separate completion phase in which domain details are stored.
This is required because the domain path is no longer available until after
the introduceDomain call.

TODO: Split the domain introduction into two so that the domain path is
available earlier.  At the moment, the domain <-> store channel details are
passed in to xenstored when the domain is introduced, but in the case of
restore it is necessary to wait until the restore is completed before the
channel MFN is available.

Change the interface between XendDomainInfo and XendCheckpoint/image to not
have hideous callbacks through setConsoleRef and setStoreRef.  Instead,
image.createImage explicitly returns those values, and XendCheckpoint passes
them through to completeRestore.

Move the purging of the domain path corresponding to a new domain from Xend
to xenstored, since xenstored is now in charge of this path.  With the domain
path creation moved to xenstored, Xend cannot remove the path, because watches
may have fired on it already.

Fix the printf statement in xenstored in verbose mode that details the
messages being written.  This statement was printing the buffer using %s, but
this buffer has an explicit length field, so we were seeing garbage after the
correct details.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 11:47:51 +01:00
kaf24@firebug.cl.cam.ac.uk e85a40dd36 Remove 'n_vcpu' field from start_info structure. Domain0
simply creates a CPU on every physical CPU. Other domains
read the initial VCPU configuration from xenstore.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 19:02:14 +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 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
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 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 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
djm@kirby.fc.hp.com 10c606b1fe Modify printfs to be able to compile on ia64.
Width arguments of printf ("%*") should be an int.
2005-10-13 16:02:35 -06:00
kaf24@firebug.cl.cam.ac.uk be8d1a5fd5 Fix error output to stderr in xc_linux_build.
Signed-off-by: Scott Parish <srparish@us.ibm.com>
2005-10-12 16:42:35 +01:00
kaf24@firebug.cl.cam.ac.uk 523636b3b7 New dom0_op to set max vcpus for a domain.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 16:34:49 +01:00
kaf24@firebug.cl.cam.ac.uk d8263e8dba Fix Xen public interfaces and the tools to consistently
use stdint-format bitsize types (uint32_t and friends).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 11:07:37 +01:00
kaf24@firebug.cl.cam.ac.uk e4c8d0db29 Fix PAE overflow in xc_linux_build.
Signed-off-by: srparish@us.ibm.com
2005-10-12 09:31:53 +01:00
kaf24@firebug.cl.cam.ac.uk 7ca9b327cd Error print on err path.
Signed-off-by: srparish@us.ibm.com
2005-10-12 09:29:52 +01:00
emellor@ewan e92ad65f02 Append a newline to error messages, so that they are parsed by XendCheckpoint.py
correctly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-09 11:53:34 +01:00
kaf24@firebug.cl.cam.ac.uk 07a233ac7c User tools send evtchn notifications via /dev/xen/evtchn
rather than using hypercall directly.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-06 17:02:38 +01:00
kaf24@firebug.cl.cam.ac.uk e926a10696 Ensure that all fields of evtchn_op_t are initialised when
making an event_channel_op hypercall. Stefan Berger gets the
credit for diagnosing nasty domU driver problems that were a
result of garbage fields.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-06 10:42:32 +01:00
kaf24@firebug.cl.cam.ac.uk 0f742e92ea EVTCHNOP_alloc_unbound can allocate a port in an arbitrary
domain (only if the caller is sufficiently privileged).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-05 19:14:13 +01:00
kaf24@firebug.cl.cam.ac.uk 1872f40d78 Clean up sched_op() hypercall interface. One particular
change to watch out for is that the suspend record, on
save/restore, is now passed via register %edx not %esi
(both i386 and x86/64).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-04 15:34:02 +01:00
kaf24@firebug.cl.cam.ac.uk 92f5a40578 Allow EVTCHNOP_bind_{ipi,virq} to specify the vcpu to
bind to. Previously the alloacted port was implicitly
bound to the calling vcpu.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-04 15:02:51 +01:00
kaf24@firebug.cl.cam.ac.uk 2404d08913 Make PAE defs in xg_private.h usable in both 32- and
64-bit builds.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-23 14:43:52 +01:00
kaf24@firebug.cl.cam.ac.uk 0c4708b64f Add VGA acceleration support for cirrus logic device model
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Asit Mallick  <asit.k.mallick@intel.com>
2005-09-23 13:30:54 +01:00
kaf24@firebug.cl.cam.ac.uk 2b3f9eda6b Clean up xc_vmx_build():
1. Remove linux parameters.
 2. Remove init ramdisk.
 3. Remove e820 memmap config file parse.
 4. Removed provisional GDT.
 5. Removed some ugly tailing space.

Signed-off-by: Xin B Li <xin.b.li@intel.com>
2005-09-23 12:52:43 +01:00
kaf24@firebug.cl.cam.ac.uk 5ec9c16433 Parse vcpus for VMX guest.
Vcpus are passed to device model and vmx domain builder.

Signed-off-by: Yan Li <yanx.li@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-09-21 09:58:15 +00:00
kaf24@firebug.cl.cam.ac.uk 8ad67b4949 Dynamically generate the local apic entries in ACPI MADT table.
The number of local apic entries is decided by the #vcpus passed
from the config file (eg./etc/xen/xmexample.vmx).

This feature is required by the SMP VMX domain.

Signed-off-by: Ke Yu <ke.yu@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Asit Mallick <asit.k.mallick@intel.com>
2005-09-20 09:02:43 +00:00
kaf24@firebug.cl.cam.ac.uk b54b5b2b14 Fix xc_ptrace (live debug, not coredump debug) for 32-bit pae.
Clean up interfaces and add simple documentation for using
the domU debug interfaces.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-19 15:21:09 +00:00
kaf24@firebug.cl.cam.ac.uk e701d05c8a Re-indent libxc to avoid hard tabs. Also, fix the PAE
domain builder to correctly write PTEs that map pages
above 4GB.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-19 11:06:05 +00:00
kaf24@firebug.cl.cam.ac.uk 47ff2422db Fix the libxc Makefile. 2005-09-15 13:17:24 +00:00
cl349@firebug.cl.cam.ac.uk 7438df59ca merge? 2005-09-15 09:21:22 +00:00
cl349@firebug.cl.cam.ac.uk 99c154360f Better build fix.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-15 09:13:21 +00:00
kaf24@firebug.cl.cam.ac.uk 76c3e5afc2 Like IA32 PAE xenlinux, we also need make VMX guest 1:1 page table PGD
page below 4G.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Chengyuan Li <chengyuan.li@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
2005-09-15 09:12:03 +00:00
cl349@firebug.cl.cam.ac.uk 26f7bcf1d3 Fix build!
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-15 08:56:13 +00:00
djm@kirby.fc.hp.com 6be63db55d Merge latest xen-unstable into xen-ia64-unstable to prep
for push back to xen-unstable
2005-09-14 15:36:10 -06:00
kaf24@firebug.cl.cam.ac.uk 134ef9dc4a Fix xc_make_page_below_4G(). Should fix PAE domain
building on >= 4GB systems.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-14 16:56:05 +00:00
kaf24@firebug.cl.cam.ac.uk ae4ef259f1 Fix xc_domain_memory_decrease_reservation().
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-14 15:56:06 +00:00
kaf24@firebug.cl.cam.ac.uk 458fb4bc12 Add some sanity check when creating 3-level 1:1 page table
in VMX domain builder.
 - Add check for empty l2e page entry.
 - Add check for failed vl1tab map.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Asit Mallick <asit.k.mallick@intel.com>
2005-09-14 13:34:14 +00:00
kaf24@firebug.cl.cam.ac.uk 79434e94bd Get rid of anonymous unions in public header files.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-14 13:13:10 +00:00
kaf24@firebug.cl.cam.ac.uk 3886819443 Remove unsued domain_controller.h file.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-14 10:58:00 +00:00