Commit Graph
7005 Commits
Author SHA1 Message Date
emellor@ewan 42a5d02afb Move variable initialisation out of import section. Remove obsolete save
parameter from XendDominInfo.exportToDB.
2005-09-22 18:03:16 +01:00
emellor@ewan 089412c49e Rename XendDomainInfo and DevController.getDomain to getDomid.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-22 17:58:43 +01:00
emellor@ewan 251888ee61 Move initDomain out of image.py and into XendDomainInfo. The only thing that
needed any of the state of image.py was the bootloader code, which says there,
but all the rest was doing something that belonged more properly in
XendDomainInfo, with all the other generic domain initialisation code.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-22 17:52:07 +01:00
emellor@ewan 8259cb8841 Added diagnostic message when RuntimeError is raised inside XenStore.exists.
This is one of the first things to be used when xenstored starts up, so a
corrupted filesystem may manifest itself here.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-22 17:50:29 +01:00
emellor@ewan 3f962c0f21 Merged. 2005-09-22 16:12:14 +01:00
emellor@ewan 9f70470c55 A number of changes to get save-restore working again:
Fix the use of configuration inside domain_configure.  The config written by
XendDomainInfo.sxpr has moved, and this function needs to change to match.

Re-add a call to _add_domain inside domain_restore.

Inside XendDomainInfo.restore, perform the appropriate configuration to restore
the domain.

Validate maxmem_KiB, and cap it at memory_KiB if over that value.  Save
requires that value to be correct, as the logic for saving only the pages
in use is not in place inside Xen.

Output the device configuration in sxpr(), as required for save-restore.

Check for image being null when trying to call createDeviceModel -- configure
is called on restore as well as create, and the ImageHandler instance is not
present in the former.

Remove dead code create_blkif.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-22 16:05:44 +01:00
kaf24@firebug.cl.cam.ac.uk 29008aff6c Fixes a vtpm timeout problem for slow machines.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-09-22 15:19:30 +01:00
kaf24@firebug.cl.cam.ac.uk 936568e29a Netfront/back always use grant tables now. This cleans up a
whole bunch of code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-22 14:36:20 +01:00
kaf24@firebug.cl.cam.ac.uk 9508e60958 Remove defunct usb split driver code. It will get replaced with
a new working driver at some point.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-22 14:05:36 +01:00
kaf24@firebug.cl.cam.ac.uk f392c549ca Indentation cleanups in linux driver code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-22 14:04:14 +01:00
emellor@ewan 6c2a23bb96 Merged? 2005-09-22 14:01:01 +01:00
kaf24@firebug.cl.cam.ac.uk 81c46aedf9 A more comprehensive fix for mapping shared-ring grant
references in back-end drivers.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-22 12:46:17 +01:00
emellor@ewan 3f69932eed This patch adds a check in xend that prevents a user from trying to
destroy Dom0.  Currently, xm does not return an error for this case.
Xend tries to destroy dom0 and leaves the system in an unstable
state.  Subsequent attempts to create a domain result in the following
error message:

  Error: Error creating domain: (106, 'Transport endpoint is already \
  connected')

This will fix bugzilla bug #243

Signed-off-by: Dan Smith <danms@us.ibm.com>
2005-09-22 11:35:35 +01:00
emellor@ewan 79e2c4bff3 VMX guest memory calculation in python code is corrupted by changeset
6984, this patch fixes it.

Also print vmx builder parameters before calling vmx builer, just like
what's done before calling linux builder.

With this patch, qemu dm using SDL can work, however qemu dm using VNC
still has bug, we will fix it soon.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-09-22 11:21:37 +01:00
emellor@ewan 7dfa4a382a this patch fixes the bug that when "cpu" is not set in config file,
control panel complains "Error creating domain - int argument required".
Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-09-22 11:09:11 +01:00
kaf24@firebug.cl.cam.ac.uk c50a971459 This fixes the "make check" feature of xenstore to properly compile with
x86-64. When compiling you would get the following error since on x86-64
it was passing a long , when you are expecting an int.

Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
2005-09-22 11:04:30 +01:00
jbulpin@paploo.uk.xensource.com 6f06ab2fd1 Trivial spelling mistake fix.
... but mainly to check that pushes to the repository are working

Signed-off-by: James Bulpin <james@xensource.com>
2005-09-21 23:41:34 +01:00
kaf24@firebug.cl.cam.ac.uk e96f2b5ec1 This patch fixes a bug where raise_softirq(SCHEDULE_SOFTIRQ) is called
upon a hlt instruction from a VMX guest, causing repeated VMExits when
the guest is idle. At the same time, it disables the monitor/mwait
feature as it's not feasible to implement for vcpu.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Asit Mallick <asit.k.mallick@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
2005-09-21 16:58:55 +00:00
kaf24@firebug.cl.cam.ac.uk fb542e5648 Fix mapping of shared ring pages into backend drivers.
This should fix observed problems when creating a domain,
causing Xen to print "Could not find PTE entry for
address ...".

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-21 16:36:46 +00:00
emellor@ewan 1bb7afe544 Merge. 2005-09-21 15:25:58 +01:00
emellor@ewan f28ff9d5c0 Split the configuration file parsing and xc dominfo parsing aspects of
XendDomainInfo out from the rest of the code, creating an intermediate
dictionary of common format.  This means that the rest of XendDomainInfo can
work whether creating a domain for the first time, or whether xend is
restarted but the domains still exist.  This means that xend is now robust in
the face of restarts.  The phase of validation of configuration details is
now more explicit, and stronger too.

Change the handling of memory sizes in XendDomainInfo's interface to use KiB
in setMemoryTarget and getMemoryTarget.  This gives reasonable granularity
whilst ensuring that we can handle values up to 2TiB without overflowing a
signed 32 bit value.  It is not clear that the xend code, especially the C /
Python interface, is either 64-bit clean or unsigned 32-bit clean, so this is
the safest choice for now.  The behaviour of Python's shift operator will
change in Python 2.4, so it is best to address this problem once we have moved
to that version.

Determine the backend flags on-the-fly, in getBackendFlags, rather than
computing them in advance in configureBackends and storing the value.  Change
addControllerClass so that backend flag information is in this table too,
rather than hard-coded elsewhere.

Improve the error reporting for name clashes.

Remove XendDomainInfo's dependence upon DBMap, and use xstransact directly
instead.  This changes the interface from XendDomain to XendDomainInfo, as
paths rather than DBMaps are passed in.

Remove the XendDomainInfo.recreate and restore flags.  Since the device and
domain handling is now stateless inside xend, much less work is necessary for
recreate and restore procedures, so we can do without these flags.

Remove XendDomainInfo's unused dependency upon SrvDaemon, and its unnecessary
dependence upon PrettyPrint.  Remove the unused show method.

Decouple image.py from XendDomainInfo.bootloader by passing a bootloading flag
into initDomain instead.  Decouple it from XendDomainInfo.config by passing
the semiparsed device configuration into create().  Move configuration in
VmxImageHandler so that rather than being scattered around the class it is in
or called from the configure method.  Device configuration is no longer
available anywhere else.

From Dan Smith <danms@us.ibm.com>:

      I could not find in the existing code the point at which
      a domain was added to the XendDomain list after restore.  Several
      attempts to restore would result in positive log messages, but the
      restored domain would not show up in "xm list".  This patch includes a
      call to _add_domain(), which results in restore working for me.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-21 15:23:26 +01:00
emellor@ewan d02cb884e0 Disable debugging-level output.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-21 15:13:26 +01:00
emellor@ewan 1fe49007f3 Match change to the memory/target value, as it is now in KiB, not bytes.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-21 15:12:32 +01:00
emellor@ewan 0c41a8f422 Remove unused DEBUG variable, and -d flag.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-21 11:31:55 +01:00
emellor@ewan efa1534b26 Removed unused getLevel method, and don't use intermediate variable called
'log', as this name hides the global logger instance.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-21 11:30:59 +01:00
emellor@ewan df0fc046af Added diagnostic messages to the RuntimeError exceptions when they occur inside
_read and _write.  Fix gather to not return the string 'None' when reading a
value of type string that does not exist.  The value None should be returned
instead.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-21 11:29:23 +01:00
emellor@ewan 57ff2ac70a Lots of minor changes to please pylint, including matching the number of
parameters between functions in the base classes and those that override them
in subclasses.  It's hard to see how this code worked at all.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-21 11:26:31 +01:00
emellor@ewan 7bfeb73ad7 On one of pyxc_domain_getinfo's error paths, free the block allocated
previously.  This would have caused a memory leak when attempting to get info
on a domain that does not exist.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-21 11:24:26 +01:00
kaf24@firebug.cl.cam.ac.uk dd0403c3f2 Some cleanup in tpm-related files.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-09-21 10:13:11 +00:00
kaf24@firebug.cl.cam.ac.uk d42fcbcc99 Removes redundant/unnecessary __vmread/__vmwrite.
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
2005-09-21 10:11:02 +00: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 93a4c7f147 Fix .hgignore and add missing vtpm patch file. 2005-09-21 09:56:34 +00:00
emellor@ewan 0a8fb66792 Remove unused variables and imports.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:31:22 +01:00
emellor@ewan 5a9ab7acc1 domain_setmaxmem takes an int, not a long, for the maxmem_kb parameter. The
underlying xc_domain_setmaxmem already took an unsigned int, and
PyArg_ParseTupleAndKeywords call was only parsing an int, so there is no way
that longer values would get through here in any case.  Fixing the documentation
and the local variable is the best solution, until someone decides that we need
to support maxmem values greater than 2TiB.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:29:57 +01:00
emellor@ewan 2a9831d0a8 Remove extraneous semicolon.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:25:27 +01:00
emellor@ewan f519344e5c Move definition of xc, to avoid confusing pylint.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:25:00 +01:00
emellor@ewan 96df3030e7 Remove unused import.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:24:27 +01:00
emellor@ewan c14c80d31d Mark unused variables as such. Remove unused import.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:22:20 +01:00
emellor@ewan bf0102c5f3 Move definition of xc variable, to save confusing pylint.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:21:39 +01:00
emellor@ewan 8aee1a239f Mark unused variable as such.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:20:20 +01:00
emellor@ewan a3d83fdeea Added debugging message to exception on write.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:19:19 +01:00
kaf24@firebug.cl.cam.ac.uk eafc6710fa The vmx guest loading is broken from 6925 because of the new
DevController code.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
2005-09-20 16:13:01 +00:00
kaf24@firebug.cl.cam.ac.uk 8b00e58770 Fix __save_flags() to not complain when smp_processor_id() is used
in a preemptible region (it is always safe).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-20 14:44:49 +00:00
cl349@firebug.cl.cam.ac.uk a59be7e7c2 merge? 2005-09-20 14:18:23 +00:00
cl349@firebug.cl.cam.ac.uk b1aa9920bf Add support to build arch/ia64 xen kernels, also add pre/post link hooks in mkbuildtree.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-20 14:18:01 +00:00
kaf24@firebug.cl.cam.ac.uk 3c77932be4 Fix xenconsole when console page is >= 4GB.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-20 14:09:07 +00:00
kaf24@firebug.cl.cam.ac.uk 3734cbe43d Put_page on vmx_set_cr0 for multiple protected/real mode switch.
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Chengyuan Li <chengyuan.li@intel.com>
2005-09-20 13:07:10 +00:00
cl349@firebug.cl.cam.ac.uk 9c02b9aa17 merge? 2005-09-20 09:43:46 +00:00
cl349@firebug.cl.cam.ac.uk 4037ef392f Fix vnc configuration issue for creating vmx guest.
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-20 09:43:29 +00:00
kaf24@firebug.cl.cam.ac.uk 3466017825 Split up docs. Signed-off-by: Robb Romans <3r@us.ibm.com> 2005-09-20 09:17:33 +00:00