Commit Graph
3708 Commits
Author SHA1 Message Date
kaf24@localhost.localdomain b643712258 [XEND] Move all of the various log files created by xen to
be under /var/log/xen instead of under /var/log directly.  This has
the advantage of cleaning things up a little and also can make it
easier to restrict the permissions needed by xend.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-08-28 13:05:00 +01:00
kaf24@localhost.localdomain 10a74ed0a2 [HVM] [SMBIOS] Duplicate UUID into serial number in SMBIOS tables.
Windows zeroes out the UUID in the SMBIOS tables, but the identifier
is often needed by systems management code.  Duplicating the UUID
as the virtual system's serial number should help.

Signed-off-by: Andrew D. Ball <aball@us.ibm.com>
2006-08-28 12:59:07 +01:00
kaf24@localhost.localdomain 2b1e704734 The following patch fixes a bug where xenconsoled will can SEGV
because it uses FD_ISSET(-1,xxx).  Since the code is written that any
ring/tty handler can set d->tty_fd to -1 it has to be checked
_every_time_.

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
2006-08-28 12:50:55 +01:00
kaf24@localhost.localdomain a1a3b44764 [TOOLS] Remove Gentoo-specific workaround in networking
scripts -- apparently it is not needed (reported by
Tuan Van <lang.thang@gmail.com>). See bugzilla issue #741
for more details.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-28 12:49:14 +01:00
kaf24@localhost.localdomain daddd6bbdd [TOOLS] Clean up routed vifs quietly on domain destruction.
I have experienced that the vif-route script does not work as expected
when deleting a virtual interface (Redhat FC5). Both of the commands
"ifdown" and "ip route" cause an early vif-route script exit and
therefore will cause skipping of the later script commands (such as
cleaning up iptables entries for the default 'antispoof'). The
vif-route
script creates the following syslog error entry:
"/etc/xen/scripts/vif-route failed; error detected."

It appears that both of the problematic commands are actually
redundant
when destroying domains:
1. the interface is already gone (I assume because the domain frontend
is gone already)  --> ifdown does not do anything
2. the route is gone as well since the interface has disappeared -->
ip
route del does not do anything

Executing those redundant commands with "do_without_error" ensures
that
the script completes and cleans up iptables rules. The attached
RFC-patch only masks those commands when bringing down an interface,
so
that domain creation continues to fail in case of vif setup problems
(intended behavior).

Having the iptables cleanup called correctly by vif-route is important
to keep the iptables rule-set clean, otherwise antispoof rules
accumulate with every vif creation.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-08-28 12:41:15 +01:00
kaf24@localhost.localdomain 99deb3f2fb [XEN] Rename shadow2 to shadow and move the various source
files into a sensible directory hierarchy.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-28 12:09:36 +01:00
Alex Williamson a1041848b5 [PATCH] fix null pointer dereference in xen_guest_lookup()
The latest ELF changes have a null pointer dereference bug when you
have neither an elf notes section nor a __xen_guest_string.  This patch
checks for the existence of the __xen_guest_string prior to using it.
Please apply.  Thanks,

	Alex

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
---
2006-08-27 06:56:01 +01:00
kfraser@localhost.localdomain 1df421476a Replace dom0_ops hypercall with three new hypercalls:
1. platform_op -- used by dom0 kernel to perform actions on the
    hardware platform (e.g., MTRR access, microcode update, platform
    quirks, ...)
 2. domctl -- used by management tools to control a specified domain
 3. sysctl -- used by management tools for system-wide actions

Benefits include more sensible factoring of actions to
hypercalls. Also allows tool compatibility to be tracked separately
from the dom0 kernel. The assumption is that it will be easier to
replace libxenctrl, libxenguest and Xen as a matched set if the
dom0 kernel does not need to be replaced too (e.g., because that
would require vendor revalidation).

From here on we hope to maintain dom0 kernel compatibility. This
promise is not extended to tool compatibility beyond the existing
guarantee that compatibility will not be broken within a three-level
stable release [3.0.2, 3.0.3, etc.].

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-25 18:39:10 +01:00
Ian Campbell e76cb15dce [TOOLS] Use ELFSIZE to pick the ELF structures to use in readnotes.c
We can remove Elf_Ehdr since it is only used for e_ident which is an
unsigned char array.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-08-25 10:39:24 +01:00
kfraser@localhost.localdomain e954b70928 [HVM] Fixes to the ACPI table definition.
1) Fixed HCT test "Unreported Memory and I/O Port test" for memory
   range 0xC0000~0xFFFFF and IO 0x378
2) Make consistent with non-acpi OS by enabling LPT1, remove com2
   which conflicts with usb mouse
3) Fixed the USB HID-Compliant mouse when set
   usbdevice='tablet'/'mouse'
4) Fixed Vista boot by removing old NIC "resourceConsumer"

Signed-off-by: Winston Wang <winston.l.wang@intel.com>
2006-08-24 17:24:54 +01:00
Steven Hand edd2b90d12 Ensure get_dom_domid() terminates even when /local/domain/<foo>/name is
not present.

Signed-off-by: Steven Hand <steven@xensource.com>
2006-08-24 14:07:01 +01:00
Ewan Mellor 0b9c5ec38d The various tools expect the device node to be /dev/xen/evtchn -- this
makes it so that udev actually creates the device there

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-08-23 22:16:02 +01:00
Ian Campbell c1d9bc4ded merge 2006-08-23 18:39:17 +01:00
kfraser@localhost.localdomain 55bfac8dfd [XEN] Fix the x86 emulator to safely fail when it turns out the
faulting memory access was to/from an implicit memory operand
(typically either an instruction fetch or stack access).
Rationalise use of macros for page fault error code flags.
This patch supercedes the fix in changeset 11242.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-23 18:38:08 +01:00
Ian Campbell 2cc329da26 [TOOLS] Cleanups to domU ELF loader.
- Remove debugging statements.
- Cope better with archtectures where neither ELF notes or __xen_guest
  are needed or required.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-08-23 18:35:21 +01:00
kfraser@localhost.localdomain db51cd09d3 Remove all traces of the obsolete BVT scheduler.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-23 17:14:38 +01:00
kfraser@localhost.localdomain ae95fdf65a [TOOLS] Remove the 'cpuperf' misc tool. Xenoprof is the
correct tool to use for hardware perfctr monitoring now.
Also remove unused xc_msr MSR accessor functions from libxenctrl.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-23 15:02:55 +01:00
Ian Campbell dfeb46aa49 [TOOLS] Add a simple tool to display the Xen specific ELF notes.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-08-23 14:43:48 +01:00
Ian Campbell 15d8f355a2 [TOOLS] Allow tools to load kernels which use an ELF notes segment.
Compatability with kernels using the __xen_guest section is retained.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-08-23 14:37:39 +01:00
kfraser@localhost.localdomain 07f2bdb30d [SHADOW] Clean up the DOM0_SHADOW_OP interface.
Also bump the dom0 interface version for tools (but
not for dom0 kernel!).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-22 18:50:01 +01:00
kfraser@localhost.localdomain 314ded7410 [x86_64] Guests no longer set _PAGE_USER on kernel mappings.
This may allow guest kernels to be run outside ring 3 in future, and
also provides scope for optimisations today (e.g., using global bit on
user mappings).

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-22 15:26:40 +01:00
Christian Limpach 6631e301e8 [hvm] Export gpfn of store page to guest - not mfn.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-08-22 15:13:07 +01:00
Anil Madhavapeddy 973bbebcc3 Make add_to_bridge() always leave the device up even when it bails out due to the device already being present on the bridge.
This makes the script more idempotent if run twice (e.g. from hotplug and udev), since the second time the device will be taken down and not brought up again, leaving the host without networking.

Signed-off-by: Anil Madhavapeddy <anil@xensource.com>
2006-08-22 14:59:16 +01:00
George Dunlap 9caa57d3c6 Added option to xentrace to set the trace buffer size.
Signed-off-by: George Dunlap <gdunlap@xensource.com>
2006-08-21 12:05:11 -04:00
Christian Limpach d9e6579356 [xend] Add 'xend_config_format' field to the Xend information block.
When running 'xm info' it appears thus:

 # xm info
 host                   : 10.13.4.252
 release                : 2.6.17-1.2157_FC5xen0
 version                : #1 SMP Tue Jul 11 23:30:05 EDT 2006
 machine                : x86_64
 ...snipped rest of data...
 cc_compile_domain      : build.redhat.com
 cc_compile_date        : Tue Jul 11 22:50:42 EDT 2006
 xend_config_format     : 2

It will also appear in the SEXPR returned when doing a GET on the
/xend/node path in XenD's HTTP service:

 (node
   (system Linux)
   (host 10.13.4.252)
   (release 2.6.17-1.2157_FC5xen0)
   (version '#1 SMP Tue Jul 11 23:30:05 EDT 2006')
   (machine x86_64)
   ...snipped rest of data...
   (cc_compile_domain build.redhat.com)
   (cc_compile_date 'Tue Jul 11 22:50:42 EDT 2006')
   (xend_config_format 2)
 )

The patch sets the format to value '2' to indicate that we're on the version
with the new style HVM configuration for CDROM devices. The old style having
implicitly been version '1'.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-08-21 00:11:17 +01:00
Christian Limpach ea4987ba04 [qemu patches] Update patches for changeset 11209:9bb6c1c1890a.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-08-21 00:01:11 +01:00
Christian Limpach 113654b9fe [qemu] hdparm tunable IDE write cache for HVM
qemu 0.8.2 has a flush callback to the storage backends, so now it is
possible to implement hdparm tunable IDE write cache enable/disable for
guest domains, allowing people to pick speed or data consistency on a
case by case basis.

As an added benefit, really large LBA48 IOs will now no longer be broken
up into smaller IOs on the host side.

From: Rik van Riel <riel@redhat.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-08-20 23:59:34 +01:00
Christian Limpach a9d5932706 [qemu patches] Update patches for changeset 11206:fc3e7e65b953.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-08-20 23:52:39 +01:00
Christian Limpach 2ed7175b63 [qemu patches] Update patches for changeset 11206:fc3e7e65b953.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-08-20 23:34:17 +01:00
Christian Limpach 03a84fa9bd [qemu] Allow booting from more than one device.
The rombios supports trying to boot from more than one device and then
falling back.  Set 'boot=dc' in your config file to try booting first
from the CD and then the hard drive.

Based on a patch from: Jeremy Katz <katzj@redhat.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-08-20 23:33:28 +01:00
kaf24@localhost.localdomain cd93eaf1c7 [HVM] Fix SMBIOS entry point copy destination.
Spotted by Xiaowei Yang <xiaowei.yang@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-19 12:06:36 +01:00
kfraser@localhost.localdomain c724d70275 [HVM] Fix the APM BIOS to ensure that interrupts are enabled when it
executes an idling HLT. This allow us to re-enable the 'shutdown on
HLT-with-interrupts-disabled' heuristic.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-18 16:20:45 +01:00
Christian Limpach 11ef9f5995 [qemu patches] Update patches for changeset 11186:078bfd250677.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-08-17 20:31:47 +01:00
Christian Limpach aad7f0d072 [qemu] Support HVM guests with more than 3.75G memory.
Changes are:
1) M2P table and e820 table are changed to skip address space from
HVM_RAM_LIMIT_BELOW_4G to 4G.
2) shared io page location, when less than HVM_RAM_LIMIT_BELOW_4G
memory, it's the last page of RAM as today, or it's the last page of
HVM_RAM_LIMIT_BELOW_4G RAM.
3) in qemu-dm address space from HVM_RAM_LIMIT_BELOW_4G to 4G are
stuffed with mfns starting from 4G, so the 1:1 mapping can still works.
This is ugly, but another limit check patch as changeset 10757 will
prevent qemu-dm to access this range.  This ugly stuffing will be
removed when the patch to remove 1:1 mapping from qemu-dm gets accepted
in the future.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-08-17 20:31:13 +01:00
chris@kneesaa.uk.xensource.com 2da5c5c78b [qemu patches] Update patches for changeset 11161:5c1021595e3c.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-08-17 12:01:44 +01:00
chris@kneesaa.uk.xensource.com 30841bdf6d [qemu] Add the xen platform device to the qemu PCI bus.
Useful functionality will come later.

Signed-off-by: Steven Smith <ssmith@xensource.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-08-17 12:01:23 +01:00
chris@kneesaa.uk.xensource.com fb7807c1ec [qemu patches] Update patches for changeset 11158:a774cbd38187.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-08-17 11:34:39 +01:00
chris@kneesaa.uk.xensource.com d2ab912dfe [qemu] Default monitor/serial ports to /dev/null if -nographic.
qemu-dm runs daemonized and the default for -nographic is to redirect
the monitor and serial ports to stdio which causes qemu-dm to busy
read from stdin.  Change the default for -nographic to redirect the
monitor and serial ports to /dev/null.

Based on a patch from: Steven Smith <sos22-xen@srcf.ucam.org>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-08-17 11:34:13 +01:00
tdeegan@york.uk.xensource.com 49f7c7364e Replace shadow pagetable code with shadow2. 2006-08-16 17:02:35 +01:00
emellor@leeni.uk.xensource.com 2d14977023 Fix log rotation which was inadvertently broken by changeset 11129:939f75570a15.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-08-16 16:06:32 +01:00
kfraser@localhost.localdomain 0512d8f50a Rename two xentrace tools to make it obvious that setmask and setsize are xen related.
Based on a patch from Rob Gardner <rob.gardner@hp.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-16 13:53:10 +01:00
emellor@leeni.uk.xensource.com 99c694310f Implement xm block-configure for CD-ROMs.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-08-16 12:59:30 +01:00
kfraser@localhost.localdomain 75205296f9 This is a small patch that makes a cross compiler successfully compile
the sources under the tools directory.  This patch became necessary
after qemu-dm is updated to a newer version.

Signed-off-by: Hiroya INAKOSHI <inakoshi.hiroya@jp.fujitsu.com>
2006-08-16 11:53:37 +01:00
kfraser@localhost.localdomain d0ed0b289c [XEND] xc_save/xc_restore open the libxc interface independently
of their parent. This is required now that the interface fd is
marked for close-on-exec.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-15 19:04:43 +01:00
kfraser@localhost.localdomain ef3277d97c Set close-on-exec flag on /var/log/xend.log logging file.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-08-15 16:27:26 +01:00
kfraser@localhost.localdomain 265853a73b Set the close-on-exec flag on the RPC socket in tool stack.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-08-15 16:26:39 +01:00
kfraser@localhost.localdomain e70f7a84ee Set the close-on-exec flag on the xenstore fd in libxenstore.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-08-15 16:25:39 +01:00
kfraser@localhost.localdomain b073ccc00f [LIBXC] Set close-on-exec on the privcmd fd in libxc.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-08-15 16:25:04 +01:00
kfraser@localhost.localdomain 3f334a5fd7 merge 2006-08-15 15:51:47 +01:00
kfraser@localhost.localdomain 121ec85fcf Clean up console fields in start_info structure. Add compat code for
older kernels so they can use the old start_info API.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-15 15:50:36 +01:00