Commit Graph
16745 Commits
Author SHA1 Message Date
Keir Fraser 653ceb13b7 Minor correction in xm man page for 'xm create'.
From: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-17 15:21:35 +00:00
Keir Fraser 08d9a2612a minios: add xenbus token support and separate watch event queues
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-17 15:20:02 +00:00
Keir Fraser 9bb7f7e2ac tools: disable lomount and miniterm by default
lomount is a tool which reads and parses a partition table in a disk
image block device and then uses mount -o ...offset=... to mount it.
This is not an ideal approach.  For example, if the intended
filesystem has corrupted metadata the kernel's filesystem driver may
start to write outside of the intended region.  This might even be
exploitable in some perverse circumstances.

Nowadays people wanting to do this should use kpartx, which uses
devmapper to create appropriate range mappings.  So lomount should be
disabled.

miniterm may well be useful but it is a clone-and-hack of an upstream
project and is currently built but not installed by default, partly
because it doesn't make sense to install on the dom0 which it might be
trying to debug.

It is probably useful to retain these two programs in the source tree
but IMO they should no longer be built by default.

The attached patch does these things:
 * CONFIG_LOMOUNT and CONFIG_MINITERM in Config.mk
   can enable and disable these programs
 * They are disabled by default
 * If CONFIG_MINITERM=y it is still built but not installed.
   make -C tools/misc/miniterm install  will install it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-17 15:18:38 +00:00
Keir Fraser d2477385df tools: LDFLAGS in link lines
LDFLAGS is not honoured by a couple of link lines in tools/*, but
should be.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-17 15:17:22 +00:00
Keir Fraser db13a968f5 network scripts: SUSE has sensible use of ifup nowadays
While wading through the patches made to Xen by OpenSUSE in their
[s]rpm, I found that they have removed various special casing for ifup
on ther distribution.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-17 15:14:17 +00:00
Keir Fraser aac518b954 tools/docs: Fix example and default IP addresses.
In various places in documentation and code, IP addresses are provided
as examples, defaults, or dummy configuration.  In general the
specific IP addresses used in Xen are not always appropriate.  (For
example, 1.2.3.4 is used in a few places!)

The following addresses should be used:
 * For examples and documentation, 192.0.2.0/24.  (See RFC3330.)
 * For defaults for private networks, a random network from RFC1918.
   I have randomly selected 172.30.206.0/24 for this purpose and
   documented this in at the only registry I know of,
   www.ucam.org/cam-grin.  This network should henceforth be used for
   default configurations of local bridges, test networks, etc. in
   Xen tools.

The following addresses should NOT be used:
 * 10.0.*.*, 10.1.*.*, 192.168.0.*, 192.168.1.*, etc.  Using these
   addresses gives greatly increased likelihood of collision, as
   ignorant network administrators and reckless middlebox vendors
   often pick networks from the bottom of 10/8 and 192.168/16.
 * 169.254.*.*.  These are reserved for zeroconf (ad-hoc networking)
   and should not be used for Xen private networks, bridges, etc.,
   etc.  Use of these addresses by Xen scripts causes trouble on hosts
   (eg laptops) which find themselves in ad-hoc networking
   environments.  I think this is not hypothetical (!) since at least
   one Linux distribution have specific code to detect this case and
   cause Xen startup to fail iff the host already has an external
   zeroconf address.
 * 1.2.3.4.  WTF !?

I have also used 127.0.255.255 in one place where apparently a dummy
address is needed (some Linux kernels won't accept a lack of an NFS
server address).  If 127.0.255.255 is mistakenly used it is unlikely
to do any damage to real traffic even if it does escape into the
network at large.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-17 15:13:40 +00:00
Keir Fraser 5564364efa libxen: Avoid declarations-after-statement (C++ coding style).
Signed-off-by: Andre Przywara <andre.przywara@amd.com>

libxen: Use build-system CFLAGS and LDFLAGS.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-17 15:11:22 +00:00
Keir Fraser f3b3ce4ae7 minios: add realloc
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
2008-01-17 15:06:30 +00:00
Keir Fraser 22e39d084e minios: make stack size configurable
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2008-01-17 14:41:44 +00:00
Keir Fraser e2edfe6c73 minios: add wait_event_deadline
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
2008-01-17 14:41:12 +00:00
Keir Fraser 69ca1c28b4 minios: add trydown
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-17 14:40:55 +00:00
Keir Fraser d962772049 minios: use ASSERT for BUG_ON
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-17 14:40:23 +00:00
Keir Fraser 41888d5a7e minios: Add exit_thread prototype. Make sure exit_thread doesn't
return by accident.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-17 14:40:06 +00:00
Keir Fraser cb4baf13a2 minios: Add noreturn attribute to do_exit
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-17 14:39:45 +00:00
Keir Fraser c56fe82b7d minios: Optimize IA64's get_current()
Let gcc access r13 itself, leading to better code

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
2008-01-17 14:39:21 +00:00
Keir Fraser 5c0d9e888d Update API changelog for new feature flags.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-17 13:03:22 +00:00
Keir Fraser e0413522fd hvm: Allocate an unmapped guard page to separate ordinary low RAM
from special pages (ioreq, xenstore, etc). This will stop some probe
functions (e.g., embedded in memtest) from stomping on the special
pages.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-17 12:59:10 +00:00
Keir Fraser 1f30c27a9b amd hvm (svm): Print warning if NPT constraints on PAE are hit.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-16 15:55:57 +00:00
Keir Fraser 889be060b8 xenconsoled: Make slave pty raw during initialization.
(This avoids echo).

Signed-off-by: Tristan Gingold <tgingold@free.fr>
2008-01-16 13:44:18 +00:00
Keir Fraser 3c2d0242e4 x86: New feature flag XENFEAT_mmu_pt_update_preserve_ad.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-16 13:27:59 +00:00
Keir Fraser 2a33551d19 x86: Reserve a CPUID feature bit to advertise new
MMU_PT_UPDATE_PRESERVE_AD hypercall command.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-16 11:44:41 +00:00
Keir Fraser e606b5e41c x86: Document the new MMU_PT_UPDATE_PRESERVE_AD hypercall.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-15 21:23:37 +00:00
Keir Fraser 1d0474e5be -DNDEBUG for hypervisor only
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-15 18:50:44 +00:00
Keir Fraser dd8dc9533b libxen: Fix function prototype.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-15 18:48:32 +00:00
Keir Fraser a547ca19e1 Merge with ia64 tree. 2008-01-15 14:39:23 +00:00
Keir Fraser 2a34bc2edd x86: Allow batched mmu updates which preserve accessed/dirty pte bits.
Signed-off-by: Bruce Rogers <brogers@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-15 14:32:15 +00:00
Keir Fraser 2bdb8485df Update version to 3.3-unstable. 2008-01-15 14:27:15 +00:00
Keir Fraser 49c14d4312 xend: Remove hardcoded (and apparently unused) xend version.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2008-01-15 14:24:05 +00:00
Keir Fraser 136beff178 hvm, x86: Add QEMU BIOS menu for choosing boot device.
The attached patch implements a mini BIOS menu for choosing a
non-default
boot device. When a guest starts it'll display

   'Press F10 to select boot device'

And wait 3 seconds, before continuing with the normal boot device. If
they press the F10 key, a menu is shown allowing a choice between
floppy, harddisk, cdrom and network (PXE).

I can't take credit for this originally - Jeremy Katz wrote it for
KVM, I merely re-diffed the patch to work against Xen's QEMU/BIOS code
tree. It has been tested in Fedora successfully against 3.1.x and 3.2.x

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
CC: Jeremy Katz <katzj@redhat.com>

If more than one boot device has been selected, the currently selected
number displayed in the menu is wrong.

Signed-off-by: Stefano Stabellini <stefano.stabellini@citrix.com>
2008-01-15 14:22:50 +00:00
Keir Fraser 6aef553b66 blktap: factor out linux specific code
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-01-15 14:17:22 +00:00
Alex Williamson de7ca99764 [IA64] Fix security vulnerability
DomU can map any other domain's memory.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-01-15 07:07:01 -07:00
Keir Fraser e0ac533c0d x86: INT3 and INTO trap gates should have DPL==3.
This was broken by c/s 16667 (gdbstub changes).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-15 11:29:15 +00:00
Keir Fraser b08f5c2d67 Added tag 3.2.0-rc6 for changeset 9facc624a238 2008-01-13 10:50:18 +00:00
Keir Fraser f4c88d4c31 Update version to xen-3.2.0-rc6 3.2.0-rc6 2008-01-13 10:50:13 +00:00
Keir Fraser cee6848f3b x86: Fix PV PIT handler after previous changeset.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-12 11:26:04 +00:00
Keir Fraser bc6c5510db hvm: Improve in-Xen PIO emulation to better handle string PIO
instructions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-12 11:13:57 +00:00
Keir Fraser 3790d2ab9b svm: Properly mask unsupported bits in CPUID_80000001_ECX.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-12 09:29:38 +00:00
Keir Fraser 93c129e9bd hvm: hpet: Tidy up hpet_to_ns_limit calculation.
Suggested by Haitao Shan @ Intel.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-11 11:01:36 +00:00
Keir Fraser 9eb143df00 vmxassist: Emulate CLTS.
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-11 10:59:48 +00:00
Keir Fraser 3dffd10d58 x86 hvm: hvm_maybe_deassert_evtchn_irq() needs to be called early in
vmexit handling, before IO-APIC can be EOIed or unmasked and resample
the fake INTx line.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-11 10:53:44 +00:00
Keir Fraser 0afa7733ef x86_emulate: Fix near CALL/JMP <reg,mem>. Broken by c/s 16491.
Thanks to AMD for narrowing this one down.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-10 22:53:43 +00:00
Keir Fraser bf8259852f x86_emulate: Certain opcodes are only valid with a memory operand.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-10 22:52:40 +00:00
Keir Fraser 8c1b80e42d Fix network-bridge shell quoting.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-10 15:30:46 +00:00
Keir Fraser d4d038b1f5 Added tag 3.2.0-rc5 for changeset 36bb2ab4722733d919d32e4555eb46cc6a06cb8f 2008-01-09 22:21:58 +00:00
Keir Fraser b2263f518f Update version to 3.2.0-rc5 3.2.0-rc5 2008-01-09 22:21:49 +00:00
Keir Fraser 48647b523d x86_emulate: Fix handling of RIP-relative addressing.
The handling of SHLD/SHRD introduced in 16696:b5b3e27f1af3f7 was
incorrect; thanks to Gary Grebus @ Virtual Iron for spotting it.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-09 22:21:28 +00:00
Keir Fraser 450bd7f584 vt-d: Fix print_vtd_entries walk VTd mapping table.
DMA request to above guest physical memory will cause VTd fault, in
which print_vtd_entries() tries to walk VTd mapping table. However,
during walking, current Xen code didn't check if the PTE is valid and
may access to invalid memory address.

Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
2008-01-09 10:35:52 +00:00
Keir Fraser ab6c6dfd00 hvm: hpet: Clamp period to sane values to prevent excessive looping in
hpet_timer_fn(), or excessive numbers of set_timer() callbacks.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-09 10:32:13 +00:00
Keir Fraser a24e208fb7 x86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with
immediate byte third operand.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-09 10:11:31 +00:00
Keir Fraser 98f4e2606f Fix x86_emulate() handling of imul with immediate operands.
This fixes a repeatable crash in RHEL 4.2 ext2 filesystem during boot.

Signed-off-by: Gary Grebus <ggrebus@virtualiron.com>
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
2008-01-09 10:09:04 +00:00