Commit Graph
3796 Commits
Author SHA1 Message Date
Steven Hand f0cb8942c4 Fix vmxassist to boot Vista.
Currently, guest_linear_to_real to_real() in vmxassist assumes guest HVM
use 2 level page table when entering protect mode with PG enabled. Vista
uses 3 level (PAE enabled) page table, so memory addressing is wrong.
This patch fixes it, by considering all 4 possible cases.

Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
2006-09-22 12:14:22 +01:00
atse@norwich.uk.xensource.com f88384ec46 [XM] Error handling cleanup
Introducing an OptionError exception to be used by all xm subcommands
to signal an error in the arguments. "xm" will catch these and output
the appropriate error and usage message.

Detailed Changes:

main.py:
 *  Cleaned up imports and moved warning filter outside of
    import block.
 *  Converted usage parameters and description to a python
    dict rather than strings to enable better usage help
    formatting.
 *  Removed unused list_label domain command.
 *  Added cmdHelp() prints out usage message for any command
 *  Added shortHelp() prints out the default help message when
    xm is invoked with no arguments.
 *  Added longHelp() prints out long help message when invoked
    with xm --help or xm help.
 *  Added extra optional paramter to getDomains() so we can
    tell Xend not to poll devices. This will speed up xm list.
    (PENDING changes to Xend itself.)
 *  Changed all references where 'dom' actually means 'domid'
    to use the correct name.
 *  Changed 'xm list' header format to use printf formatting style.
 *  Renamed xm_subcommand to xm_importcommand so it is more
    clear what it is doing (all xm commands are subcommands!)
 *  Moved cpu_make_map() inside xm_vcpu_pin as an anonymous func.
 *  Use OptionError whenever an invalid option is detected in xm.
 *  Added proper catch and error printing for XendError and
    OptionErrors in main().

addlabel.py:
cfgbootpolicy.py:
dry-run.py:
dump-policy.py:
get-label.py:
labels.py:
loadpolicy.py:
makepolicy.py:
rmlabel.py:
resources.py:
 *  Replaced usage() with help() that is called from main.py
 *  Replaced usage() invokation with raising OptionError

opts.py:
 *  Added very simple wrap() function that behaves differently
    to textwrap.wrap()
 *  Added OptionError()
 *  Replaced the string representation of Opt, Opts to output
    a nicely formatted usage message.
 *  Changed class Opts itself will throw approriate OptionErrors.
 *  Changed set_bool to recognise 'y' and 'n' as valid input

create.py:
 *  Some whitespace and column width cleanup.
 *  throws OptionError if encounters option error.

migrate.py:
 *  Replace usage() message with the string representation of
    gopts.

sysrq.py:
 * Replace usage message with throwing OptionErrors

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-09-22 11:37:31 +01:00
Steven Smith bb53feb6ec [HVM][VNC] Fix bug in the VNC copyrect implementation which crept in
with the update backoff patch.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-09-22 09:12:00 +01:00
Christian Limpach a744b96a36 [qemu patches] Refresh.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-09-21 19:33:51 +01:00
Christian Limpach 6128a8f765 [qemu patches] Update patches for changeset 11562:449dcaff2551.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-09-21 19:33:07 +01:00
Christian Limpach da9db9c776 [qemu patches] Update patches for changeset 11561:c742b2ae920c.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-09-21 19:28:35 +01:00
Christian Limpach fc6241f65a [qemu patches] Update patches for changeset 11554:39aaa54756db.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-09-21 18:58:17 +01:00
Steven Smith fc99b58762 [HVM][VNC] Add a backoff feature to the vnc server, so that if it detects
that the display hasn't changed for a while it starts scanning more slowly.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-09-21 18:29:48 +01:00
Steven Smith 15c05dca32 [HVM] Reduce VNC overhead, by (a) only scanning framebuffer when a client
is connected, and (b) fixing an overflow bug in the scanning code which
prevented the dirty bit from ever getting cleared.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-09-21 17:56:14 +01:00
Tim Deegan 76ccc6e959 Merge 2006-09-21 15:04:29 +01:00
Tim Deegan 1c80d1b0a3 [XEND] Don't prepend '/dev/' to any absolute path.
Check for '/' rather than '/dev/' when translating e.g. 'hda'->'/dev/hda'
Signed-off-by: Tim Deegan <tim.deegan@xensource.com>
2006-09-21 15:00:50 +01:00
Tim Deegan fbbf99bec9 [XEND] split command-line arguments to the bootloader script properly.
Signed-off-by: Tim Deegan <tim.deegan@xensource.com>
2006-09-21 14:58:01 +01:00
Tim Deegan d456d49ce6 Pygrub: add /var/lib/xen to the install tree.
(Pygrub uses /var/lib/xen to store fifos and image files.)
Signed-off-by: Tim Deegan <tim.deegan@xensource.com>
2006-09-21 14:56:28 +01:00
Tim Deegan 795a172334 Pygrub: stop the FS identification code from leaking open fds.
Signed-off-by: Tim Deegan <tim.deegn@xensource.com>
2006-09-21 14:55:02 +01:00
Emmanuel Ackaouy 4c83c4918a This patch adds value checking of sched-credit xm options.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-09-21 14:10:56 +01:00
Christian Limpach 212efff62a [tools] Increases some of the timeouts
since e.g. stealing the hotplug lock after five seconds is completely insane.

From: Steven Smith <sos22@cam.ac.uk>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-09-21 13:53:49 +01:00
Christian Limpach fa4cdd4564 [qemu patches] Refresh qemu-pci patch without -p3.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-09-21 11:33:38 +01:00
Christian Limpach 3a70909bda [qemu patches] Update patches for changeset 11551:f872300b672f.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-09-21 11:33:00 +01:00
Steven Smith 5759c4fb6b [HVM] Use the right, PCI SIG assigned, vendor ID for xensource rather than
just making one up.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-09-21 11:15:13 +01:00
kfraser@localhost.localdomain 0a706be1ab [XENMON] Add argument check of "--ms_per_sample" option.
If a value of "--ms_per_sample" option is larger than a value of
"--time" option, xenmon may generate no log file. So, too large
"--ms_per_sample" should be treated as an error.

e.g.
  % xenmon.py --ms_per_sample=2000 -t 1 -n
  usage: xenmon.py [options]

  xenmon.py: error: option --ms_per_sample: too large (> 1000 ms)

# Notice that a unit of "--time" is a second.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2006-09-19 11:08:11 +01:00
kfraser@localhost.localdomain 2197970752 Merge with xenppc-unstable-merge.hg 2006-09-19 09:40:26 +01:00
Hollis Blanchard ac9ed2ddf6 [POWERPC] merge with xen-unstable.hg
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-09-18 14:28:16 -05:00
kfraser@localhost.localdomain a51f889db9 Revert 11475:11645dda144c3c8365dd2a6a64cb5a7d7da01170
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-09-18 14:25:26 +01:00
Ewan Mellor 3714ab433f Revert change to vtpm_utils related to skipping the test when the tpm is not
found -- we need to skip the test on non-TPM platforms, of course.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-09-15 23:54:04 +01:00
jchesterfield@wicket.uk.xensource.com 551365b6a0 Adding max block device timeout of 30 secs for live migrate. 2006-09-15 18:48:24 +01:00
root@procyon c3c52fdfa0 In this patch, the xc_domain_dumpcore_via_callback() in xc_core.c of
libxc is modified. Previously, the xc_domain_dumpcore_via_callback()
did not respond to error when copy_from_domain_page() failed.
In other words, the dump core remained silent even if mapping the domain
memory failed and its page could not be copied. When this happened,
erroneous data had been dumped to the file without the user realizing it.
Now, it has been modified so that if copy_from_domain_page fails,
this fact is recorded in the logfile and make imcoplerte-list.
However even in such cases, the dumping will continue as before.

Signed-off-by: Ken Hironaka <hironaka.ken@soft.fujitsu.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2006-09-14 08:19:41 +01:00
root@procyon 805b7b3995 This patch add localtime to dumpcore filename.
And it add '-imcomplete' if failed.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2006-09-14 08:19:39 +01:00
root@procyon 34e0159ce1 xm dump command add on
xm dump-core [-L|--live][-C| --crash] <domID> [output path]

-L| --live Live dump:
        By default, xm dump does an xm pause, unpause before and
        after taking the dump, respectively.  This option disables
        the pause/unpause and simply takes the dump.

-C :| --crash crash dump:
        This executes an xm destroy after the dump file is complete.

The output path is optional, and if it is not specified, the path will be
/var/xen/dump/<domU name>.<domU ID>.core

This command uses the existant dumpCore(), which has been used for
coredump when a domU crashed.

Signed-off-by: Ken Hironaka <hironaka.ken@soft.fujitsu.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2006-09-14 08:19:38 +01:00
Ewan Mellor 9054dbd238 Remove the '-instance' parameter from the qemu device model. Since this parameter
is not interpreted by the DM, it actually causes the DM to hang if
passed. Future device model support for the vTPM will read parameters
from the xenstore and won't need the command line parameter(s).
The patch includes a small change to the debugging output for the vTPM
module.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-09-14 08:18:56 +01:00
Ewan Mellor 2df254060e When redirecting the output of the echo command using '>' on bash, the
output seems to be broken up into multiple write()s (depending on the
version of busybox?). Unfortunately /dev/tpm0 needs to have the complete
command written to in one chunk. The work-around 'echo <string> > file ;
cat file > /dev/tpm0' seems to get around this problem.
The patch also removes a redundant test and error output.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-09-14 07:57:41 +01:00
Ewan Mellor bf510c7f4c This patch adds syntax checking for "xm block-attach" command.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-09-14 07:55:28 +01:00
Ewan Mellor 9a6d1bcab3 Show the usage message if invalid arguments are given to xm sysrq.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-09-14 07:55:27 +01:00
kaf24@firebug.cl.cam.ac.uk 37a7b1e045 [GDBSERVER] make gdbbuild exit on error
If an error occurs, such as wget failing because the site (or proxy)
is unavailable, the script will now terminate, rather than trying
to soldier on without any real hope of success.

mkbuildtree should really get the same treatment, but that
can wait for another day.

Signed-Off-By: Simon Horman <horms@verge.net.au>
2006-09-13 15:15:27 +01:00
kaf24@firebug.cl.cam.ac.uk 80f2588d2b [CONSOLED] Shouldn't call domain_create_ring() for a domU which is shutting down.
There is a race condition between domain_create_ring() and the removal
of the domU entry from xenstore. If the removal of the domU entry from xenstore
comes later than the first xs_gather() call in domain_create_ring(), it will go
on and bind the evtchn port to the dying domU, which will cause below error
message: (XEN) (file=event_channel.c, line=144) EVTCHNOP failure: domain 0, error -22, line 144

Signed-off-by: Max Zhen <max.zhen@sun.com>
2006-09-13 14:01:23 +01:00
kaf24@firebug.cl.cam.ac.uk 9f019b36fd [TOOLS] Enhance Python version check for v2.5.
From: Charles Coffing <ccoffing@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-09-13 13:54:59 +01:00
awilliam@xenbuild.aw 84804f40f9 merge with xen-unstable.hg 2006-09-12 11:43:22 -06:00
atse@norwich.uk.xensource.com 82f6d80e3a [XEND] Return an Internal Server Error via the Xend HTTP server.
This allows domain creation failures can be detected when done via HTTP.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-09-12 16:33:33 +01:00
Steven Hand f1b7d71605 This patch fixes return codes for the acm-related Xen management scripts
(error conditions) and addresses minor issues that 'pycheck' complains
about. It is tested with xm-test and by manually running the xm
commands. It also handles the return case (reported by Masaki Kanno)
that was missed in the originally patch.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-09-12 11:09:22 +01:00
awilliam@xenbuild.aw 296b9322bc [IA64][XEND] Fix getRequiredShadowMemory parameters
Parameter count changed in xen-unstable.hg 11417:65a41e3206ac

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-09-10 15:34:14 -06:00
Tim Deegan 06b8f9d3ab [XEND] balloon enough memory to enable shadow mode before live migration.a
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2006-09-08 18:55:53 +01:00
hollisb@localhost 6c6970a438 [LIBXC][POWERPC] Add missing xc_memory.c
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-09-18 13:08:58 -05:00
Hollis Blanchard ce993e2b23 [LIBXC][POWERPC] Update to latest flatdevtree snapshot.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-09-07 17:25:52 -05:00
jchesterfield@dhcp92.uk.xensource.com c2a28ee6ac [BLKTAP] Fix in xend to properly destroy blktap devices when deviceClass=='tap'
Submitted by Andres Lagar Cavilla
2006-09-06 11:42:29 +01:00
Ewan Mellor bc93f293ac Fix xm create -F. This can't be very widely used, because it looks like it's
been broken for ages!

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-09-05 17:26:20 +01:00
Ewan Mellor 26f067672a Added vmunused flag to unit test results to match recent change.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-09-05 17:26:18 +01:00
Ewan Mellor 70b20785e0 Add missing import.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-09-05 17:26:17 +01:00
Ewan Mellor bd5b7756c3 This patch adds the argument check of "--ms_per_sample=" option. For
"--ms_per_sample=", a negative value should be invalid.

e.g.
% xenmon.py -n --ms_per_sample=-1
usage: xenmon.py [options]

xenmon.py: error: option --ms_per_sample: invalid negative value: '-1'

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2006-09-05 17:06:02 +01:00
Ewan Mellor 8037b37752 This patch improves error message of xm console command.
# xm console Domain-0
Can't specify Domain-0

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-09-05 17:06:01 +01:00
Ewan Mellor 710a9ced48 Fix inverted sense of getRequiredAvailableMemory and
getRequiredInitialReservation on x86 HVM.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-09-05 16:23:11 +01:00
jchesterfield@dhcp92.uk.xensource.com 30acc78a4b [blktap] Fix block device getsize bug in qcow when backing_filename is a block device. 2006-09-05 15:35:42 +01:00