Commit Graph
5722 Commits
Author SHA1 Message Date
Tim Deegan e58cf9dbf9 Xend: "shadow_memory" setting in xm config is in MiB, not bytes.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-09-11 12:30:39 +01:00
kfraser@localhost.localdomain 6c87e8965f xenstore: Remove incorrect comment.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-11 08:34:04 +01:00
Alex Williamson f012ee16fb merge with xen-unstable.hg (staging) 2007-09-10 13:58:56 -06:00
Alex Williamson 37eb10eb59 [IA64] Use xc_map_foreign_pages() in copy_from_GFW_to_nvram()
use xc_map_foreign_pages() where possible

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-10 13:56:34 -06:00
kfraser@localhost.localdomain 96f6ffe78c [libxen] Compilation fix.
On a clean system where no prior dev. version of libxen was installed,
the compilation fails due to a wrong include. This fixes it.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-09-10 13:59:46 +01:00
Alex Williamson a3b952728b merge with xen-unstable.hg (staging) 2007-09-07 13:56:50 -06:00
kfraser@localhost.localdomain 05cf544b87 xc_map_foreign_pages(), a convenient alternative to xc_map_foreign_batch()
xc_map_foreign_batch() can succeed partially.  It is awkward to use
when you're only interested in complete success.  Provide new
xc_map_foreign_pages() convenience function for that kind of use.
Also convert two obvious calls to use it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2007-09-07 11:39:10 +01:00
kfraser@localhost.localdomain 986fc80c68 Fix error message and wait time for xm block-detach command.
- Wait time
    When xm requests a block device detach to xend, xm makes two
    requests. At first, xm requests the block device detach by device
    class 'vbd'. Next, xm requests the block device detaching by
    device class 'tap'.
    As a result, the wait time is 200 seconds because each of
    the block device detaching requests causes time-out.
 - Misleading error message
    Because the last request is by device class 'tap' to xend,
    the keyword "(tap)" is included in the error message.

This patch fixes the number of times of the block device detaching
request to one time.  At first, xm makes inquiries about device
class of a detaching target device to xend.  Then xm requires the
block device detaching by xend returned device class.  The wait
time becomes 100 seconds because the block device detaching request
is one time.  And the error message is also fixed.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-09-07 11:30:18 +01:00
kfraser@localhost.localdomain 214523659d xend: Fix error message for xm trigger command.
When I tested xm trigger command with a wrong argument, I saw the
following error message.

 # xm trigger vm1 xyz
 Error: __init__() takes exactly 2 arguments (3 given)
 Usage: xm trigger <Domain> <nmi|reset|init> [<VCPU>]

 Send a trigger to a domain.

This patch fixes the error message as follows.

 # xm trigger vm1 xyz
 Error: Invalid trigger: xyz
 Usage: xm trigger <Domain> <nmi|reset|init> [<VCPU>]

 Send a trigger to a domain.

The type of "TRIGGER_TYPE" is dictionary.  domain_send_trigger()
refers to the keys of "TRIGGER_TYPE" without using keys() currently.
This patch adds keys() there.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-09-07 11:24:28 +01:00
kfraser@localhost.localdomain 95f83e447a xend: waitForDevices() on xm reboot.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-09-07 11:10:32 +01:00
kfraser@localhost.localdomain 038aa6bdc0 Fix xenstored's dup2() usage.
The dup2() calls had their arguments reversed. Also remove the
unnecessary close() calls.

Signed-off-by: John Levon <john.levon@sun.com>
2007-09-07 10:26:33 +01:00
kfraser@localhost.localdomain 787dcb588b Check for libxml2 if security tools are to be built, and adapt the
python setup.py command line parameters to also work under SuSE.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-09-07 09:48:35 +01:00
Alex Williamson e122097794 [IA64] Foreign p2m: make xc_ia64_get_pfn_list() static
Now xc_ia64_get_pfn_list() isn't used anymore.  Make it static.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 15:04:07 -06:00
Alex Williamson 567b053811 [IA64] Foreign p2m: rewrite save/restore with foreign p2m
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 15:36:13 -06:00
Alex Williamson 254e1c1902 [IA64] Foreign p2m: xc_core: ia64 xc_core_arch_gpfn_may_present()
Prevent warning message when xm dump-core
Using foreign p2m exposure, we can avoid to map the page which isn't allocated.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 15:32:54 -06:00
Alex Williamson 04284d57f2 [IA64] Foreign p2m: libxc side
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 14:37:50 -06:00
Alex Williamson 6a9db78fbf [IA64] Foreign p2m: Fix vti domain builder.
It should set arch_domain::convmem_end.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 13:48:43 -06:00
Alex Williamson 813d34b4d0 merge with xen-unstable.hg (staging) 2007-09-06 12:05:15 -06:00
kfraser@localhost.localdomain f0a09ab129 Fix domain restore after memory auto-balloon changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-06 18:26:45 +01:00
kfraser@localhost.localdomain 6325216369 Fix xm-test python import after XSM security changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-06 18:10:04 +01:00
kfraser@localhost.localdomain f3c0c0db25 [XSM] correctly rename, relocate and patch the security.py file
This patch corrects an error in the original XSM tools patch.  The
original patch did not rename, relocate and patch the security.py file
from changeset 15730:256160ff19b7.  This patch addresses this issue as
well as any updates made to security.py in xen-staging during the
merge of XSM.

Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
2007-09-06 18:05:18 +01:00
kfraser@localhost.localdomain 0671a3ce43 Delete flask tools build target and add to .hgignore.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-06 11:23:43 +01:00
Ian Campbell 2c312d03cd Build libflask unconditionally since the python low-level tools
require it and it does't seem to pull in any major dependencies.

The alternative would have been to hack tools/python/setup.py to
conditionally compile the flask stuff.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-09-03 15:04:03 +01:00
kfraser@localhost.localdomain 87a39e42b8 xend: Always build lowlevel security modules, as there are some
dependencies on these from with xend proper.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-08-31 16:50:26 +01:00
kfraser@localhost.localdomain 0269e41669 libxenctrl: xc_destroy_domain() handles EAGAIN.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-08-31 15:43:28 +01:00
kfraser@localhost.localdomain 399280a99d xend: Correct indexing in xc_cpu_to_node_t map.
Signed-off-by: Beth Kon <eak@us.ibm.com>
2007-08-31 14:14:14 +01:00
kfraser@localhost.localdomain 9ef6233978 xend: Add blktap disk type check
Print the following error when you give a wrong disk type to xm commands:
 # xm create /xen/vm1.conf disk='tap:xxx:/xen/root-vm1.img,hda1,w'
 Using config file "/xen/vm1.conf".
 Error: tap:xxx not a valid disk type

 # xm block-attach vm2 tap:yyy:/xen/second.img hdb1 w
 Error: tap:yyy not a valid disk type
 Usage: xm block-attach <Domain> <BackDev> <FrontDev> <Mode>
 [BackDomain]

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-08-31 14:11:15 +01:00
kfraser@localhost.localdomain c40696b705 Add line termination to 'echo' usage in network-bridge script.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-08-31 14:09:05 +01:00
kfraser@localhost.localdomain e6f4576ed5 Fix handling of auto-generated file xsm.py.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-08-31 12:12:27 +01:00
kfraser@localhost.localdomain 61c6564d34 Cleanups after XSM checkin.
Signed-off-by: Keir Fraser <keir@xensource.com>

--HG--
rename : xen/include/public/acm.h => xen/include/public/xsm/acm.h
rename : xen/include/public/acm_ops.h => xen/include/public/xsm/acm_ops.h
rename : xen/include/acm/acm_core.h => xen/include/xsm/acm/acm_core.h
rename : xen/include/acm/acm_endian.h => xen/include/xsm/acm/acm_endian.h
rename : xen/include/acm/acm_hooks.h => xen/include/xsm/acm/acm_hooks.h
2007-08-31 12:05:07 +01:00
kfraser@localhost.localdomain 670a6002b9 Xen Security Modules: ACM.
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
2007-08-31 11:41:49 +01:00
kfraser@localhost.localdomain d89af62954 Xen Security Modules: Tools.
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
2007-08-31 11:37:20 +01:00
kfraser@localhost.localdomain c0e85ece47 Fix blktap script for versions of readlink command that do not handle
regular files.
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Josh Nicholas <jnicholas@virtualiron.com>
2007-08-31 11:10:21 +01:00
kfraser@localhost.localdomain af6a326c1a qemu: Allow more IDE power management.
Made the QEMU IDE disk tolerate more power-mgmt commands, specifically:
        WIN_SETFEATURE(EN_AAM)  - enable automatic acoustic mgmt
        WIN_SETFEATURE(DIS_AAM) - disable automatic acoustic mgmt
        WIN_SETFEATURE(DIS_APM) - disable automatic power mgmt
        WIN_STANDBY
        WIN_SETIDLE1
        WIN_SLEEPNOW1
        WIN_STANDBY2
        WIN_SETIDLE2
        WIN_SLEEPNOW2
        WIN_STANDBYNOW2
These are all essentially no-ops, like existing support for EN_RLA
(enable read lookahead) and WIN_STANDBYNOW1.

This fixes a crash in the SLES9-SP3 64bit kernel when the powersaved
was started (with ACPI or ACM).  This guest really only needs EN_AAM,
DIS_APM, and WIN_SETIDLE1 support, but the others seemed sensible to
include.

I've excluded EN_APM since I'm unsure of what that's agreeing to do.
It's probably ok to include.

Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: David Lively <dlively@virtualiron.com>
2007-08-30 16:41:57 +01:00
kfraser@localhost.localdomain c1d183f3dd blktap: Fix double-free in tapdisk cleanup.
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Josh Nicholas <jnicholas@virtualiron.com>
2007-08-30 16:29:10 +01:00
kfraser@localhost.localdomain 4a517de8f6 [ACM/XEND] Fix case where resource label file does not exist.
Fix the case where the resource label file does not exist but its
contents would be needed for access control evaluations.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-08-30 15:39:13 +01:00
kfraser@localhost.localdomain 6236121d5f qemu: Remove mapcache lock - we no longer have multiple threads in core qemu code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-08-30 15:35:10 +01:00
kfraser@localhost.localdomain 75dabf614d Introduce xc_core_arch_gpfn_may_present() hook.
On ia64 trying to map a foreign domain page which isn't allocated
cause annoying warning message. xm dump-core results in too many
warnings. With this hook, ia64 dump-core can suprress warning.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-08-30 15:00:21 +01:00
kfraser@localhost.localdomain 0e0204500e Optimize xc_core.c implementation.
Optimize out unnecessary map/unmap foreign domain page
by moving p2m/pfn talbe after pages array.
This patch doesn't change the xm dump-core format.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-08-30 14:58:40 +01:00
kfraser@localhost.localdomain c583625712 Some minor cleanup of xc_core.c.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-08-30 14:57:24 +01:00
kfraser@localhost.localdomain 067b09326e ioemu: Avoid unaligned guest memory accesses on ia64.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-08-29 15:47:55 +01:00
kfraser@localhost.localdomain 357caf631c hvm: Add rombios decoding of F11/F12 scancodes in support for
Microsoft's Remote Installation Services, which require F11/F12 keys

Signed-off-by: Ben Guthro <bguthro@virtualron.com>
Signed-off-by: Steve Ofsthun <sofsthun@virtualiron.com>
2007-08-29 15:02:41 +01:00
Alex Williamson 200472a35b [IA64] Move nvram from /usr to /var
Presently nvram is stored in /usr/lib/xen/boot/nvram_<domain> next to the guest
firmware.  This violates the FHS because /usr might be mounted read-only.  This
patch moves the nvram storage to /var/lib/xen/nvram/nvram_<domain>

Also clean up:
- references to stat_buf assumed that stat() had succeeded; use access()
  instead since it's easier and doesn't require stat_buf at all
- nvram_path[PATH_MAX] instead of nvram_path[100]
- strncpy(..., strlen(src)) is meaningless, re-order length tests to work
  correctly

Signed-off-by: Aron Griffis <aron@hp.com>
2007-08-28 12:25:37 -06:00
Alex Williamson 4634c6b2d5 [IA64] Fix parallel build; directory must exist before making symlink
Signed-off-by: Aron Griffis <aron@hp.com>
2007-08-28 12:24:27 -06:00
kfraser@localhost.localdomain 72885c0fa3 ioemu: Avoid struct members clashing with POSIX apis
The TPM code in tools/ioemu/hw/tpm_tis.c has a struct containing a
number of function pointers with names open, close, read, write which
are the same as various POSIX apis already #included in the
file. POSIX allows these functions to be defined as macros and latest
GCC/glibc does indeed define them as macros depending on compiler
flags. This causes compile errors when deferencing the struct
members. The solution is either to change calls like   ctx->open () to
be (* ctx->open) (), or simply to rename the struct members. Since
this struct was only used inside that one file I simply renamed them.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-08-28 16:13:35 +01:00
kfraser@localhost.localdomain 40f18cbcf0 xm: Fix error message for xm create command.
When I tested xm create command, I saw the following error message.
I expected an error message "Error: (12, 'Cannot allocate memory')"
because I intentionally caused a memory shortage on the test.
But the error message was different from my expectation.

# xm create /xen/HVMdomain.1
Using config file "/xen/HVMdomain.1".
Error: an integer is required

I looked at xend.log to examine the cause why the error message was
shown.  (Could you see the attached xend.log?)
xend had the error message "Error: (12, 'Cannot allocate memory')"
first.  But xend changed the error message to "Error: an integer is
required" halfway.  I'm not sure about the cause why an exception
occurred in logging processing.  But when I applied an attached patch,
I confirmed that the error message that I expected was shown.  The
patch does not call xc.domain_destroy_hook() if self.domid is None.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-08-28 16:11:05 +01:00
kfraser@localhost.localdomain de01426fdf ioemu: error checkin when setting up the Cirrus Logic video device.
set_mm_mapping() may fail because of xc_domain_populate_physmap().  In
this case, we should not blindly go on; the xc_map_foreign_batch()
that follows will cause a page fault and, at best, get mapped in a
zeroed page from the dom0 (which is not what we want).  While I'm in
here, fix a memory leak on an error path.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2007-08-28 16:08:38 +01:00
kfraser@localhost.localdomain 81217a7a8d xend: Fix memory ballooning logic during save/restore. Should be same
as during domain creation.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
2007-08-28 16:06:32 +01:00
kfraser@localhost.localdomain 145dd4e0fb Fix VNC server after HVM save/restore/migrate, when no vncpasswd specified.
The basic problem was that the "image" section of the sxp had a "None"
in it, which means that on the restore (either on the local machine or
remote machine), the vnc server in the qemu device model literally
needed the string "None" to properly connect.  This simple patch only
puts a vncpasswd entry in the image if it is *not* None in the python
code, thus avoiding the whole issue.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2007-08-28 15:58:46 +01:00
Alex Williamson f1d108148e [IA64] Clean up NVRAM failure case
copy_from_GFW_to_nvram() in libxc forgot munmap() if NVRAM data
invalid.  Also it forgot free() and close() too.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-08-24 15:09:14 -06:00