aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* [ACM/XEND] Fix case where resource label file does not exist.kfraser@localhost.localdomain2007-08-301-2/+4
| | | | | | | 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>
* qemu: Remove mapcache lock - we no longer have multiple threads in core qemu ↵kfraser@localhost.localdomain2007-08-303-27/+1
| | | | | | code. Signed-off-by: Keir Fraser <keir@xensource.com>
* Introduce xc_core_arch_gpfn_may_present() hook.kfraser@localhost.localdomain2007-08-308-10/+19
| | | | | | | 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>
* Optimize xc_core.c implementation.kfraser@localhost.localdomain2007-08-302-112/+123
| | | | | | | | 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>
* Some minor cleanup of xc_core.c.kfraser@localhost.localdomain2007-08-301-70/+128
| | | | Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* ioemu: Avoid unaligned guest memory accesses on ia64.kfraser@localhost.localdomain2007-08-291-0/+6
| | | | | Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* hvm: Add rombios decoding of F11/F12 scancodes in support forkfraser@localhost.localdomain2007-08-291-3/+8
| | | | | | | 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>
* ioemu: Avoid struct members clashing with POSIX apiskfraser@localhost.localdomain2007-08-281-12/+12
| | | | | | | | | | | | | | 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>
* xm: Fix error message for xm create command.kfraser@localhost.localdomain2007-08-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
* ioemu: error checkin when setting up the Cirrus Logic video device.kfraser@localhost.localdomain2007-08-281-1/+6
| | | | | | | | | | 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>
* xend: Fix memory ballooning logic during save/restore. Should be samekfraser@localhost.localdomain2007-08-281-10/+21
| | | | | as during domain creation. Signed-off-by: Chris Lalancette <clalance@redhat.com>
* Fix VNC server after HVM save/restore/migrate, when no vncpasswd specified.kfraser@localhost.localdomain2007-08-281-1/+2
| | | | | | | | | | | 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>
* hvmloader: Clarify relationship between xen_domain_handle_t and SMBIOS uuid ↵kfraser@localhost.localdomain2007-08-242-2/+3
| | | | | | field. Signed-off-by: Keir Fraser <keir@xensource.com>
* Add sharing-check for blktapkfraser@localhost.localdomain2007-08-173-42/+100
| | | | | Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com> Signed-off-by: Hirofumi Tsujimura <tsujimura.hirof@jp.fujitsu.com>
* xend: Fix vbd detach.kfraser@localhost.localdomain2007-08-171-0/+3
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* Fix "xm restore" require 4 times amount of memory on ia64.kfraser@localhost.localdomain2007-08-171-1/+2
| | | | Signed-off-by: Masayuki Igawa <igawa@mxs.nes.nec.co.jp>
* xend: Avoid unnecessary writes to xenstore.kfraser@localhost.localdomain2007-08-171-1/+1
| | | | | Type of rtc/timeoffset is not 'int' but 'str'. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* libxc: Various xc_evtchn_* functions must return signed integer type.kfraser@localhost.localdomain2007-08-144-90/+107
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [HVM] [TOOLS] Move device state save earlier in suspend pathTim Deegan2007-08-132-2/+3
| | | | Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
* xm-test: Allow dom0 network interface used in tests to be overridenJames Bulpin2007-08-124-7/+17
| | | | ./configure --with-dom0-intf=<intf> (default vif0.0)
* Fix xm block/network-detach command.kfraser@localhost.localdomain2007-08-094-19/+155
| | | | | | | | | - To remove device info, it waits for the backend path of the device to be removed. - It removes device info from domain info. - It saves domain info to the config.sxp of the managed domain. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* acm: Some fixes to the Xend ACM management codekfraser@localhost.localdomain2007-08-094-29/+84
| | | | | | | | | | | | - prevent vlans from being relabeled when they are in use by the current policy - fix problems when doing an update of the policy and the name of the policy changes while doing that - refactor code that has to take into consideration that unlabeled domains may be defined using the label __UNLABELED__ - make 'xm list --label' show the complete label of a domain Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* Do not clobber new wallclock offset on restore.Ian Campbell2007-08-081-12/+23
| | | | | | | The new hypervisor will set shared_info->wc_* so do not clobber those values with the saved versions from the old hypervisor. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* [TOOLS] Avoid unaligned accesses in libfsimage FAT16 codeTim Deegan2007-08-081-3/+3
| | | | | Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com> Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* xentop: fix abnormal value cpu(%) when domain shutdown.kfraser@localhost.localdomain2007-08-071-1/+1
| | | | | | | | | | | If we test multiple domain create/shutdown many times. sometimes abnormal values of cpu(%) are appeared. This is because shutdown domain remove failure. (in other words, memory corruption of struct ) This corruption makes abnormal cpu(%) values are shown xentop sometimes. Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
* [HVM] Store Etherboot ROM as hexdump, not binaryTim Deegan2007-08-064-2/+2056
| | | | | for ease of patch management Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* xm: Fix control characters causing xm tests to fail.kfraser@localhost.localdomain2007-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | On my FC7 installation some of the test in the xm test suite fail for no apparent reason. The problem is that the python 'readline' module puts out control characters that confuse code that parses the output of some of the xm commands that are being run. The readline module dumps those characters upon import. The attached patch works around this problem. Here's what I get in out.txt when doing 'python 2>&1 | tee out.txt' and 'import readline' on the python command line: Python 2.5 (r25:51908, Apr 10 2007, 10:29:13) [GCC 4.1.2 20070403 (Red Hat 4.1.2-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. [[?1034h>>> >>> The characters before the '>>>' above are those printed by that version of 'readline' and remain invisible on the screen but appear in the file and confuse the xm test suite parser. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* xm: pass --skipdtd parameter through to 'xm new'kfraser@localhost.localdomain2007-08-061-1/+2
| | | | | | | Pass the command line parameter '--skipdtd|-s' through to the actual 'xm new' command. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* pygrub: LiloConf.py supports root and read-onlykfraser@localhost.localdomain2007-08-061-3/+21
| | | | | | | LiloConf.py ignores the following options: root and read-only. This patch fixes the issue. Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* Fix/cleanup destroyDevice code path in xend.kfraser@localhost.localdomain2007-08-065-27/+96
| | | | | | | | | | | | | | When calling destroyDevice code path (e.g. xm block-detach dom devid), allow specifying an integer device id or a device name such as xvdN or /dev/xvdN. Allowing the /dev/xvdN form is useful when detaching devices from dom0. Bootloaders may do this to unmount a disk previously mounted in dom0. Move examination of device ID format into the DevController, permitting device controllers to determine a valid device ID instead of higher level code. Signed-off-by: Jim Fehlig <jfehlig@novell.com>
* [ACM] Support for removing / replacing a policykfraser@localhost.localdomain2007-08-066-33/+142
| | | | | | | | | | | | Add support for removing/replacing a policy from the running system. This operation is only successful if currently running VMs would also be allowed to run under the new policy. Removing the current policy means that the default policy is installed, which then only has support for a single VM label and STE type (SystemManagement) and is the same policy that the system starts up with when no policy is chosen. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* [ACM] Support for running unlabeled domains alongside labeled oneskfraser@localhost.localdomain2007-08-066-26/+53
| | | | | | | | | | Add support for running unlabeled domains alongside labeled ones, if the policy contains a VM label with name '__UNLABELED__' and an STE type with the same name. The ezpolicy tool has been modified to automatically suggest a policy under which unlabeled domains can run. The user may delete this, if this is not desired. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* domain builder: Zero start_info struct.kfraser@localhost.localdomain2007-08-031-0/+2
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* xenstore: Redirect stdin/stdout/stderr to /dev/null.kfraser@localhost.localdomain2007-08-011-4/+8
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* xenstore: Do not assign to stdout/stderr/stdin - they are notkfraser@localhost.localdomain2007-08-013-10/+5
| | | | | implemented as variables on all systems. Signed-off-by: Keir Fraser <keir@xensource.com>
* xenstored: Do not write to stderr if we are daemonised!kfraser@localhost.localdomain2007-08-014-15/+16
| | | | | | This fixes client reader-thread deaths in which a 'garbage string' was being read instead of a well-formed message header. Signed-off-by: Keir Fraser <keir@xensource.com>
* xenstored: Remove unused util code.kfraser@localhost.localdomain2007-08-012-96/+0
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* blktap: Fix unaligned access to blktap/tapdisk message payloads.kfraser@localhost.localdomain2007-08-011-1/+3
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix file descriptor leak in blktapctrlkfraser@localhost.localdomain2007-08-011-12/+32
| | | | | | | | | | | | | | | The blktapctrl process is responsible for spawning individual tapdisk processes. It does this using the 'system' method, but unfortunately none of its file descriptors have the close-on-exec flag set. The parent blktapctl process opens a couple of unix domain sockets per-tapdisk it spawns. So the first tapdisk get 2 FDs leaked to it, the second gets 4 FDs leaked to it, the 3rd gets 6 and so on. The use of 'system' also unneccessarily invokes the shell. Replace system with fork/execvp, and explicitly close all file handles up to _SC_OPEN_MAX. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* [IA64] Fix tools build.kfraser@localhost.localdomain2007-08-011-1/+3
| | | | Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* hvmloader: Avoid bogus use of NULL pointer.kfraser@localhost.localdomain2007-07-311-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [ACM] Some more fixeskfraser@localhost.localdomain2007-07-304-3/+26
| | | | | | | | | | | - don't reload the policy if it has been loaded - don't always load the policy in the test suite when the policy is already loaded - skip tests 07 and 09 when ACM is not enabled and xm is not using the Xen-API - fix a problem when trying to remove an invalid label Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* Move generate_acpi_checksum() from ia64 code to common.kfraser@localhost.localdomain2007-07-302-1/+14
| | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* Implement Xen API method Console.set_other_config.kfraser@localhost.localdomain2007-07-273-3/+23
| | | | Signed-off-by: Jim Fehlig <jfehlig@novell.com>
* Implement missing Xen API method Console.get_other_config.kfraser@localhost.localdomain2007-07-271-0/+6
| | | | Signed-off-by: Jim Fehlig <jfehlig@novell.com>
* Fix Xen API console methods that use undefined variables.kfraser@localhost.localdomain2007-07-271-0/+2
| | | | Signed-off-by: Jim Fehlig <jfehlig@novell.com>
* [Xend] Do network startup earlier.kfraser@localhost.localdomain2007-07-272-3/+4
| | | | | | | | | | | | Xend tries to rebuild the network configuration such as bridges and vlan interfaces (in those bridges) when starting. Unfortunately this fails on the first startup since the network script has not run, yet, and for example created peth0. When restarting xend it works due to the peth0 being there then. This patch moves the initialization of the network to an earlier time in the xend initialization process to mitigate this problem. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* [XEND] Fix for creating VLANs using the Xen-APIkfraser@localhost.localdomain2007-07-271-3/+3
| | | | | | | | | | | | | Recent changes to the setup of the peth0 interface have resulted in a change of its MAC address. Previously it seems to have had a MAC address of 'fe:ff:ff:ff:ff:ff', but now it has the same MAC address as eth0. As a consequence to this the Xen-API code to create VLANs (PIF.create_VLAN("peth0",...)) does not work anymore, since peth0 can not be identified according to this previous criteria of fake MAC address. This patch fixes this issue by identifying it through the prefix 'peth'. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* [ACM] Check a domain's authorization to run.kfraser@localhost.localdomain2007-07-273-7/+32
| | | | | | | | | A domain is only authorized to run if it has a superset of Simple Type Enforcement Types in its VM label compared to that of Domain-0, which itself may not have all STEs available in a policy. This patch adds a check for this into Xend and the necessary code support into Xen. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* [HVM] Save/restore: don't leak shared-memory segments after HVM live-migrate.Tim Deegan2007-07-261-7/+18
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>