Commit Graph
15972 Commits
Author SHA1 Message Date
Keir Fraser 0d68d7c0fa x86: If e820 map overflows, leak memory in a safe manner.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-27 16:50:52 +01:00
Keir Fraser 67c97dc9f7 ioemu: Fixes for BSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-27 16:36:23 +01:00
Keir Fraser a0d123d804 xend: Fix dummy security_policy_dir.
Changeset 15951:ad339d88639d split policy_dir_prefix into
security_dir_prefix and policy_dir_prefix in acm code.  I think this
needs to be reflected in the dummy module as well (otherwise we blowup
when bootloader.py tries to reference security.security_dir_prefix).
Fixed in below patch.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-09-27 15:22:29 +01:00
Keir Fraser aa6e10191d libaio: Fix for *BSD
- Remove unused linux specific header
  - Include <sys/time.h> needed for struct timespec
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-27 15:13:54 +01:00
Keir Fraser 884ec5f334 xend: Slightly finesse allocation of vmpath in xenstore.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-26 17:11:07 +01:00
Keir Fraser ce75f2335a hvm: Fix task switch update of TR state.
Also remove unneeded duplicate paging_update_cr3().
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-26 16:50:28 +01:00
Keir Fraser 4d0cfe8f1b [xend,xenapi] Fix handling of scheduler params
When creating domains that specify scheduler parameters with XenAPI,
the specified parameters are not used when starting the domain. This
patch collapses cpu_weight and cpu_cap in XendConfig into the
vcpus_params dictionary. The patch has been tested using xm and
XenAPI on config with and without scheduler parameters.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2007-09-26 14:39:56 +01:00
Keir Fraser 1906b3ab66 x86: force DMI table to not be in E820 RAM region
In order for Dom0 to be able to map the DMI table, it must not be in
E820 RAM; since some BIOS versions apparently fail to set the type
correctly for the page(s) containing this table, adjust it before
starting to consume memory.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-26 14:14:16 +01:00
Keir Fraser b85210e23c ioemu: security fixes for not-built or not-default-configured subsystems.
Patches originally proposed by S. Caglar Onur and cleaned up for
xen-unstable by Robert Buchholz <rbu@gentoo.org>.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-26 09:19:12 +01:00
Keir Fraser 8f19898511 vt-d: Fix crash on x86/32.
On 32-bit xen, dom0 crashes when using VT-d to assign devices. It is
caused by setting m2p in clear_mmio_p2m_entry(), because
machine_to_phys_map[] entry for mmio address is not mapped.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2007-09-26 09:15:34 +01:00
Keir Fraser ebe41ed23d hvm: Improve tcgbios code for finding ACPI RSDP.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-09-26 09:14:33 +01:00
Keir Fraser f0acc4f6f1 xenapi: add xen_xspolicy.h to libxen includes file
Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2007-09-26 09:11:46 +01:00
Keir Fraser f3f2e4ef69 firmware: fix romimage generation for *bsd
- portability fix in Makefile: mkhex is not bash specific
 - GNU od separates column with one blank, BSD od uses eight blanks.
   Change sed to deal with this.
 - Add a fourth sed to fix a build error on NetBSD

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-26 09:10:41 +01:00
Keir Fraser d0356250df hvm: eflags[1] must remain set across task switch.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-25 22:28:17 +01:00
Keir Fraser 468eb4e36f xend: Fix VIF MAC address being lost across localhost migration.
VIF details in /vm/<uuid> directory in xenstore get deleted by old
domain dying.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-25 15:35:17 +01:00
Keir Fraser 05fcd427f8 Fix xend start after xsm:acm bootloader changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-25 10:40:38 +01:00
Keir Fraser e8d029002e Fix tools dependency-check scripts for *BSD.
zlib and crypto libs are part of the base system in *BSD.
So no need to check for them on *BSD. This conveniently avoids
executing a non-portable usage of ldconfig.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-25 10:21:07 +01:00
Keir Fraser e602447874 minios: Remove unnecessary padding and unused sections from x86/64
linker script.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-25 10:12:49 +01:00
Keir Fraser adbda3b6da Fix security vulnerability CVE-2007-4993.
Protect pygrub from possible malicious content in guest grub
config file.  This fixes CVE-2007-4993.  Original patch from
Jeremy Katz, I updated to close 2 remaining issues pointed out
by Christian and Keir, and to use setattr(self, ...).

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2007-09-25 09:34:36 +01:00
Keir Fraser 44e7c3aa10 xend memory ballooning: do not bother if guest will not fit in
physical memory constraints.

If users require domain memory size larger than a physical memory
size, we do not need waiting for ballooning, and should cause
xm create command error right away.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-09-25 09:30:00 +01:00
Keir Fraser 66ea95096a [Xend/ACM] Automatic loading of policy after xend has started.
On systems where the grub bootloader is not available or active the
to-be-activated policy is written a simple textfile. Once xend has
started the contents can be read. Using 'xm setpolicy' the policy can
be activated and the Domain-0 label set (using 'xm addlabel').
I fixed some bugs in the grub bootloader handler on the way and
removed some dead functions.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-09-24 21:52:10 +01:00
Keir Fraser 92877a1f9a x86: Auto-probe the serial port baud rate if 'com1' or 'com2' is
specified as a Xen console target. Avoids need for 'com1=' or 'com2='
command-line option in some cases.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-24 21:41:46 +01:00
Keir Fraser c7380ae196 Another msised netbsd file.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-24 16:03:11 +01:00
Keir Fraser 98418f1c1e Missed files in previous changeset.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-24 15:41:20 +01:00
Keir Fraser d1729249ef xenstat/xenstore: NetBSD fixes.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-24 15:38:52 +01:00
Keir Fraser c6a041cfa4 Fix xentrace build.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-24 15:29:09 +01:00
Tim Deegan 20fd87abc2 Merge 2007-09-24 14:04:36 +01:00
Keir Fraser 3a0667d17e libxc: NetBSD-specific pieces.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-24 13:45:57 +01:00
Tim Deegan c17db2f3e0 Merge 2007-09-24 13:44:51 +01:00
Tim Deegan d0d699be14 [HVM] Don't count "missed ticks" on one-shot timers.
It's not clear what it would mean, and it leads to division by zero.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-09-24 13:44:29 +01:00
Keir Fraser a62f71bad5 Xen tracing cleanups and fixes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-24 13:43:25 +01:00
Keir Fraser 7923ccdaf3 Fix the build after AMD IOMMU patches.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-23 12:56:11 +01:00
Keir Fraser 2c1be8f16a vt-d: disable for old chipset steppings with incompatible page table format.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
2007-09-23 12:55:50 +01:00
Keir Fraser af8b404f2d XSM:FLASK support for domain management under Xen-API
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
2007-09-23 12:45:07 +01:00
Keir Fraser d6f6960a00 Fix libfsimage build on NetBSD.
Fixes a number of these errors:
 cc1: warnings being treated as errors
 fsys_fat.c: In function 'fat_dir':
 fsys_fat.c:304: warning: array subscript has type 'char'

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

These ugly casts are needed according to the ISO C spec.

Acked-by: Keir Fraser <keir@xensource.com>
2007-09-23 12:18:36 +01:00
Keir Fraser d68181c014 vmxassist: Emulate HLT.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-22 09:39:18 +01:00
Keir Fraser 807d262e0a libxc: improve error message when starting a domain and mmap() fails
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-21 17:23:35 +01:00
Keir Fraser 1106867cc9 network-bridge: default to eth0 if no default gateway.
From: Luke Szymanski <Lukasz.Szymanski@unisys.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-21 17:22:15 +01:00
Keir Fraser 0700c962ac Add AMD IOMMU support into hypervisor
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2007-09-21 17:15:47 +01:00
Keir Fraser ed20abc6f0 Fix build after tracing changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-21 17:10:00 +01:00
George Dunlap a92facd683 [xen][hvm][tracing] Refine hvm tracing
This patch does two things:
 * Allows hvm traces to take advantage of the variable-size traces
 * Adds some hvm functionality

This includes tracing actions like clts and lmsw, values of {p,mm}io reads
and writes, and making different trace records for hvm domains running in
64-bit mode if the trace record includes a virtual address.
2007-09-21 15:33:37 +01:00
George Dunlap 2ec9f061dc [xen][tracing] Introduce variable-size trace records
This patch introduces variable-size trace records.  Each record consists of
a 32-bit "header", an optional cycle count, and up to seven more 32-bit words.

The header is packed with the following information:
 bits  0-27: The trace event.
 bits 28-30: The number of 32-bit "extra" words in the records
 bit     31: Does the trace include a 64-bit tsc?

This patch standardizes behavior wrt 32 and 64-bit hypervisors and dom0s.

Note that this patch requires a new version of the xentrace daemon running in
dom0.  The new daemon, instead of pre-pending the cpu to every record as it
writes it, inserts a "cpu change" record to the trace file that record the
cpu and the number of records it's about to write.

Signed-off-by: George Dunlap <gdunlap@xensource.com>
2007-09-21 15:26:07 +01:00
Keir Fraser 2aa818d3bb vmx: Fix VMCS state pretty printing.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-21 16:52:17 +01:00
Keir Fraser c11a94127d Fix tools/console to build on NetBSD.
- include headers needed to build on NetBSD
 - Remove unused pty.h
 - Initialize spty terminal before actually using it

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-20 16:02:22 +01:00
Keir Fraser b35124143b vtd: Fix init/destroy domain hooks.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-20 15:59:51 +01:00
Keir Fraser 5b9d7e4831 libelf: OpenBSD and NetBSD portability.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-20 15:52:29 +01:00
Keir Fraser 692ee9a0e8 vtd: cleanups to iommu code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-20 15:41:22 +01:00
Keir Fraser 407d514591 cpufreq: Support cpufreq updates on AMD hardware by dom0 kernel.
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-20 14:15:45 +01:00
Keir Fraser 5c7379ebbe [XM-TEST] Fixes a parameter to the external tools used
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-09-20 13:30:14 +01:00
Tim Deegan 170e2f6f59 Merge 2007-09-20 10:55:24 +01:00